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

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

Go to download

The AWS Java SDK for AWS Database Migration Service module holds the client classes that are used for communicating with AWS Database Migration Service.

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

package software.amazon.awssdk.services.databasemigration;

import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.awscore.retry.AwsRetryStrategy;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.SdkRequest;
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.retry.RetryMode;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.json.AwsJsonProtocol;
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.JsonOperationMetadata;
import software.amazon.awssdk.retries.api.RetryStrategy;
import software.amazon.awssdk.services.databasemigration.internal.DatabaseMigrationServiceClientConfigurationBuilder;
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.BatchStartRecommendationsRequest;
import software.amazon.awssdk.services.databasemigration.model.BatchStartRecommendationsResponse;
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.CreateDataProviderRequest;
import software.amazon.awssdk.services.databasemigration.model.CreateDataProviderResponse;
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.CreateInstanceProfileRequest;
import software.amazon.awssdk.services.databasemigration.model.CreateInstanceProfileResponse;
import software.amazon.awssdk.services.databasemigration.model.CreateMigrationProjectRequest;
import software.amazon.awssdk.services.databasemigration.model.CreateMigrationProjectResponse;
import software.amazon.awssdk.services.databasemigration.model.CreateReplicationConfigRequest;
import software.amazon.awssdk.services.databasemigration.model.CreateReplicationConfigResponse;
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.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.DeleteDataProviderRequest;
import software.amazon.awssdk.services.databasemigration.model.DeleteDataProviderResponse;
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.DeleteInstanceProfileRequest;
import software.amazon.awssdk.services.databasemigration.model.DeleteInstanceProfileResponse;
import software.amazon.awssdk.services.databasemigration.model.DeleteMigrationProjectRequest;
import software.amazon.awssdk.services.databasemigration.model.DeleteMigrationProjectResponse;
import software.amazon.awssdk.services.databasemigration.model.DeleteReplicationConfigRequest;
import software.amazon.awssdk.services.databasemigration.model.DeleteReplicationConfigResponse;
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.DescribeConversionConfigurationRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeConversionConfigurationResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeDataProvidersRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeDataProvidersResponse;
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.DescribeEngineVersionsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeEngineVersionsResponse;
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.DescribeExtensionPackAssociationsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeExtensionPackAssociationsResponse;
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.DescribeInstanceProfilesRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeInstanceProfilesResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeMetadataModelAssessmentsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeMetadataModelAssessmentsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeMetadataModelConversionsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeMetadataModelConversionsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeMetadataModelExportsAsScriptRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeMetadataModelExportsAsScriptResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeMetadataModelExportsToTargetRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeMetadataModelExportsToTargetResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeMetadataModelImportsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeMetadataModelImportsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeMigrationProjectsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeMigrationProjectsResponse;
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.DescribeRecommendationLimitationsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeRecommendationLimitationsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeRecommendationsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeRecommendationsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeRefreshSchemasStatusRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeRefreshSchemasStatusResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationConfigsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationConfigsResponse;
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.DescribeReplicationTableStatisticsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTableStatisticsResponse;
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.DescribeReplicationsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationsResponse;
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.ExportMetadataModelAssessmentRequest;
import software.amazon.awssdk.services.databasemigration.model.ExportMetadataModelAssessmentResponse;
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.ModifyConversionConfigurationRequest;
import software.amazon.awssdk.services.databasemigration.model.ModifyConversionConfigurationResponse;
import software.amazon.awssdk.services.databasemigration.model.ModifyDataProviderRequest;
import software.amazon.awssdk.services.databasemigration.model.ModifyDataProviderResponse;
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.ModifyInstanceProfileRequest;
import software.amazon.awssdk.services.databasemigration.model.ModifyInstanceProfileResponse;
import software.amazon.awssdk.services.databasemigration.model.ModifyMigrationProjectRequest;
import software.amazon.awssdk.services.databasemigration.model.ModifyMigrationProjectResponse;
import software.amazon.awssdk.services.databasemigration.model.ModifyReplicationConfigRequest;
import software.amazon.awssdk.services.databasemigration.model.ModifyReplicationConfigResponse;
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.ReloadReplicationTablesRequest;
import software.amazon.awssdk.services.databasemigration.model.ReloadReplicationTablesResponse;
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.StartExtensionPackAssociationRequest;
import software.amazon.awssdk.services.databasemigration.model.StartExtensionPackAssociationResponse;
import software.amazon.awssdk.services.databasemigration.model.StartMetadataModelAssessmentRequest;
import software.amazon.awssdk.services.databasemigration.model.StartMetadataModelAssessmentResponse;
import software.amazon.awssdk.services.databasemigration.model.StartMetadataModelConversionRequest;
import software.amazon.awssdk.services.databasemigration.model.StartMetadataModelConversionResponse;
import software.amazon.awssdk.services.databasemigration.model.StartMetadataModelExportAsScriptRequest;
import software.amazon.awssdk.services.databasemigration.model.StartMetadataModelExportAsScriptResponse;
import software.amazon.awssdk.services.databasemigration.model.StartMetadataModelExportToTargetRequest;
import software.amazon.awssdk.services.databasemigration.model.StartMetadataModelExportToTargetResponse;
import software.amazon.awssdk.services.databasemigration.model.StartMetadataModelImportRequest;
import software.amazon.awssdk.services.databasemigration.model.StartMetadataModelImportResponse;
import software.amazon.awssdk.services.databasemigration.model.StartRecommendationsRequest;
import software.amazon.awssdk.services.databasemigration.model.StartRecommendationsResponse;
import software.amazon.awssdk.services.databasemigration.model.StartReplicationRequest;
import software.amazon.awssdk.services.databasemigration.model.StartReplicationResponse;
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.StopReplicationRequest;
import software.amazon.awssdk.services.databasemigration.model.StopReplicationResponse;
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.transform.AddTagsToResourceRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ApplyPendingMaintenanceActionRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.BatchStartRecommendationsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.CancelReplicationTaskAssessmentRunRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.CreateDataProviderRequestMarshaller;
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.CreateInstanceProfileRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.CreateMigrationProjectRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.CreateReplicationConfigRequestMarshaller;
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.DeleteDataProviderRequestMarshaller;
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.DeleteInstanceProfileRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DeleteMigrationProjectRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DeleteReplicationConfigRequestMarshaller;
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.DescribeConversionConfigurationRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeDataProvidersRequestMarshaller;
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.DescribeEngineVersionsRequestMarshaller;
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.DescribeExtensionPackAssociationsRequestMarshaller;
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.DescribeInstanceProfilesRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeMetadataModelAssessmentsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeMetadataModelConversionsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeMetadataModelExportsAsScriptRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeMetadataModelExportsToTargetRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeMetadataModelImportsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeMigrationProjectsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeOrderableReplicationInstancesRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribePendingMaintenanceActionsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeRecommendationLimitationsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeRecommendationsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeRefreshSchemasStatusRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeReplicationConfigsRequestMarshaller;
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.DescribeReplicationTableStatisticsRequestMarshaller;
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.DescribeReplicationsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeSchemasRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeTableStatisticsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ExportMetadataModelAssessmentRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ImportCertificateRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ModifyConversionConfigurationRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ModifyDataProviderRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ModifyEndpointRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ModifyEventSubscriptionRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ModifyInstanceProfileRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ModifyMigrationProjectRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ModifyReplicationConfigRequestMarshaller;
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.ReloadReplicationTablesRequestMarshaller;
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.StartExtensionPackAssociationRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.StartMetadataModelAssessmentRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.StartMetadataModelConversionRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.StartMetadataModelExportAsScriptRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.StartMetadataModelExportToTargetRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.StartMetadataModelImportRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.StartRecommendationsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.StartReplicationRequestMarshaller;
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.StopReplicationRequestMarshaller;
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.DatabaseMigrationWaiter;
import software.amazon.awssdk.utils.Logger;

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

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

    private final SyncClientHandler clientHandler;

    private final AwsJsonProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

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

    /**
     * 

* Adds metadata tags to an DMS resource, including replication instance, endpoint, subnet 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 Result of the AddTagsToResource operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.AddTagsToResource * @see AWS API * Documentation */ @Override public AddTagsToResourceResponse addTagsToResource(AddTagsToResourceRequest addTagsToResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, AddTagsToResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(addTagsToResourceRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("AddTagsToResource").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(addTagsToResourceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new AddTagsToResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param applyPendingMaintenanceActionRequest * @return Result of the ApplyPendingMaintenanceAction operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.ApplyPendingMaintenanceAction * @see AWS API Documentation */ @Override public ApplyPendingMaintenanceActionResponse applyPendingMaintenanceAction( ApplyPendingMaintenanceActionRequest applyPendingMaintenanceActionRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ApplyPendingMaintenanceActionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(applyPendingMaintenanceActionRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ApplyPendingMaintenanceAction").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(applyPendingMaintenanceActionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ApplyPendingMaintenanceActionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Starts the analysis of up to 20 source databases to recommend target engines for each source database. This is a * batch version of StartRecommendations * . *

*

* The result of analysis of each source database is reported individually in the response. Because the batch * request can result in a combination of successful and unsuccessful actions, you should check for batch errors * even when the call returns an HTTP status code of 200. *

* * @param batchStartRecommendationsRequest * @return Result of the BatchStartRecommendations operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.BatchStartRecommendations * @see AWS * API Documentation */ @Override public BatchStartRecommendationsResponse batchStartRecommendations( BatchStartRecommendationsRequest batchStartRecommendationsRequest) throws InvalidResourceStateException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, BatchStartRecommendationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(batchStartRecommendationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, batchStartRecommendationsRequest .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, "BatchStartRecommendations"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("BatchStartRecommendations").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(batchStartRecommendationsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new BatchStartRecommendationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the CancelReplicationTaskAssessmentRun operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.CancelReplicationTaskAssessmentRun * @see AWS API Documentation */ @Override public CancelReplicationTaskAssessmentRunResponse cancelReplicationTaskAssessmentRun( CancelReplicationTaskAssessmentRunRequest cancelReplicationTaskAssessmentRunRequest) throws AccessDeniedException, ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CancelReplicationTaskAssessmentRunResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(cancelReplicationTaskAssessmentRunRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CancelReplicationTaskAssessmentRun").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(cancelReplicationTaskAssessmentRunRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CancelReplicationTaskAssessmentRunRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a data provider using the provided settings. A data provider stores a data store type and location * information about your database. *

* * @param createDataProviderRequest * @return Result of the CreateDataProvider operation returned by the service. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.CreateDataProvider * @see AWS API * Documentation */ @Override public CreateDataProviderResponse createDataProvider(CreateDataProviderRequest createDataProviderRequest) throws ResourceQuotaExceededException, AccessDeniedException, ResourceAlreadyExistsException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateDataProviderResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createDataProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createDataProviderRequest .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, "CreateDataProvider"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateDataProvider").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createDataProviderRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateDataProviderRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the CreateEndpoint operation returned by the service. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceNotFoundException * The resource could not be found. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws S3AccessDeniedException * Insufficient privileges are preventing access to an Amazon S3 object. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.CreateEndpoint * @see AWS API * Documentation */ @Override public CreateEndpointResponse createEndpoint(CreateEndpointRequest createEndpointRequest) throws KmsKeyNotAccessibleException, ResourceAlreadyExistsException, ResourceQuotaExceededException, InvalidResourceStateException, ResourceNotFoundException, AccessDeniedException, S3AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateEndpointResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createEndpointRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateEndpoint").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createEndpointRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateEndpointRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the CreateEventSubscription operation returned by the service. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws ResourceNotFoundException * The resource could not be found. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws SnsInvalidTopicException * The SNS topic is invalid. * @throws SnsNoAuthorizationException * You are not authorized for the SNS subscription. * @throws KmsAccessDeniedException * The ciphertext references a key that doesn't exist or that the DMS account doesn't have access to. * @throws KmsDisabledException * The specified KMS key isn't enabled. * @throws KmsInvalidStateException * The state of the specified KMS resource isn't valid for this request. * @throws KmsNotFoundException * The specified KMS entity or resource can't be found. * @throws KmsThrottlingException * This request triggered KMS request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.CreateEventSubscription * @see AWS * API Documentation */ @Override public CreateEventSubscriptionResponse createEventSubscription(CreateEventSubscriptionRequest createEventSubscriptionRequest) throws ResourceQuotaExceededException, ResourceNotFoundException, ResourceAlreadyExistsException, SnsInvalidTopicException, SnsNoAuthorizationException, KmsAccessDeniedException, KmsDisabledException, KmsInvalidStateException, KmsNotFoundException, KmsThrottlingException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateEventSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createEventSubscriptionRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateEventSubscription").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createEventSubscriptionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateEventSubscriptionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param createFleetAdvisorCollectorRequest * @return Result of the CreateFleetAdvisorCollector operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws S3AccessDeniedException * Insufficient privileges are preventing access to an Amazon S3 object. * @throws S3ResourceNotFoundException * A specified Amazon S3 bucket, bucket folder, or other object can't be found. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.CreateFleetAdvisorCollector * @see AWS API Documentation */ @Override public CreateFleetAdvisorCollectorResponse createFleetAdvisorCollector( CreateFleetAdvisorCollectorRequest createFleetAdvisorCollectorRequest) throws InvalidResourceStateException, AccessDeniedException, S3AccessDeniedException, S3ResourceNotFoundException, ResourceQuotaExceededException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateFleetAdvisorCollectorResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createFleetAdvisorCollectorRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateFleetAdvisorCollector").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createFleetAdvisorCollectorRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateFleetAdvisorCollectorRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates the instance profile using the specified parameters. *

* * @param createInstanceProfileRequest * @return Result of the CreateInstanceProfile operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws ResourceNotFoundException * The resource could not be found. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws S3ResourceNotFoundException * A specified Amazon S3 bucket, bucket folder, or other object can't be found. * @throws S3AccessDeniedException * Insufficient privileges are preventing access to an Amazon S3 object. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.CreateInstanceProfile * @see AWS API * Documentation */ @Override public CreateInstanceProfileResponse createInstanceProfile(CreateInstanceProfileRequest createInstanceProfileRequest) throws AccessDeniedException, ResourceAlreadyExistsException, ResourceNotFoundException, ResourceQuotaExceededException, InvalidResourceStateException, KmsKeyNotAccessibleException, S3ResourceNotFoundException, S3AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateInstanceProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createInstanceProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createInstanceProfileRequest .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, "CreateInstanceProfile"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateInstanceProfile").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createInstanceProfileRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateInstanceProfileRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates the migration project using the specified parameters. *

*

* You can run this action only after you create an instance profile and data providers using CreateInstanceProfile and CreateDataProvider. *

* * @param createMigrationProjectRequest * @return Result of the CreateMigrationProject operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws ResourceNotFoundException * The resource could not be found. * @throws S3ResourceNotFoundException * A specified Amazon S3 bucket, bucket folder, or other object can't be found. * @throws S3AccessDeniedException * Insufficient privileges are preventing access to an Amazon S3 object. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.CreateMigrationProject * @see AWS * API Documentation */ @Override public CreateMigrationProjectResponse createMigrationProject(CreateMigrationProjectRequest createMigrationProjectRequest) throws AccessDeniedException, ResourceAlreadyExistsException, ResourceQuotaExceededException, ResourceNotFoundException, S3ResourceNotFoundException, S3AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateMigrationProjectResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createMigrationProjectRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createMigrationProjectRequest .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, "CreateMigrationProject"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateMigrationProject").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createMigrationProjectRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateMigrationProjectRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a configuration that you can later provide to configure and start an DMS Serverless replication. You can * also provide options to validate the configuration inputs before you start the replication. *

* * @param createReplicationConfigRequest * @return Result of the CreateReplicationConfig operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ReplicationSubnetGroupDoesNotCoverEnoughAZsException * The replication subnet group does not cover enough Availability Zones (AZs). Edit the replication subnet * group and add more AZs. * @throws InvalidSubnetException * The subnet provided isn't valid. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.CreateReplicationConfig * @see AWS * API Documentation */ @Override public CreateReplicationConfigResponse createReplicationConfig(CreateReplicationConfigRequest createReplicationConfigRequest) throws AccessDeniedException, ResourceAlreadyExistsException, ResourceNotFoundException, InvalidResourceStateException, ReplicationSubnetGroupDoesNotCoverEnoughAZsException, InvalidSubnetException, KmsKeyNotAccessibleException, ResourceQuotaExceededException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateReplicationConfigResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createReplicationConfigRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createReplicationConfigRequest .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, "CreateReplicationConfig"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateReplicationConfig").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createReplicationConfigRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateReplicationConfigRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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. *

* *

* If you don't specify a version when creating a replication instance, DMS will create the instance using the * default engine version. For information about the default engine version, see Release Notes. *

*
* * @param createReplicationInstanceRequest * @return Result of the CreateReplicationInstance operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws InsufficientResourceCapacityException * There are not enough resources allocated to the database migration. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws StorageQuotaExceededException * The storage quota has been exceeded. * @throws ResourceNotFoundException * The resource could not be found. * @throws ReplicationSubnetGroupDoesNotCoverEnoughAZsException * The replication subnet group does not cover enough Availability Zones (AZs). Edit the replication subnet * group and add more AZs. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws InvalidSubnetException * The subnet provided isn't valid. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.CreateReplicationInstance * @see AWS * API Documentation */ @Override public CreateReplicationInstanceResponse createReplicationInstance( CreateReplicationInstanceRequest createReplicationInstanceRequest) throws AccessDeniedException, ResourceAlreadyExistsException, InsufficientResourceCapacityException, ResourceQuotaExceededException, StorageQuotaExceededException, ResourceNotFoundException, ReplicationSubnetGroupDoesNotCoverEnoughAZsException, InvalidResourceStateException, InvalidSubnetException, KmsKeyNotAccessibleException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateReplicationInstanceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createReplicationInstanceRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateReplicationInstance").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createReplicationInstanceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateReplicationInstanceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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. *

*

* If a replication subnet group exists in your Amazon Web Services account, the CreateReplicationSubnetGroup action * returns the following error message: The Replication Subnet Group already exists. In this case, delete the * existing replication subnet group. To do so, use the DeleteReplicationSubnetGroup action. Optionally, choose Subnet groups in the DMS console, then choose your * subnet group. Next, choose Delete from Actions. *

* * @param createReplicationSubnetGroupRequest * @return Result of the CreateReplicationSubnetGroup operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws ResourceNotFoundException * The resource could not be found. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws ReplicationSubnetGroupDoesNotCoverEnoughAZsException * The replication subnet group does not cover enough Availability Zones (AZs). Edit the replication subnet * group and add more AZs. * @throws InvalidSubnetException * The subnet provided isn't valid. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.CreateReplicationSubnetGroup * @see AWS API Documentation */ @Override public CreateReplicationSubnetGroupResponse createReplicationSubnetGroup( CreateReplicationSubnetGroupRequest createReplicationSubnetGroupRequest) throws AccessDeniedException, ResourceAlreadyExistsException, ResourceNotFoundException, ResourceQuotaExceededException, ReplicationSubnetGroupDoesNotCoverEnoughAZsException, InvalidSubnetException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateReplicationSubnetGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createReplicationSubnetGroupRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateReplicationSubnetGroup").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createReplicationSubnetGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateReplicationSubnetGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a replication task using the specified parameters. *

* * @param createReplicationTaskRequest * @return Result of the CreateReplicationTask operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws ResourceNotFoundException * The resource could not be found. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.CreateReplicationTask * @see AWS API * Documentation */ @Override public CreateReplicationTaskResponse createReplicationTask(CreateReplicationTaskRequest createReplicationTaskRequest) throws AccessDeniedException, InvalidResourceStateException, ResourceAlreadyExistsException, ResourceNotFoundException, KmsKeyNotAccessibleException, ResourceQuotaExceededException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateReplicationTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createReplicationTaskRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateReplicationTask").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createReplicationTaskRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateReplicationTaskRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the specified certificate. *

* * @param deleteCertificateRequest * @return Result of the DeleteCertificate operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DeleteCertificate * @see AWS API * Documentation */ @Override public DeleteCertificateResponse deleteCertificate(DeleteCertificateRequest deleteCertificateRequest) throws ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteCertificateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteCertificateRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteCertificate").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteCertificateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteCertificateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param deleteConnectionRequest * @return Result of the DeleteConnection operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DeleteConnection * @see AWS API * Documentation */ @Override public DeleteConnectionResponse deleteConnection(DeleteConnectionRequest deleteConnectionRequest) throws AccessDeniedException, ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteConnectionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConnectionRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteConnection").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteConnectionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteConnectionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the specified data provider. *

* *

* All migration projects associated with the data provider must be deleted or modified before you can delete the * data provider. *

*
* * @param deleteDataProviderRequest * @return Result of the DeleteDataProvider operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DeleteDataProvider * @see AWS API * Documentation */ @Override public DeleteDataProviderResponse deleteDataProvider(DeleteDataProviderRequest deleteDataProviderRequest) throws AccessDeniedException, ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteDataProviderResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteDataProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDataProviderRequest .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, "DeleteDataProvider"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteDataProvider").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteDataProviderRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteDataProviderRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the specified endpoint. *

* *

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

*
*

* * @param deleteEndpointRequest * @return Result of the DeleteEndpoint operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DeleteEndpoint * @see AWS API * Documentation */ @Override public DeleteEndpointResponse deleteEndpoint(DeleteEndpointRequest deleteEndpointRequest) throws ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteEndpointResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteEndpointRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteEndpoint").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteEndpointRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteEndpointRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes an DMS event subscription. *

* * @param deleteEventSubscriptionRequest * @return Result of the DeleteEventSubscription operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DeleteEventSubscription * @see AWS * API Documentation */ @Override public DeleteEventSubscriptionResponse deleteEventSubscription(DeleteEventSubscriptionRequest deleteEventSubscriptionRequest) throws ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteEventSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteEventSubscriptionRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteEventSubscription").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteEventSubscriptionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteEventSubscriptionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the specified Fleet Advisor collector. *

* * @param deleteFleetAdvisorCollectorRequest * @return Result of the DeleteFleetAdvisorCollector operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws CollectorNotFoundException * The specified collector doesn't exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DeleteFleetAdvisorCollector * @see AWS API Documentation */ @Override public DeleteFleetAdvisorCollectorResponse deleteFleetAdvisorCollector( DeleteFleetAdvisorCollectorRequest deleteFleetAdvisorCollectorRequest) throws InvalidResourceStateException, CollectorNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteFleetAdvisorCollectorResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteFleetAdvisorCollectorRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteFleetAdvisorCollector").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteFleetAdvisorCollectorRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteFleetAdvisorCollectorRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the specified Fleet Advisor collector databases. *

* * @param deleteFleetAdvisorDatabasesRequest * @return Result of the DeleteFleetAdvisorDatabases operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidOperationException * The action or operation requested isn't valid. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DeleteFleetAdvisorDatabases * @see AWS API Documentation */ @Override public DeleteFleetAdvisorDatabasesResponse deleteFleetAdvisorDatabases( DeleteFleetAdvisorDatabasesRequest deleteFleetAdvisorDatabasesRequest) throws ResourceNotFoundException, InvalidOperationException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteFleetAdvisorDatabasesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteFleetAdvisorDatabasesRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteFleetAdvisorDatabases").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteFleetAdvisorDatabasesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteFleetAdvisorDatabasesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the specified instance profile. *

* *

* All migration projects associated with the instance profile must be deleted or modified before you can delete the * instance profile. *

*
* * @param deleteInstanceProfileRequest * @return Result of the DeleteInstanceProfile operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DeleteInstanceProfile * @see AWS API * Documentation */ @Override public DeleteInstanceProfileResponse deleteInstanceProfile(DeleteInstanceProfileRequest deleteInstanceProfileRequest) throws AccessDeniedException, ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteInstanceProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteInstanceProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteInstanceProfileRequest .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, "DeleteInstanceProfile"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteInstanceProfile").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteInstanceProfileRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteInstanceProfileRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the specified migration project. *

* *

* The migration project must be closed before you can delete it. *

*
* * @param deleteMigrationProjectRequest * @return Result of the DeleteMigrationProject operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DeleteMigrationProject * @see AWS * API Documentation */ @Override public DeleteMigrationProjectResponse deleteMigrationProject(DeleteMigrationProjectRequest deleteMigrationProjectRequest) throws AccessDeniedException, ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteMigrationProjectResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteMigrationProjectRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteMigrationProjectRequest .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, "DeleteMigrationProject"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteMigrationProject").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteMigrationProjectRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteMigrationProjectRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes an DMS Serverless replication configuration. This effectively deprovisions any and all replications that * use this configuration. You can't delete the configuration for an DMS Serverless replication that is ongoing. You * can delete the configuration when the replication is in a non-RUNNING and non-STARTING state. *

* * @param deleteReplicationConfigRequest * @return Result of the DeleteReplicationConfig operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DeleteReplicationConfig * @see AWS * API Documentation */ @Override public DeleteReplicationConfigResponse deleteReplicationConfig(DeleteReplicationConfigRequest deleteReplicationConfigRequest) throws AccessDeniedException, ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteReplicationConfigResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteReplicationConfigRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteReplicationConfigRequest .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, "DeleteReplicationConfig"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteReplicationConfig").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteReplicationConfigRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteReplicationConfigRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DeleteReplicationInstance operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DeleteReplicationInstance * @see AWS * API Documentation */ @Override public DeleteReplicationInstanceResponse deleteReplicationInstance( DeleteReplicationInstanceRequest deleteReplicationInstanceRequest) throws InvalidResourceStateException, ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteReplicationInstanceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteReplicationInstanceRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteReplicationInstance").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteReplicationInstanceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteReplicationInstanceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a subnet group. *

* * @param deleteReplicationSubnetGroupRequest * @return Result of the DeleteReplicationSubnetGroup operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DeleteReplicationSubnetGroup * @see AWS API Documentation */ @Override public DeleteReplicationSubnetGroupResponse deleteReplicationSubnetGroup( DeleteReplicationSubnetGroupRequest deleteReplicationSubnetGroupRequest) throws InvalidResourceStateException, ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteReplicationSubnetGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteReplicationSubnetGroupRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteReplicationSubnetGroup").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteReplicationSubnetGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteReplicationSubnetGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the specified replication task. *

* * @param deleteReplicationTaskRequest * @return Result of the DeleteReplicationTask operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DeleteReplicationTask * @see AWS API * Documentation */ @Override public DeleteReplicationTaskResponse deleteReplicationTask(DeleteReplicationTaskRequest deleteReplicationTaskRequest) throws ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteReplicationTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteReplicationTaskRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteReplicationTask").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteReplicationTaskRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteReplicationTaskRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DeleteReplicationTaskAssessmentRun operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DeleteReplicationTaskAssessmentRun * @see AWS API Documentation */ @Override public DeleteReplicationTaskAssessmentRunResponse deleteReplicationTaskAssessmentRun( DeleteReplicationTaskAssessmentRunRequest deleteReplicationTaskAssessmentRunRequest) throws AccessDeniedException, ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteReplicationTaskAssessmentRunResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteReplicationTaskAssessmentRunRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteReplicationTaskAssessmentRun").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteReplicationTaskAssessmentRunRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteReplicationTaskAssessmentRunRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DescribeAccountAttributes operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeAccountAttributes * @see AWS * API Documentation */ @Override public DescribeAccountAttributesResponse describeAccountAttributes( DescribeAccountAttributesRequest describeAccountAttributesRequest) throws AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeAccountAttributesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeAccountAttributesRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeAccountAttributes").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeAccountAttributesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeAccountAttributesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DescribeApplicableIndividualAssessments operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeApplicableIndividualAssessments * @see AWS API Documentation */ @Override public DescribeApplicableIndividualAssessmentsResponse describeApplicableIndividualAssessments( DescribeApplicableIndividualAssessmentsRequest describeApplicableIndividualAssessmentsRequest) throws AccessDeniedException, ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeApplicableIndividualAssessmentsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeApplicableIndividualAssessmentsRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeApplicableIndividualAssessments").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration) .withInput(describeApplicableIndividualAssessmentsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeApplicableIndividualAssessmentsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Provides a description of the certificate. *

* * @param describeCertificatesRequest * @return Result of the DescribeCertificates operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeCertificates * @see AWS API * Documentation */ @Override public DescribeCertificatesResponse describeCertificates(DescribeCertificatesRequest describeCertificatesRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeCertificatesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeCertificatesRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeCertificates").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeCertificatesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeCertificatesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DescribeConnections operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeConnections * @see AWS API * Documentation */ @Override public DescribeConnectionsResponse describeConnections(DescribeConnectionsRequest describeConnectionsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeConnectionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeConnectionsRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeConnections").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeConnectionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeConnectionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns configuration parameters for a schema conversion project. *

* * @param describeConversionConfigurationRequest * @return Result of the DescribeConversionConfiguration operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeConversionConfiguration * @see AWS API Documentation */ @Override public DescribeConversionConfigurationResponse describeConversionConfiguration( DescribeConversionConfigurationRequest describeConversionConfigurationRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeConversionConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeConversionConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeConversionConfigurationRequest.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, "DescribeConversionConfiguration"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeConversionConfiguration").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeConversionConfigurationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeConversionConfigurationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a paginated list of data providers for your account in the current region. *

* * @param describeDataProvidersRequest * @return Result of the DescribeDataProviders operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeDataProviders * @see AWS API * Documentation */ @Override public DescribeDataProvidersResponse describeDataProviders(DescribeDataProvidersRequest describeDataProvidersRequest) throws ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeDataProvidersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDataProvidersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDataProvidersRequest .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, "DescribeDataProviders"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeDataProviders").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeDataProvidersRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDataProvidersRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param describeEndpointSettingsRequest * @return Result of the DescribeEndpointSettings operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeEndpointSettings * @see AWS * API Documentation */ @Override public DescribeEndpointSettingsResponse describeEndpointSettings( DescribeEndpointSettingsRequest describeEndpointSettingsRequest) throws AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeEndpointSettingsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEndpointSettingsRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEndpointSettings").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeEndpointSettingsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeEndpointSettingsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about the type of endpoints available. *

* * @param describeEndpointTypesRequest * @return Result of the DescribeEndpointTypes operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeEndpointTypes * @see AWS API * Documentation */ @Override public DescribeEndpointTypesResponse describeEndpointTypes(DescribeEndpointTypesRequest describeEndpointTypesRequest) throws AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeEndpointTypesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEndpointTypesRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeEndpointTypes").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeEndpointTypesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeEndpointTypesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param describeEndpointsRequest * @return Result of the DescribeEndpoints operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeEndpoints * @see AWS API * Documentation */ @Override public DescribeEndpointsResponse describeEndpoints(DescribeEndpointsRequest describeEndpointsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeEndpointsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEndpointsRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeEndpoints").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeEndpointsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeEndpointsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about the replication instance versions used in the project. *

* * @param describeEngineVersionsRequest * @return Result of the DescribeEngineVersions operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeEngineVersions * @see AWS * API Documentation */ @Override public DescribeEngineVersionsResponse describeEngineVersions(DescribeEngineVersionsRequest describeEngineVersionsRequest) throws AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeEngineVersionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEngineVersionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEngineVersionsRequest .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, "DescribeEngineVersions"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEngineVersions").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeEngineVersionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeEngineVersionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DescribeEventCategories operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeEventCategories * @see AWS * API Documentation */ @Override public DescribeEventCategoriesResponse describeEventCategories(DescribeEventCategoriesRequest describeEventCategoriesRequest) throws AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeEventCategoriesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEventCategoriesRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEventCategories").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeEventCategoriesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeEventCategoriesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DescribeEventSubscriptions operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeEventSubscriptions * @see AWS API Documentation */ @Override public DescribeEventSubscriptionsResponse describeEventSubscriptions( DescribeEventSubscriptionsRequest describeEventSubscriptionsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeEventSubscriptionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEventSubscriptionsRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEventSubscriptions").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeEventSubscriptionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeEventSubscriptionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DescribeEvents operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeEvents * @see AWS API * Documentation */ @Override public DescribeEventsResponse describeEvents(DescribeEventsRequest describeEventsRequest) throws AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeEventsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEventsRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeEvents").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeEventsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeEventsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a paginated list of extension pack associations for the specified migration project. An extension pack is * an add-on module that emulates functions present in a source database that are required when converting objects * to the target database. *

* * @param describeExtensionPackAssociationsRequest * @return Result of the DescribeExtensionPackAssociations operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeExtensionPackAssociations * @see AWS API Documentation */ @Override public DescribeExtensionPackAssociationsResponse describeExtensionPackAssociations( DescribeExtensionPackAssociationsRequest describeExtensionPackAssociationsRequest) throws AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeExtensionPackAssociationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeExtensionPackAssociationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeExtensionPackAssociationsRequest.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, "DescribeExtensionPackAssociations"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeExtensionPackAssociations").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeExtensionPackAssociationsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeExtensionPackAssociationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param describeFleetAdvisorCollectorsRequest * @return Result of the DescribeFleetAdvisorCollectors operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeFleetAdvisorCollectors * @see AWS API Documentation */ @Override public DescribeFleetAdvisorCollectorsResponse describeFleetAdvisorCollectors( DescribeFleetAdvisorCollectorsRequest describeFleetAdvisorCollectorsRequest) throws InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeFleetAdvisorCollectorsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeFleetAdvisorCollectorsRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeFleetAdvisorCollectors").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeFleetAdvisorCollectorsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeFleetAdvisorCollectorsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param describeFleetAdvisorDatabasesRequest * @return Result of the DescribeFleetAdvisorDatabases operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeFleetAdvisorDatabases * @see AWS API Documentation */ @Override public DescribeFleetAdvisorDatabasesResponse describeFleetAdvisorDatabases( DescribeFleetAdvisorDatabasesRequest describeFleetAdvisorDatabasesRequest) throws InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeFleetAdvisorDatabasesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeFleetAdvisorDatabasesRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeFleetAdvisorDatabases").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeFleetAdvisorDatabasesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeFleetAdvisorDatabasesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param describeFleetAdvisorLsaAnalysisRequest * @return Result of the DescribeFleetAdvisorLsaAnalysis operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeFleetAdvisorLsaAnalysis * @see AWS API Documentation */ @Override public DescribeFleetAdvisorLsaAnalysisResponse describeFleetAdvisorLsaAnalysis( DescribeFleetAdvisorLsaAnalysisRequest describeFleetAdvisorLsaAnalysisRequest) throws InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeFleetAdvisorLsaAnalysisResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeFleetAdvisorLsaAnalysisRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeFleetAdvisorLsaAnalysis").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeFleetAdvisorLsaAnalysisRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeFleetAdvisorLsaAnalysisRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param describeFleetAdvisorSchemaObjectSummaryRequest * @return Result of the DescribeFleetAdvisorSchemaObjectSummary operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeFleetAdvisorSchemaObjectSummary * @see AWS API Documentation */ @Override public DescribeFleetAdvisorSchemaObjectSummaryResponse describeFleetAdvisorSchemaObjectSummary( DescribeFleetAdvisorSchemaObjectSummaryRequest describeFleetAdvisorSchemaObjectSummaryRequest) throws InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeFleetAdvisorSchemaObjectSummaryResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeFleetAdvisorSchemaObjectSummaryRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeFleetAdvisorSchemaObjectSummary").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration) .withInput(describeFleetAdvisorSchemaObjectSummaryRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeFleetAdvisorSchemaObjectSummaryRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param describeFleetAdvisorSchemasRequest * @return Result of the DescribeFleetAdvisorSchemas operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeFleetAdvisorSchemas * @see AWS API Documentation */ @Override public DescribeFleetAdvisorSchemasResponse describeFleetAdvisorSchemas( DescribeFleetAdvisorSchemasRequest describeFleetAdvisorSchemasRequest) throws InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeFleetAdvisorSchemasResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeFleetAdvisorSchemasRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeFleetAdvisorSchemas").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeFleetAdvisorSchemasRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeFleetAdvisorSchemasRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a paginated list of instance profiles for your account in the current region. *

* * @param describeInstanceProfilesRequest * @return Result of the DescribeInstanceProfiles operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeInstanceProfiles * @see AWS * API Documentation */ @Override public DescribeInstanceProfilesResponse describeInstanceProfiles( DescribeInstanceProfilesRequest describeInstanceProfilesRequest) throws ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeInstanceProfilesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeInstanceProfilesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeInstanceProfilesRequest .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, "DescribeInstanceProfiles"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeInstanceProfiles").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeInstanceProfilesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeInstanceProfilesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a paginated list of metadata model assessments for your account in the current region. *

* * @param describeMetadataModelAssessmentsRequest * @return Result of the DescribeMetadataModelAssessments operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeMetadataModelAssessments * @see AWS API Documentation */ @Override public DescribeMetadataModelAssessmentsResponse describeMetadataModelAssessments( DescribeMetadataModelAssessmentsRequest describeMetadataModelAssessmentsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeMetadataModelAssessmentsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeMetadataModelAssessmentsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeMetadataModelAssessmentsRequest.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, "DescribeMetadataModelAssessments"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeMetadataModelAssessments").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeMetadataModelAssessmentsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeMetadataModelAssessmentsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a paginated list of metadata model conversions for a migration project. *

* * @param describeMetadataModelConversionsRequest * @return Result of the DescribeMetadataModelConversions operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeMetadataModelConversions * @see AWS API Documentation */ @Override public DescribeMetadataModelConversionsResponse describeMetadataModelConversions( DescribeMetadataModelConversionsRequest describeMetadataModelConversionsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeMetadataModelConversionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeMetadataModelConversionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeMetadataModelConversionsRequest.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, "DescribeMetadataModelConversions"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeMetadataModelConversions").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeMetadataModelConversionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeMetadataModelConversionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a paginated list of metadata model exports. *

* * @param describeMetadataModelExportsAsScriptRequest * @return Result of the DescribeMetadataModelExportsAsScript operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeMetadataModelExportsAsScript * @see AWS API Documentation */ @Override public DescribeMetadataModelExportsAsScriptResponse describeMetadataModelExportsAsScript( DescribeMetadataModelExportsAsScriptRequest describeMetadataModelExportsAsScriptRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeMetadataModelExportsAsScriptResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeMetadataModelExportsAsScriptRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeMetadataModelExportsAsScriptRequest.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, "DescribeMetadataModelExportsAsScript"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeMetadataModelExportsAsScript").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeMetadataModelExportsAsScriptRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeMetadataModelExportsAsScriptRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a paginated list of metadata model exports. *

* * @param describeMetadataModelExportsToTargetRequest * @return Result of the DescribeMetadataModelExportsToTarget operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeMetadataModelExportsToTarget * @see AWS API Documentation */ @Override public DescribeMetadataModelExportsToTargetResponse describeMetadataModelExportsToTarget( DescribeMetadataModelExportsToTargetRequest describeMetadataModelExportsToTargetRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeMetadataModelExportsToTargetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeMetadataModelExportsToTargetRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeMetadataModelExportsToTargetRequest.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, "DescribeMetadataModelExportsToTarget"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeMetadataModelExportsToTarget").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeMetadataModelExportsToTargetRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeMetadataModelExportsToTargetRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a paginated list of metadata model imports. *

* * @param describeMetadataModelImportsRequest * @return Result of the DescribeMetadataModelImports operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeMetadataModelImports * @see AWS API Documentation */ @Override public DescribeMetadataModelImportsResponse describeMetadataModelImports( DescribeMetadataModelImportsRequest describeMetadataModelImportsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeMetadataModelImportsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeMetadataModelImportsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeMetadataModelImportsRequest .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, "DescribeMetadataModelImports"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeMetadataModelImports").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeMetadataModelImportsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeMetadataModelImportsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a paginated list of migration projects for your account in the current region. *

* * @param describeMigrationProjectsRequest * @return Result of the DescribeMigrationProjects operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeMigrationProjects * @see AWS * API Documentation */ @Override public DescribeMigrationProjectsResponse describeMigrationProjects( DescribeMigrationProjectsRequest describeMigrationProjectsRequest) throws ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeMigrationProjectsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeMigrationProjectsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeMigrationProjectsRequest .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, "DescribeMigrationProjects"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeMigrationProjects").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeMigrationProjectsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeMigrationProjectsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param describeOrderableReplicationInstancesRequest * @return Result of the DescribeOrderableReplicationInstances operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeOrderableReplicationInstances * @see AWS API Documentation */ @Override public DescribeOrderableReplicationInstancesResponse describeOrderableReplicationInstances( DescribeOrderableReplicationInstancesRequest describeOrderableReplicationInstancesRequest) throws AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeOrderableReplicationInstancesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeOrderableReplicationInstancesRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeOrderableReplicationInstances").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration) .withInput(describeOrderableReplicationInstancesRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeOrderableReplicationInstancesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* For internal use only *

* * @param describePendingMaintenanceActionsRequest * @return Result of the DescribePendingMaintenanceActions operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribePendingMaintenanceActions * @see AWS API Documentation */ @Override public DescribePendingMaintenanceActionsResponse describePendingMaintenanceActions( DescribePendingMaintenanceActionsRequest describePendingMaintenanceActionsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribePendingMaintenanceActionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describePendingMaintenanceActionsRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribePendingMaintenanceActions").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describePendingMaintenanceActionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribePendingMaintenanceActionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a paginated list of limitations for recommendations of target Amazon Web Services engines. *

* * @param describeRecommendationLimitationsRequest * @return Result of the DescribeRecommendationLimitations operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeRecommendationLimitations * @see AWS API Documentation */ @Override public DescribeRecommendationLimitationsResponse describeRecommendationLimitations( DescribeRecommendationLimitationsRequest describeRecommendationLimitationsRequest) throws InvalidResourceStateException, AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeRecommendationLimitationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeRecommendationLimitationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeRecommendationLimitationsRequest.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, "DescribeRecommendationLimitations"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeRecommendationLimitations").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeRecommendationLimitationsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeRecommendationLimitationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a paginated list of target engine recommendations for your source databases. *

* * @param describeRecommendationsRequest * @return Result of the DescribeRecommendations operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeRecommendations * @see AWS * API Documentation */ @Override public DescribeRecommendationsResponse describeRecommendations(DescribeRecommendationsRequest describeRecommendationsRequest) throws InvalidResourceStateException, AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeRecommendationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeRecommendationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeRecommendationsRequest .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, "DescribeRecommendations"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeRecommendations").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeRecommendationsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeRecommendationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns the status of the RefreshSchemas operation. *

* * @param describeRefreshSchemasStatusRequest * @return Result of the DescribeRefreshSchemasStatus operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeRefreshSchemasStatus * @see AWS API Documentation */ @Override public DescribeRefreshSchemasStatusResponse describeRefreshSchemasStatus( DescribeRefreshSchemasStatusRequest describeRefreshSchemasStatusRequest) throws InvalidResourceStateException, ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeRefreshSchemasStatusResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeRefreshSchemasStatusRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeRefreshSchemasStatus").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeRefreshSchemasStatusRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeRefreshSchemasStatusRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns one or more existing DMS Serverless replication configurations as a list of structures. *

* * @param describeReplicationConfigsRequest * @return Result of the DescribeReplicationConfigs operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeReplicationConfigs * @see AWS API Documentation */ @Override public DescribeReplicationConfigsResponse describeReplicationConfigs( DescribeReplicationConfigsRequest describeReplicationConfigsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeReplicationConfigsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeReplicationConfigsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReplicationConfigsRequest .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, "DescribeReplicationConfigs"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationConfigs").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeReplicationConfigsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeReplicationConfigsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param describeReplicationInstanceTaskLogsRequest * @return Result of the DescribeReplicationInstanceTaskLogs operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeReplicationInstanceTaskLogs * @see AWS API Documentation */ @Override public DescribeReplicationInstanceTaskLogsResponse describeReplicationInstanceTaskLogs( DescribeReplicationInstanceTaskLogsRequest describeReplicationInstanceTaskLogsRequest) throws ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeReplicationInstanceTaskLogsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeReplicationInstanceTaskLogsRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationInstanceTaskLogs").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeReplicationInstanceTaskLogsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeReplicationInstanceTaskLogsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param describeReplicationInstancesRequest * @return Result of the DescribeReplicationInstances operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeReplicationInstances * @see AWS API Documentation */ @Override public DescribeReplicationInstancesResponse describeReplicationInstances( DescribeReplicationInstancesRequest describeReplicationInstancesRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeReplicationInstancesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeReplicationInstancesRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationInstances").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeReplicationInstancesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeReplicationInstancesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about the replication subnet groups. *

* * @param describeReplicationSubnetGroupsRequest * @return Result of the DescribeReplicationSubnetGroups operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeReplicationSubnetGroups * @see AWS API Documentation */ @Override public DescribeReplicationSubnetGroupsResponse describeReplicationSubnetGroups( DescribeReplicationSubnetGroupsRequest describeReplicationSubnetGroupsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeReplicationSubnetGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeReplicationSubnetGroupsRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationSubnetGroups").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeReplicationSubnetGroupsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeReplicationSubnetGroupsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns table and schema statistics for one or more provisioned replications that use a given DMS Serverless * replication configuration. *

* * @param describeReplicationTableStatisticsRequest * @return Result of the DescribeReplicationTableStatistics operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeReplicationTableStatistics * @see AWS API Documentation */ @Override public DescribeReplicationTableStatisticsResponse describeReplicationTableStatistics( DescribeReplicationTableStatisticsRequest describeReplicationTableStatisticsRequest) throws ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeReplicationTableStatisticsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeReplicationTableStatisticsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReplicationTableStatisticsRequest.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, "DescribeReplicationTableStatistics"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationTableStatistics").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeReplicationTableStatisticsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeReplicationTableStatisticsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DescribeReplicationTaskAssessmentResults operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeReplicationTaskAssessmentResults * @see AWS API Documentation */ @Override public DescribeReplicationTaskAssessmentResultsResponse describeReplicationTaskAssessmentResults( DescribeReplicationTaskAssessmentResultsRequest describeReplicationTaskAssessmentResultsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeReplicationTaskAssessmentResultsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( describeReplicationTaskAssessmentResultsRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationTaskAssessmentResults").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration) .withInput(describeReplicationTaskAssessmentResultsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeReplicationTaskAssessmentResultsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DescribeReplicationTaskAssessmentRuns operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeReplicationTaskAssessmentRuns * @see AWS API Documentation */ @Override public DescribeReplicationTaskAssessmentRunsResponse describeReplicationTaskAssessmentRuns( DescribeReplicationTaskAssessmentRunsRequest describeReplicationTaskAssessmentRunsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeReplicationTaskAssessmentRunsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeReplicationTaskAssessmentRunsRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationTaskAssessmentRuns").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration) .withInput(describeReplicationTaskAssessmentRunsRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeReplicationTaskAssessmentRunsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DescribeReplicationTaskIndividualAssessments operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeReplicationTaskIndividualAssessments * @see AWS API Documentation */ @Override public DescribeReplicationTaskIndividualAssessmentsResponse describeReplicationTaskIndividualAssessments( DescribeReplicationTaskIndividualAssessmentsRequest describeReplicationTaskIndividualAssessmentsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeReplicationTaskIndividualAssessmentsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( describeReplicationTaskIndividualAssessmentsRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationTaskIndividualAssessments") .withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withInput(describeReplicationTaskIndividualAssessmentsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeReplicationTaskIndividualAssessmentsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param describeReplicationTasksRequest * @return Result of the DescribeReplicationTasks operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeReplicationTasks * @see AWS * API Documentation */ @Override public DescribeReplicationTasksResponse describeReplicationTasks( DescribeReplicationTasksRequest describeReplicationTasksRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeReplicationTasksResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeReplicationTasksRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationTasks").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeReplicationTasksRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeReplicationTasksRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Provides details on replication progress by returning status information for one or more provisioned DMS * Serverless replications. *

* * @param describeReplicationsRequest * @return Result of the DescribeReplications operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeReplications * @see AWS API * Documentation */ @Override public DescribeReplicationsResponse describeReplications(DescribeReplicationsRequest describeReplicationsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeReplicationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeReplicationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReplicationsRequest .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, "DescribeReplications"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeReplications").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeReplicationsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeReplicationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

*

* * @param describeSchemasRequest * @return Result of the DescribeSchemas operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeSchemas * @see AWS API * Documentation */ @Override public DescribeSchemasResponse describeSchemas(DescribeSchemasRequest describeSchemasRequest) throws InvalidResourceStateException, ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeSchemasResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeSchemasRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeSchemas").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeSchemasRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeSchemasRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DescribeTableStatistics operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.DescribeTableStatistics * @see AWS * API Documentation */ @Override public DescribeTableStatisticsResponse describeTableStatistics(DescribeTableStatisticsRequest describeTableStatisticsRequest) throws ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeTableStatisticsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeTableStatisticsRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeTableStatistics").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(describeTableStatisticsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeTableStatisticsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Saves a copy of a database migration assessment report to your Amazon S3 bucket. DMS can save your assessment * report as a comma-separated value (CSV) or a PDF file. *

* * @param exportMetadataModelAssessmentRequest * @return Result of the ExportMetadataModelAssessment operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.ExportMetadataModelAssessment * @see AWS API Documentation */ @Override public ExportMetadataModelAssessmentResponse exportMetadataModelAssessment( ExportMetadataModelAssessmentRequest exportMetadataModelAssessmentRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ExportMetadataModelAssessmentResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(exportMetadataModelAssessmentRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, exportMetadataModelAssessmentRequest.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, "ExportMetadataModelAssessment"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ExportMetadataModelAssessment").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(exportMetadataModelAssessmentRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ExportMetadataModelAssessmentRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Uploads the specified certificate. *

* * @param importCertificateRequest * @return Result of the ImportCertificate operation returned by the service. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws InvalidCertificateException * The certificate was not valid. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.ImportCertificate * @see AWS API * Documentation */ @Override public ImportCertificateResponse importCertificate(ImportCertificateRequest importCertificateRequest) throws ResourceAlreadyExistsException, InvalidCertificateException, ResourceQuotaExceededException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ImportCertificateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(importCertificateRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ImportCertificate").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(importCertificateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ImportCertificateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

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

* Modifies the specified schema conversion configuration using the provided parameters. *

* * @param modifyConversionConfigurationRequest * @return Result of the ModifyConversionConfiguration operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.ModifyConversionConfiguration * @see AWS API Documentation */ @Override public ModifyConversionConfigurationResponse modifyConversionConfiguration( ModifyConversionConfigurationRequest modifyConversionConfigurationRequest) throws ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ModifyConversionConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyConversionConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyConversionConfigurationRequest.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, "ModifyConversionConfiguration"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyConversionConfiguration").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(modifyConversionConfigurationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyConversionConfigurationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Modifies the specified data provider using the provided settings. *

* *

* You must remove the data provider from all migration projects before you can modify it. *

*
* * @param modifyDataProviderRequest * @return Result of the ModifyDataProvider operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.ModifyDataProvider * @see AWS API * Documentation */ @Override public ModifyDataProviderResponse modifyDataProvider(ModifyDataProviderRequest modifyDataProviderRequest) throws AccessDeniedException, ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ModifyDataProviderResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyDataProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyDataProviderRequest .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, "ModifyDataProvider"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ModifyDataProvider").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(modifyDataProviderRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyDataProviderRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the ModifyEndpoint operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceNotFoundException * The resource could not be found. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.ModifyEndpoint * @see AWS API * Documentation */ @Override public ModifyEndpointResponse modifyEndpoint(ModifyEndpointRequest modifyEndpointRequest) throws InvalidResourceStateException, ResourceNotFoundException, ResourceAlreadyExistsException, KmsKeyNotAccessibleException, AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ModifyEndpointResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyEndpointRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ModifyEndpoint").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(modifyEndpointRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyEndpointRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Modifies an existing DMS event notification subscription. *

* * @param modifyEventSubscriptionRequest * @return Result of the ModifyEventSubscription operation returned by the service. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws ResourceNotFoundException * The resource could not be found. * @throws SnsInvalidTopicException * The SNS topic is invalid. * @throws SnsNoAuthorizationException * You are not authorized for the SNS subscription. * @throws KmsAccessDeniedException * The ciphertext references a key that doesn't exist or that the DMS account doesn't have access to. * @throws KmsDisabledException * The specified KMS key isn't enabled. * @throws KmsInvalidStateException * The state of the specified KMS resource isn't valid for this request. * @throws KmsNotFoundException * The specified KMS entity or resource can't be found. * @throws KmsThrottlingException * This request triggered KMS request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.ModifyEventSubscription * @see AWS * API Documentation */ @Override public ModifyEventSubscriptionResponse modifyEventSubscription(ModifyEventSubscriptionRequest modifyEventSubscriptionRequest) throws ResourceQuotaExceededException, ResourceNotFoundException, SnsInvalidTopicException, SnsNoAuthorizationException, KmsAccessDeniedException, KmsDisabledException, KmsInvalidStateException, KmsNotFoundException, KmsThrottlingException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ModifyEventSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyEventSubscriptionRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyEventSubscription").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(modifyEventSubscriptionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyEventSubscriptionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Modifies the specified instance profile using the provided parameters. *

* *

* All migration projects associated with the instance profile must be deleted or modified before you can modify the * instance profile. *

*
* * @param modifyInstanceProfileRequest * @return Result of the ModifyInstanceProfile operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws S3ResourceNotFoundException * A specified Amazon S3 bucket, bucket folder, or other object can't be found. * @throws S3AccessDeniedException * Insufficient privileges are preventing access to an Amazon S3 object. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.ModifyInstanceProfile * @see AWS API * Documentation */ @Override public ModifyInstanceProfileResponse modifyInstanceProfile(ModifyInstanceProfileRequest modifyInstanceProfileRequest) throws AccessDeniedException, ResourceNotFoundException, InvalidResourceStateException, KmsKeyNotAccessibleException, S3ResourceNotFoundException, S3AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ModifyInstanceProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyInstanceProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyInstanceProfileRequest .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, "ModifyInstanceProfile"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ModifyInstanceProfile").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(modifyInstanceProfileRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyInstanceProfileRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Modifies the specified migration project using the provided parameters. *

* *

* The migration project must be closed before you can modify it. *

*
* * @param modifyMigrationProjectRequest * @return Result of the ModifyMigrationProject operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws S3ResourceNotFoundException * A specified Amazon S3 bucket, bucket folder, or other object can't be found. * @throws S3AccessDeniedException * Insufficient privileges are preventing access to an Amazon S3 object. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.ModifyMigrationProject * @see AWS * API Documentation */ @Override public ModifyMigrationProjectResponse modifyMigrationProject(ModifyMigrationProjectRequest modifyMigrationProjectRequest) throws AccessDeniedException, ResourceNotFoundException, InvalidResourceStateException, S3ResourceNotFoundException, S3AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ModifyMigrationProjectResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyMigrationProjectRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyMigrationProjectRequest .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, "ModifyMigrationProject"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyMigrationProject").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(modifyMigrationProjectRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyMigrationProjectRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Modifies an existing DMS Serverless replication configuration that you can use to start a replication. This * command includes input validation and logic to check the state of any replication that uses this configuration. * You can only modify a replication configuration before any replication that uses it has started. As soon as you * have initially started a replication with a given configuiration, you can't modify that configuration, even if * you stop it. *

*

* Other run statuses that allow you to run this command include FAILED and CREATED. A provisioning state that * allows you to run this command is FAILED_PROVISION. *

* * @param modifyReplicationConfigRequest * @return Result of the ModifyReplicationConfig operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws ReplicationSubnetGroupDoesNotCoverEnoughAZsException * The replication subnet group does not cover enough Availability Zones (AZs). Edit the replication subnet * group and add more AZs. * @throws InvalidSubnetException * The subnet provided isn't valid. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.ModifyReplicationConfig * @see AWS * API Documentation */ @Override public ModifyReplicationConfigResponse modifyReplicationConfig(ModifyReplicationConfigRequest modifyReplicationConfigRequest) throws AccessDeniedException, ResourceNotFoundException, ReplicationSubnetGroupDoesNotCoverEnoughAZsException, InvalidSubnetException, KmsKeyNotAccessibleException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ModifyReplicationConfigResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyReplicationConfigRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyReplicationConfigRequest .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, "ModifyReplicationConfig"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyReplicationConfig").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(modifyReplicationConfigRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyReplicationConfigRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the ModifyReplicationInstance operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws ResourceNotFoundException * The resource could not be found. * @throws InsufficientResourceCapacityException * There are not enough resources allocated to the database migration. * @throws StorageQuotaExceededException * The storage quota has been exceeded. * @throws UpgradeDependencyFailureException * An upgrade dependency is preventing the database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.ModifyReplicationInstance * @see AWS * API Documentation */ @Override public ModifyReplicationInstanceResponse modifyReplicationInstance( ModifyReplicationInstanceRequest modifyReplicationInstanceRequest) throws AccessDeniedException, InvalidResourceStateException, ResourceAlreadyExistsException, ResourceNotFoundException, InsufficientResourceCapacityException, StorageQuotaExceededException, UpgradeDependencyFailureException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ModifyReplicationInstanceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyReplicationInstanceRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyReplicationInstance").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(modifyReplicationInstanceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyReplicationInstanceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param modifyReplicationSubnetGroupRequest * @return Result of the ModifyReplicationSubnetGroup operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws SubnetAlreadyInUseException * The specified subnet is already in use. * @throws ReplicationSubnetGroupDoesNotCoverEnoughAZsException * The replication subnet group does not cover enough Availability Zones (AZs). Edit the replication subnet * group and add more AZs. * @throws InvalidSubnetException * The subnet provided isn't valid. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.ModifyReplicationSubnetGroup * @see AWS API Documentation */ @Override public ModifyReplicationSubnetGroupResponse modifyReplicationSubnetGroup( ModifyReplicationSubnetGroupRequest modifyReplicationSubnetGroupRequest) throws AccessDeniedException, ResourceNotFoundException, ResourceQuotaExceededException, SubnetAlreadyInUseException, ReplicationSubnetGroupDoesNotCoverEnoughAZsException, InvalidSubnetException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ModifyReplicationSubnetGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyReplicationSubnetGroupRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyReplicationSubnetGroup").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(modifyReplicationSubnetGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyReplicationSubnetGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the ModifyReplicationTask operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceNotFoundException * The resource could not be found. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.ModifyReplicationTask * @see AWS API * Documentation */ @Override public ModifyReplicationTaskResponse modifyReplicationTask(ModifyReplicationTaskRequest modifyReplicationTaskRequest) throws InvalidResourceStateException, ResourceNotFoundException, ResourceAlreadyExistsException, KmsKeyNotAccessibleException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ModifyReplicationTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyReplicationTaskRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ModifyReplicationTask").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(modifyReplicationTaskRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyReplicationTaskRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the MoveReplicationTask operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceNotFoundException * The resource could not be found. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.MoveReplicationTask * @see AWS API * Documentation */ @Override public MoveReplicationTaskResponse moveReplicationTask(MoveReplicationTaskRequest moveReplicationTaskRequest) throws AccessDeniedException, InvalidResourceStateException, ResourceNotFoundException, KmsKeyNotAccessibleException, ResourceQuotaExceededException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, MoveReplicationTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(moveReplicationTaskRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("MoveReplicationTask").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(moveReplicationTaskRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new MoveReplicationTaskRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param rebootReplicationInstanceRequest * @return Result of the RebootReplicationInstance operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.RebootReplicationInstance * @see AWS * API Documentation */ @Override public RebootReplicationInstanceResponse rebootReplicationInstance( RebootReplicationInstanceRequest rebootReplicationInstanceRequest) throws ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RebootReplicationInstanceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(rebootReplicationInstanceRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RebootReplicationInstance").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(rebootReplicationInstanceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RebootReplicationInstanceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the RefreshSchemas operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceNotFoundException * The resource could not be found. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.RefreshSchemas * @see AWS API * Documentation */ @Override public RefreshSchemasResponse refreshSchemas(RefreshSchemasRequest refreshSchemasRequest) throws InvalidResourceStateException, ResourceNotFoundException, KmsKeyNotAccessibleException, ResourceQuotaExceededException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, RefreshSchemasResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(refreshSchemasRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("RefreshSchemas").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(refreshSchemasRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RefreshSchemasRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Reloads the target database table with the source data for a given DMS Serverless replication configuration. *

*

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

* * @param reloadReplicationTablesRequest * @return Result of the ReloadReplicationTables operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.ReloadReplicationTables * @see AWS * API Documentation */ @Override public ReloadReplicationTablesResponse reloadReplicationTables(ReloadReplicationTablesRequest reloadReplicationTablesRequest) throws ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ReloadReplicationTablesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(reloadReplicationTablesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, reloadReplicationTablesRequest .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, "ReloadReplicationTables"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ReloadReplicationTables").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(reloadReplicationTablesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ReloadReplicationTablesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the ReloadTables operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.ReloadTables * @see AWS API * Documentation */ @Override public ReloadTablesResponse reloadTables(ReloadTablesRequest reloadTablesRequest) throws ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ReloadTablesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(reloadTablesRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ReloadTables").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(reloadTablesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ReloadTablesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param removeTagsFromResourceRequest * Removes one or more tags from an DMS resource. * @return Result of the RemoveTagsFromResource operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.RemoveTagsFromResource * @see AWS * API Documentation */ @Override public RemoveTagsFromResourceResponse removeTagsFromResource(RemoveTagsFromResourceRequest removeTagsFromResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RemoveTagsFromResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(removeTagsFromResourceRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RemoveTagsFromResource").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(removeTagsFromResourceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RemoveTagsFromResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param runFleetAdvisorLsaAnalysisRequest * @return Result of the RunFleetAdvisorLsaAnalysis operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.RunFleetAdvisorLsaAnalysis * @see AWS API Documentation */ @Override public RunFleetAdvisorLsaAnalysisResponse runFleetAdvisorLsaAnalysis( RunFleetAdvisorLsaAnalysisRequest runFleetAdvisorLsaAnalysisRequest) throws InvalidResourceStateException, ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RunFleetAdvisorLsaAnalysisResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(runFleetAdvisorLsaAnalysisRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RunFleetAdvisorLsaAnalysis").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(runFleetAdvisorLsaAnalysisRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RunFleetAdvisorLsaAnalysisRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Applies the extension pack to your target database. An extension pack is an add-on module that emulates functions * present in a source database that are required when converting objects to the target database. *

* * @param startExtensionPackAssociationRequest * @return Result of the StartExtensionPackAssociation operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws ResourceNotFoundException * The resource could not be found. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws S3ResourceNotFoundException * A specified Amazon S3 bucket, bucket folder, or other object can't be found. * @throws S3AccessDeniedException * Insufficient privileges are preventing access to an Amazon S3 object. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.StartExtensionPackAssociation * @see AWS API Documentation */ @Override public StartExtensionPackAssociationResponse startExtensionPackAssociation( StartExtensionPackAssociationRequest startExtensionPackAssociationRequest) throws AccessDeniedException, InvalidResourceStateException, ResourceAlreadyExistsException, ResourceNotFoundException, KmsKeyNotAccessibleException, ResourceQuotaExceededException, S3ResourceNotFoundException, S3AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartExtensionPackAssociationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startExtensionPackAssociationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startExtensionPackAssociationRequest.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, "StartExtensionPackAssociation"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartExtensionPackAssociation").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(startExtensionPackAssociationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartExtensionPackAssociationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a database migration assessment report by assessing the migration complexity for your source database. A * database migration assessment report summarizes all of the schema conversion tasks. It also details the action * items for database objects that can't be converted to the database engine of your target database instance. *

* * @param startMetadataModelAssessmentRequest * @return Result of the StartMetadataModelAssessment operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws ResourceNotFoundException * The resource could not be found. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws S3ResourceNotFoundException * A specified Amazon S3 bucket, bucket folder, or other object can't be found. * @throws S3AccessDeniedException * Insufficient privileges are preventing access to an Amazon S3 object. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.StartMetadataModelAssessment * @see AWS API Documentation */ @Override public StartMetadataModelAssessmentResponse startMetadataModelAssessment( StartMetadataModelAssessmentRequest startMetadataModelAssessmentRequest) throws AccessDeniedException, InvalidResourceStateException, ResourceAlreadyExistsException, ResourceNotFoundException, KmsKeyNotAccessibleException, ResourceQuotaExceededException, S3ResourceNotFoundException, S3AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartMetadataModelAssessmentResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startMetadataModelAssessmentRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startMetadataModelAssessmentRequest .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, "StartMetadataModelAssessment"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartMetadataModelAssessment").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(startMetadataModelAssessmentRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartMetadataModelAssessmentRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Converts your source database objects to a format compatible with the target database. *

* * @param startMetadataModelConversionRequest * @return Result of the StartMetadataModelConversion operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws ResourceNotFoundException * The resource could not be found. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws S3ResourceNotFoundException * A specified Amazon S3 bucket, bucket folder, or other object can't be found. * @throws S3AccessDeniedException * Insufficient privileges are preventing access to an Amazon S3 object. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.StartMetadataModelConversion * @see AWS API Documentation */ @Override public StartMetadataModelConversionResponse startMetadataModelConversion( StartMetadataModelConversionRequest startMetadataModelConversionRequest) throws AccessDeniedException, InvalidResourceStateException, ResourceAlreadyExistsException, ResourceNotFoundException, KmsKeyNotAccessibleException, ResourceQuotaExceededException, S3ResourceNotFoundException, S3AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartMetadataModelConversionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startMetadataModelConversionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startMetadataModelConversionRequest .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, "StartMetadataModelConversion"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartMetadataModelConversion").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(startMetadataModelConversionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartMetadataModelConversionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Saves your converted code to a file as a SQL script, and stores this file on your Amazon S3 bucket. *

* * @param startMetadataModelExportAsScriptRequest * @return Result of the StartMetadataModelExportAsScript operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws ResourceNotFoundException * The resource could not be found. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws S3ResourceNotFoundException * A specified Amazon S3 bucket, bucket folder, or other object can't be found. * @throws S3AccessDeniedException * Insufficient privileges are preventing access to an Amazon S3 object. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.StartMetadataModelExportAsScript * @see AWS API Documentation */ @Override public StartMetadataModelExportAsScriptResponse startMetadataModelExportAsScript( StartMetadataModelExportAsScriptRequest startMetadataModelExportAsScriptRequest) throws AccessDeniedException, InvalidResourceStateException, ResourceAlreadyExistsException, ResourceNotFoundException, KmsKeyNotAccessibleException, ResourceQuotaExceededException, S3ResourceNotFoundException, S3AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartMetadataModelExportAsScriptResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startMetadataModelExportAsScriptRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startMetadataModelExportAsScriptRequest.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, "StartMetadataModelExportAsScript"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartMetadataModelExportAsScript").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(startMetadataModelExportAsScriptRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartMetadataModelExportAsScriptRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Applies converted database objects to your target database. *

* * @param startMetadataModelExportToTargetRequest * @return Result of the StartMetadataModelExportToTarget operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws ResourceNotFoundException * The resource could not be found. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws S3ResourceNotFoundException * A specified Amazon S3 bucket, bucket folder, or other object can't be found. * @throws S3AccessDeniedException * Insufficient privileges are preventing access to an Amazon S3 object. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.StartMetadataModelExportToTarget * @see AWS API Documentation */ @Override public StartMetadataModelExportToTargetResponse startMetadataModelExportToTarget( StartMetadataModelExportToTargetRequest startMetadataModelExportToTargetRequest) throws AccessDeniedException, InvalidResourceStateException, ResourceAlreadyExistsException, ResourceNotFoundException, KmsKeyNotAccessibleException, ResourceQuotaExceededException, S3ResourceNotFoundException, S3AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartMetadataModelExportToTargetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startMetadataModelExportToTargetRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startMetadataModelExportToTargetRequest.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, "StartMetadataModelExportToTarget"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartMetadataModelExportToTarget").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(startMetadataModelExportToTargetRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartMetadataModelExportToTargetRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Loads the metadata for all the dependent database objects of the parent object. *

*

* This operation uses your project's Amazon S3 bucket as a metadata cache to improve performance. *

* * @param startMetadataModelImportRequest * @return Result of the StartMetadataModelImport operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws ResourceNotFoundException * The resource could not be found. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws S3ResourceNotFoundException * A specified Amazon S3 bucket, bucket folder, or other object can't be found. * @throws S3AccessDeniedException * Insufficient privileges are preventing access to an Amazon S3 object. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.StartMetadataModelImport * @see AWS * API Documentation */ @Override public StartMetadataModelImportResponse startMetadataModelImport( StartMetadataModelImportRequest startMetadataModelImportRequest) throws AccessDeniedException, InvalidResourceStateException, ResourceAlreadyExistsException, ResourceNotFoundException, KmsKeyNotAccessibleException, ResourceQuotaExceededException, S3ResourceNotFoundException, S3AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartMetadataModelImportResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startMetadataModelImportRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startMetadataModelImportRequest .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, "StartMetadataModelImport"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartMetadataModelImport").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(startMetadataModelImportRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartMetadataModelImportRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Starts the analysis of your source database to provide recommendations of target engines. *

*

* You can create recommendations for multiple source databases using BatchStartRecommendations. *

* * @param startRecommendationsRequest * @return Result of the StartRecommendations operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.StartRecommendations * @see AWS API * Documentation */ @Override public StartRecommendationsResponse startRecommendations(StartRecommendationsRequest startRecommendationsRequest) throws InvalidResourceStateException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartRecommendationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startRecommendationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startRecommendationsRequest .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, "StartRecommendations"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("StartRecommendations").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(startRecommendationsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartRecommendationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* For a given DMS Serverless replication configuration, DMS connects to the source endpoint and collects the * metadata to analyze the replication workload. Using this metadata, DMS then computes and provisions the required * capacity and starts replicating to the target endpoint using the server resources that DMS has provisioned for * the DMS Serverless replication. *

* * @param startReplicationRequest * @return Result of the StartReplication operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.StartReplication * @see AWS API * Documentation */ @Override public StartReplicationResponse startReplication(StartReplicationRequest startReplicationRequest) throws ResourceNotFoundException, InvalidResourceStateException, AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, StartReplicationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startReplicationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startReplicationRequest .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, "StartReplication"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("StartReplication").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(startReplicationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartReplicationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the StartReplicationTask operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.StartReplicationTask * @see AWS API * Documentation */ @Override public StartReplicationTaskResponse startReplicationTask(StartReplicationTaskRequest startReplicationTaskRequest) throws ResourceNotFoundException, InvalidResourceStateException, AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartReplicationTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startReplicationTaskRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("StartReplicationTask").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(startReplicationTaskRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartReplicationTaskRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the StartReplicationTaskAssessment operation returned by the service. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws ResourceNotFoundException * The resource could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.StartReplicationTaskAssessment * @see AWS API Documentation */ @Override public StartReplicationTaskAssessmentResponse startReplicationTaskAssessment( StartReplicationTaskAssessmentRequest startReplicationTaskAssessmentRequest) throws InvalidResourceStateException, ResourceNotFoundException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartReplicationTaskAssessmentResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startReplicationTaskAssessmentRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartReplicationTaskAssessment").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(startReplicationTaskAssessmentRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartReplicationTaskAssessmentRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the StartReplicationTaskAssessmentRun operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws KmsAccessDeniedException * The ciphertext references a key that doesn't exist or that the DMS account doesn't have access to. * @throws KmsDisabledException * The specified KMS key isn't enabled. * @throws KmsException * An Key Management Service (KMS) error is preventing access to KMS. * @throws KmsInvalidStateException * The state of the specified KMS resource isn't valid for this request. * @throws KmsNotFoundException * The specified KMS entity or resource can't be found. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws S3AccessDeniedException * Insufficient privileges are preventing access to an Amazon S3 object. * @throws S3ResourceNotFoundException * A specified Amazon S3 bucket, bucket folder, or other object can't be found. * @throws ResourceAlreadyExistsException * The resource you are attempting to create already exists. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.StartReplicationTaskAssessmentRun * @see AWS API Documentation */ @Override public StartReplicationTaskAssessmentRunResponse startReplicationTaskAssessmentRun( StartReplicationTaskAssessmentRunRequest startReplicationTaskAssessmentRunRequest) throws AccessDeniedException, ResourceNotFoundException, InvalidResourceStateException, KmsAccessDeniedException, KmsDisabledException, KmsException, KmsInvalidStateException, KmsNotFoundException, KmsKeyNotAccessibleException, S3AccessDeniedException, S3ResourceNotFoundException, ResourceAlreadyExistsException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartReplicationTaskAssessmentRunResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startReplicationTaskAssessmentRunRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartReplicationTaskAssessmentRun").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(startReplicationTaskAssessmentRunRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartReplicationTaskAssessmentRunRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* For a given DMS Serverless replication configuration, DMS stops any and all ongoing DMS Serverless replications. * This command doesn't deprovision the stopped replications. *

* * @param stopReplicationRequest * @return Result of the StopReplication operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.StopReplication * @see AWS API * Documentation */ @Override public StopReplicationResponse stopReplication(StopReplicationRequest stopReplicationRequest) throws ResourceNotFoundException, InvalidResourceStateException, AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, StopReplicationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(stopReplicationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, stopReplicationRequest .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, "StopReplication"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("StopReplication").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(stopReplicationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StopReplicationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Stops the replication task. *

* * @param stopReplicationTaskRequest * @return Result of the StopReplicationTask operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.StopReplicationTask * @see AWS API * Documentation */ @Override public StopReplicationTaskResponse stopReplicationTask(StopReplicationTaskRequest stopReplicationTaskRequest) throws ResourceNotFoundException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StopReplicationTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(stopReplicationTaskRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("StopReplicationTask").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(stopReplicationTaskRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StopReplicationTaskRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param testConnectionRequest * @return Result of the TestConnection operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws KmsKeyNotAccessibleException * DMS cannot access the KMS key. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.TestConnection * @see AWS API * Documentation */ @Override public TestConnectionResponse testConnection(TestConnectionRequest testConnectionRequest) throws ResourceNotFoundException, InvalidResourceStateException, KmsKeyNotAccessibleException, ResourceQuotaExceededException, AccessDeniedException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, TestConnectionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(testConnectionRequest, this.clientConfiguration); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("TestConnection").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(testConnectionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new TestConnectionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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.5 or higher. If any replication instances are from versions earlier than 3.4.5, the operation * raises an error and tells you to upgrade these instances to version 3.4.5 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.5, 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 Result of the UpdateSubscriptionsToEventBridge operation returned by the service. * @throws AccessDeniedException * DMS was denied access to the endpoint. Check that the role is correctly configured. * @throws InvalidResourceStateException * The resource is in a state that prevents it from being used for database migration. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws DatabaseMigrationException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample DatabaseMigrationClient.UpdateSubscriptionsToEventBridge * @see AWS API Documentation */ @Override public UpdateSubscriptionsToEventBridgeResponse updateSubscriptionsToEventBridge( UpdateSubscriptionsToEventBridgeRequest updateSubscriptionsToEventBridgeRequest) throws AccessDeniedException, InvalidResourceStateException, AwsServiceException, SdkClientException, DatabaseMigrationException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateSubscriptionsToEventBridgeResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateSubscriptionsToEventBridgeRequest, this.clientConfiguration); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateSubscriptionsToEventBridge").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(updateSubscriptionsToEventBridgeRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateSubscriptionsToEventBridgeRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** * Create an instance of {@link DatabaseMigrationWaiter} using this client. *

* Waiters created via this method are managed by the SDK and resources will be released when the service client is * closed. * * @return an instance of {@link DatabaseMigrationWaiter} */ @Override public DatabaseMigrationWaiter waiter() { return DatabaseMigrationWaiter.builder().client(this).build(); } @Override public final String serviceName() { return SERVICE_NAME; } private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration, RequestOverrideConfiguration requestOverrideConfiguration) { List publishers = null; if (requestOverrideConfiguration != null) { publishers = requestOverrideConfiguration.metricPublishers(); } if (publishers == null || publishers.isEmpty()) { publishers = clientConfiguration.option(SdkClientOption.METRIC_PUBLISHERS); } if (publishers == null) { publishers = Collections.emptyList(); } return publishers; } private HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory, JsonOperationMetadata operationMetadata) { return protocolFactory.createErrorResponseHandler(operationMetadata); } private void updateRetryStrategyClientConfiguration(SdkClientConfiguration.Builder configuration) { ClientOverrideConfiguration.Builder builder = configuration.asOverrideConfigurationBuilder(); RetryMode retryMode = builder.retryMode(); if (retryMode != null) { configuration.option(SdkClientOption.RETRY_STRATEGY, AwsRetryStrategy.forRetryMode(retryMode)); } else { Consumer> configurator = builder.retryStrategyConfigurator(); if (configurator != null) { RetryStrategy.Builder defaultBuilder = AwsRetryStrategy.defaultRetryStrategy().toBuilder(); configurator.accept(defaultBuilder); configuration.option(SdkClientOption.RETRY_STRATEGY, defaultBuilder.build()); } else { RetryStrategy retryStrategy = builder.retryStrategy(); if (retryStrategy != null) { configuration.option(SdkClientOption.RETRY_STRATEGY, retryStrategy); } } } configuration.option(SdkClientOption.CONFIGURED_RETRY_MODE, null); configuration.option(SdkClientOption.CONFIGURED_RETRY_STRATEGY, null); configuration.option(SdkClientOption.CONFIGURED_RETRY_CONFIGURATOR, null); } private SdkClientConfiguration updateSdkClientConfiguration(SdkRequest request, SdkClientConfiguration clientConfiguration) { List plugins = request.overrideConfiguration().map(c -> c.plugins()).orElse(Collections.emptyList()); SdkClientConfiguration.Builder configuration = clientConfiguration.toBuilder(); if (plugins.isEmpty()) { return configuration.build(); } DatabaseMigrationServiceClientConfigurationBuilder serviceConfigBuilder = new DatabaseMigrationServiceClientConfigurationBuilder( configuration); for (SdkPlugin plugin : plugins) { plugin.configureClient(serviceConfigBuilder); } updateRetryStrategyClientConfiguration(configuration); return configuration.build(); } 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()); } @Override public final DatabaseMigrationServiceClientConfiguration serviceClientConfiguration() { return new DatabaseMigrationServiceClientConfigurationBuilder(this.clientConfiguration.toBuilder()).build(); } @Override public void close() { clientHandler.close(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy