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

com.amazonaws.services.databasemigrationservice.AWSDatabaseMigrationServiceClient Maven / Gradle / Ivy

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

import org.w3c.dom.*;

import java.net.*;
import java.util.*;

import javax.annotation.Generated;

import org.apache.commons.logging.*;

import com.amazonaws.*;
import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.auth.*;

import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.internal.auth.*;
import com.amazonaws.metrics.*;
import com.amazonaws.regions.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.protocol.json.*;
import com.amazonaws.util.AWSRequestMetrics.Field;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.services.databasemigrationservice.AWSDatabaseMigrationServiceClientBuilder;

import com.amazonaws.AmazonServiceException;

import com.amazonaws.services.databasemigrationservice.model.*;
import com.amazonaws.services.databasemigrationservice.model.transform.*;

/**
 * Client for accessing AWS Database Migration Service. All service calls made using this client are blocking, and will
 * not return until the service call completes.
 * 

* AWS Database Migration Service *

* AWS Database Migration Service (AWS DMS) can migrate your data to and from the most widely used commercial and * open-source databases such as Oracle, PostgreSQL, Microsoft SQL Server, Amazon Redshift, MariaDB, Amazon Aurora, * MySQL, and SAP Adaptive Server Enterprise (ASE). The service supports homogeneous migrations such as Oracle to * Oracle, as well as heterogeneous migrations between different database platforms, such as Oracle to MySQL or SQL * Server to PostgreSQL. *

*

* For more information about AWS DMS, see the AWS DMS user guide at What Is AWS Database Migration Service? *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSDatabaseMigrationServiceClient extends AmazonWebServiceClient implements AWSDatabaseMigrationService { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AWSDatabaseMigrationService.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "dms"; /** Client configuration factory providing ClientConfigurations tailored to this client */ protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory(); private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory( new JsonClientMetadata() .withProtocolVersion("1.1") .withSupportsCbor(false) .withSupportsIon(false) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidCertificateFault").withModeledClass( com.amazonaws.services.databasemigrationservice.model.InvalidCertificateException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("UpgradeDependencyFailureFault").withModeledClass( com.amazonaws.services.databasemigrationservice.model.UpgradeDependencyFailureException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("SNSInvalidTopicFault").withModeledClass( com.amazonaws.services.databasemigrationservice.model.SNSInvalidTopicException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InsufficientResourceCapacityFault").withModeledClass( com.amazonaws.services.databasemigrationservice.model.InsufficientResourceCapacityException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceQuotaExceededFault").withModeledClass( com.amazonaws.services.databasemigrationservice.model.ResourceQuotaExceededException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("AccessDeniedFault").withModeledClass( com.amazonaws.services.databasemigrationservice.model.AccessDeniedException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidResourceStateFault").withModeledClass( com.amazonaws.services.databasemigrationservice.model.InvalidResourceStateException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundFault").withModeledClass( com.amazonaws.services.databasemigrationservice.model.ResourceNotFoundException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("KMSKeyNotAccessibleFault").withModeledClass( com.amazonaws.services.databasemigrationservice.model.KMSKeyNotAccessibleException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("SubnetAlreadyInUse").withModeledClass( com.amazonaws.services.databasemigrationservice.model.SubnetAlreadyInUseException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceAlreadyExistsFault").withModeledClass( com.amazonaws.services.databasemigrationservice.model.ResourceAlreadyExistsException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidSubnet").withModeledClass( com.amazonaws.services.databasemigrationservice.model.InvalidSubnetException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("StorageQuotaExceededFault").withModeledClass( com.amazonaws.services.databasemigrationservice.model.StorageQuotaExceededException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("SNSNoAuthorizationFault").withModeledClass( com.amazonaws.services.databasemigrationservice.model.SNSNoAuthorizationException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ReplicationSubnetGroupDoesNotCoverEnoughAZs").withModeledClass( com.amazonaws.services.databasemigrationservice.model.ReplicationSubnetGroupDoesNotCoverEnoughAZsException.class)) .withBaseServiceExceptionClass(com.amazonaws.services.databasemigrationservice.model.AWSDatabaseMigrationServiceException.class)); /** * Constructs a new client to invoke service methods on AWS Database Migration Service. A credentials provider chain * will be used that searches for credentials in this order: *
    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Instance profile credentials delivered through the Amazon EC2 metadata service
  • *
* *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @see DefaultAWSCredentialsProviderChain * @deprecated use {@link AWSDatabaseMigrationServiceClientBuilder#defaultClient()} */ @Deprecated public AWSDatabaseMigrationServiceClient() { this(DefaultAWSCredentialsProviderChain.getInstance(), configFactory.getConfig()); } /** * Constructs a new client to invoke service methods on AWS Database Migration Service. A credentials provider chain * will be used that searches for credentials in this order: *

    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Instance profile credentials delivered through the Amazon EC2 metadata service
  • *
* *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientConfiguration * The client configuration options controlling how this client connects to AWS Database Migration Service * (ex: proxy settings, retry counts, etc.). * * @see DefaultAWSCredentialsProviderChain * @deprecated use {@link AWSDatabaseMigrationServiceClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSDatabaseMigrationServiceClient(ClientConfiguration clientConfiguration) { this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration); } /** * Constructs a new client to invoke service methods on AWS Database Migration Service using the specified AWS * account credentials. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @deprecated use {@link AWSDatabaseMigrationServiceClientBuilder#withCredentials(AWSCredentialsProvider)} for * example: * {@code AWSDatabaseMigrationServiceClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build();} */ @Deprecated public AWSDatabaseMigrationServiceClient(AWSCredentials awsCredentials) { this(awsCredentials, configFactory.getConfig()); } /** * Constructs a new client to invoke service methods on AWS Database Migration Service using the specified AWS * account credentials and client configuration options. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to AWS Database Migration Service * (ex: proxy settings, retry counts, etc.). * @deprecated use {@link AWSDatabaseMigrationServiceClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSDatabaseMigrationServiceClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSDatabaseMigrationServiceClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) { super(clientConfiguration); this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials); init(); } /** * Constructs a new client to invoke service methods on AWS Database Migration Service using the specified AWS * account credentials provider. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @deprecated use {@link AWSDatabaseMigrationServiceClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AWSDatabaseMigrationServiceClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, configFactory.getConfig()); } /** * Constructs a new client to invoke service methods on AWS Database Migration Service using the specified AWS * account credentials provider and client configuration options. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to AWS Database Migration Service * (ex: proxy settings, retry counts, etc.). * @deprecated use {@link AWSDatabaseMigrationServiceClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSDatabaseMigrationServiceClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSDatabaseMigrationServiceClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, null); } /** * Constructs a new client to invoke service methods on AWS Database Migration Service using the specified AWS * account credentials provider, client configuration options, and request metric collector. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to AWS Database Migration Service * (ex: proxy settings, retry counts, etc.). * @param requestMetricCollector * optional request metric collector * @deprecated use {@link AWSDatabaseMigrationServiceClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSDatabaseMigrationServiceClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AWSDatabaseMigrationServiceClientBuilder#withMetricsCollector(RequestMetricCollector)} */ @Deprecated public AWSDatabaseMigrationServiceClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector) { super(clientConfiguration, requestMetricCollector); this.awsCredentialsProvider = awsCredentialsProvider; init(); } public static AWSDatabaseMigrationServiceClientBuilder builder() { return AWSDatabaseMigrationServiceClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on AWS Database Migration Service using the specified * parameters. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AWSDatabaseMigrationServiceClient(AwsSyncClientParams clientParams) { super(clientParams); this.awsCredentialsProvider = clientParams.getCredentialsProvider(); init(); } private void init() { setServiceNameIntern(DEFAULT_SIGNING_NAME); setEndpointPrefix(ENDPOINT_PREFIX); // calling this.setEndPoint(...) will also modify the signer accordingly setEndpoint("dms.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/databasemigrationservice/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/databasemigrationservice/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *

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

* * @param addTagsToResourceRequest * @return Result of the AddTagsToResource operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @sample AWSDatabaseMigrationService.AddTagsToResource * @see AWS API * Documentation */ @Override public AddTagsToResourceResult addTagsToResource(AddTagsToResourceRequest request) { request = beforeClientExecution(request); return executeAddTagsToResource(request); } @SdkInternalApi final AddTagsToResourceResult executeAddTagsToResource(AddTagsToResourceRequest addTagsToResourceRequest) { ExecutionContext executionContext = createExecutionContext(addTagsToResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new AddTagsToResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(addTagsToResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AddTagsToResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates an endpoint using the provided settings. *

* * @param createEndpointRequest * @return Result of the CreateEndpoint operation returned by the service. * @throws KMSKeyNotAccessibleException * AWS 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 * AWS DMS was denied access to the endpoint. * @sample AWSDatabaseMigrationService.CreateEndpoint * @see AWS API * Documentation */ @Override public CreateEndpointResult createEndpoint(CreateEndpointRequest request) { request = beforeClientExecution(request); return executeCreateEndpoint(request); } @SdkInternalApi final CreateEndpointResult executeCreateEndpoint(CreateEndpointRequest createEndpointRequest) { ExecutionContext executionContext = createExecutionContext(createEndpointRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateEndpointRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createEndpointRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateEndpointResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates an AWS DMS event notification subscription. *

*

* You can specify the type of source (SourceType) you want to be notified of, provide a list of AWS * 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 AWS DMS sources. If you don't specify either * SourceType nor SourceIdentifier, you will be notified of events generated from all AWS * DMS sources belonging to your customer account. *

*

* For more information about AWS DMS events, see Working with Events and Notifications * in the AWS 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 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 ResourceNotFoundException * The resource could not be found. * @sample AWSDatabaseMigrationService.CreateEventSubscription * @see AWS * API Documentation */ @Override public CreateEventSubscriptionResult createEventSubscription(CreateEventSubscriptionRequest request) { request = beforeClientExecution(request); return executeCreateEventSubscription(request); } @SdkInternalApi final CreateEventSubscriptionResult executeCreateEventSubscription(CreateEventSubscriptionRequest createEventSubscriptionRequest) { ExecutionContext executionContext = createExecutionContext(createEventSubscriptionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateEventSubscriptionRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(createEventSubscriptionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateEventSubscriptionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates the replication instance using the specified parameters. *

* * @param createReplicationInstanceRequest * @return Result of the CreateReplicationInstance operation returned by the service. * @throws AccessDeniedException * AWS DMS was denied access to the endpoint. * @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 is invalid. * @throws KMSKeyNotAccessibleException * AWS DMS cannot access the KMS key. * @sample AWSDatabaseMigrationService.CreateReplicationInstance * @see AWS * API Documentation */ @Override public CreateReplicationInstanceResult createReplicationInstance(CreateReplicationInstanceRequest request) { request = beforeClientExecution(request); return executeCreateReplicationInstance(request); } @SdkInternalApi final CreateReplicationInstanceResult executeCreateReplicationInstance(CreateReplicationInstanceRequest createReplicationInstanceRequest) { ExecutionContext executionContext = createExecutionContext(createReplicationInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateReplicationInstanceRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(createReplicationInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateReplicationInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

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

* * @param createReplicationSubnetGroupRequest * @return Result of the CreateReplicationSubnetGroup operation returned by the service. * @throws AccessDeniedException * AWS DMS was denied access to the endpoint. * @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 is invalid. * @sample AWSDatabaseMigrationService.CreateReplicationSubnetGroup * @see AWS API Documentation */ @Override public CreateReplicationSubnetGroupResult createReplicationSubnetGroup(CreateReplicationSubnetGroupRequest request) { request = beforeClientExecution(request); return executeCreateReplicationSubnetGroup(request); } @SdkInternalApi final CreateReplicationSubnetGroupResult executeCreateReplicationSubnetGroup(CreateReplicationSubnetGroupRequest createReplicationSubnetGroupRequest) { ExecutionContext executionContext = createExecutionContext(createReplicationSubnetGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateReplicationSubnetGroupRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(createReplicationSubnetGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateReplicationSubnetGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a replication task using the specified parameters. *

* * @param createReplicationTaskRequest * @return Result of the CreateReplicationTask operation returned by the service. * @throws AccessDeniedException * AWS DMS was denied access to the endpoint. * @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 * AWS DMS cannot access the KMS key. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @sample AWSDatabaseMigrationService.CreateReplicationTask * @see AWS API * Documentation */ @Override public CreateReplicationTaskResult createReplicationTask(CreateReplicationTaskRequest request) { request = beforeClientExecution(request); return executeCreateReplicationTask(request); } @SdkInternalApi final CreateReplicationTaskResult executeCreateReplicationTask(CreateReplicationTaskRequest createReplicationTaskRequest) { ExecutionContext executionContext = createExecutionContext(createReplicationTaskRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateReplicationTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createReplicationTaskRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateReplicationTaskResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.DeleteCertificate * @see AWS API * Documentation */ @Override public DeleteCertificateResult deleteCertificate(DeleteCertificateRequest request) { request = beforeClientExecution(request); return executeDeleteCertificate(request); } @SdkInternalApi final DeleteCertificateResult executeDeleteCertificate(DeleteCertificateRequest deleteCertificateRequest) { ExecutionContext executionContext = createExecutionContext(deleteCertificateRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteCertificateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteCertificateRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteCertificateResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.DeleteEndpoint * @see AWS API * Documentation */ @Override public DeleteEndpointResult deleteEndpoint(DeleteEndpointRequest request) { request = beforeClientExecution(request); return executeDeleteEndpoint(request); } @SdkInternalApi final DeleteEndpointResult executeDeleteEndpoint(DeleteEndpointRequest deleteEndpointRequest) { ExecutionContext executionContext = createExecutionContext(deleteEndpointRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteEndpointRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteEndpointRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteEndpointResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes an AWS 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. * @sample AWSDatabaseMigrationService.DeleteEventSubscription * @see AWS * API Documentation */ @Override public DeleteEventSubscriptionResult deleteEventSubscription(DeleteEventSubscriptionRequest request) { request = beforeClientExecution(request); return executeDeleteEventSubscription(request); } @SdkInternalApi final DeleteEventSubscriptionResult executeDeleteEventSubscription(DeleteEventSubscriptionRequest deleteEventSubscriptionRequest) { ExecutionContext executionContext = createExecutionContext(deleteEventSubscriptionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteEventSubscriptionRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteEventSubscriptionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteEventSubscriptionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.DeleteReplicationInstance * @see AWS * API Documentation */ @Override public DeleteReplicationInstanceResult deleteReplicationInstance(DeleteReplicationInstanceRequest request) { request = beforeClientExecution(request); return executeDeleteReplicationInstance(request); } @SdkInternalApi final DeleteReplicationInstanceResult executeDeleteReplicationInstance(DeleteReplicationInstanceRequest deleteReplicationInstanceRequest) { ExecutionContext executionContext = createExecutionContext(deleteReplicationInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteReplicationInstanceRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteReplicationInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteReplicationInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.DeleteReplicationSubnetGroup * @see AWS API Documentation */ @Override public DeleteReplicationSubnetGroupResult deleteReplicationSubnetGroup(DeleteReplicationSubnetGroupRequest request) { request = beforeClientExecution(request); return executeDeleteReplicationSubnetGroup(request); } @SdkInternalApi final DeleteReplicationSubnetGroupResult executeDeleteReplicationSubnetGroup(DeleteReplicationSubnetGroupRequest deleteReplicationSubnetGroupRequest) { ExecutionContext executionContext = createExecutionContext(deleteReplicationSubnetGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteReplicationSubnetGroupRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteReplicationSubnetGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteReplicationSubnetGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.DeleteReplicationTask * @see AWS API * Documentation */ @Override public DeleteReplicationTaskResult deleteReplicationTask(DeleteReplicationTaskRequest request) { request = beforeClientExecution(request); return executeDeleteReplicationTask(request); } @SdkInternalApi final DeleteReplicationTaskResult executeDeleteReplicationTask(DeleteReplicationTaskRequest deleteReplicationTaskRequest) { ExecutionContext executionContext = createExecutionContext(deleteReplicationTaskRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteReplicationTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteReplicationTaskRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteReplicationTaskResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists all of the AWS DMS attributes for a customer account. The attributes include AWS DMS quotas for the * account, such as the number of replication instances allowed. The description for a quota includes the quota * name, current usage toward that quota, and the quota's maximum value. *

*

* This command does not take any parameters. *

* * @param describeAccountAttributesRequest * @return Result of the DescribeAccountAttributes operation returned by the service. * @sample AWSDatabaseMigrationService.DescribeAccountAttributes * @see AWS * API Documentation */ @Override public DescribeAccountAttributesResult describeAccountAttributes(DescribeAccountAttributesRequest request) { request = beforeClientExecution(request); return executeDescribeAccountAttributes(request); } @SdkInternalApi final DescribeAccountAttributesResult executeDescribeAccountAttributes(DescribeAccountAttributesRequest describeAccountAttributesRequest) { ExecutionContext executionContext = createExecutionContext(describeAccountAttributesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeAccountAttributesRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeAccountAttributesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeAccountAttributesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.DescribeCertificates * @see AWS API * Documentation */ @Override public DescribeCertificatesResult describeCertificates(DescribeCertificatesRequest request) { request = beforeClientExecution(request); return executeDescribeCertificates(request); } @SdkInternalApi final DescribeCertificatesResult executeDescribeCertificates(DescribeCertificatesRequest describeCertificatesRequest) { ExecutionContext executionContext = createExecutionContext(describeCertificatesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeCertificatesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeCertificatesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeCertificatesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.DescribeConnections * @see AWS API * Documentation */ @Override public DescribeConnectionsResult describeConnections(DescribeConnectionsRequest request) { request = beforeClientExecution(request); return executeDescribeConnections(request); } @SdkInternalApi final DescribeConnectionsResult executeDescribeConnections(DescribeConnectionsRequest describeConnectionsRequest) { ExecutionContext executionContext = createExecutionContext(describeConnectionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeConnectionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeConnectionsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeConnectionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns information about the type of endpoints available. *

* * @param describeEndpointTypesRequest * @return Result of the DescribeEndpointTypes operation returned by the service. * @sample AWSDatabaseMigrationService.DescribeEndpointTypes * @see AWS API * Documentation */ @Override public DescribeEndpointTypesResult describeEndpointTypes(DescribeEndpointTypesRequest request) { request = beforeClientExecution(request); return executeDescribeEndpointTypes(request); } @SdkInternalApi final DescribeEndpointTypesResult executeDescribeEndpointTypes(DescribeEndpointTypesRequest describeEndpointTypesRequest) { ExecutionContext executionContext = createExecutionContext(describeEndpointTypesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeEndpointTypesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeEndpointTypesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeEndpointTypesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.DescribeEndpoints * @see AWS API * Documentation */ @Override public DescribeEndpointsResult describeEndpoints(DescribeEndpointsRequest request) { request = beforeClientExecution(request); return executeDescribeEndpoints(request); } @SdkInternalApi final DescribeEndpointsResult executeDescribeEndpoints(DescribeEndpointsRequest describeEndpointsRequest) { ExecutionContext executionContext = createExecutionContext(describeEndpointsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeEndpointsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeEndpointsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeEndpointsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 AWS Database Migration Service User Guide. *

* * @param describeEventCategoriesRequest * @return Result of the DescribeEventCategories operation returned by the service. * @sample AWSDatabaseMigrationService.DescribeEventCategories * @see AWS * API Documentation */ @Override public DescribeEventCategoriesResult describeEventCategories(DescribeEventCategoriesRequest request) { request = beforeClientExecution(request); return executeDescribeEventCategories(request); } @SdkInternalApi final DescribeEventCategoriesResult executeDescribeEventCategories(DescribeEventCategoriesRequest describeEventCategoriesRequest) { ExecutionContext executionContext = createExecutionContext(describeEventCategoriesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeEventCategoriesRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeEventCategoriesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeEventCategoriesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.DescribeEventSubscriptions * @see AWS * API Documentation */ @Override public DescribeEventSubscriptionsResult describeEventSubscriptions(DescribeEventSubscriptionsRequest request) { request = beforeClientExecution(request); return executeDescribeEventSubscriptions(request); } @SdkInternalApi final DescribeEventSubscriptionsResult executeDescribeEventSubscriptions(DescribeEventSubscriptionsRequest describeEventSubscriptionsRequest) { ExecutionContext executionContext = createExecutionContext(describeEventSubscriptionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeEventSubscriptionsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeEventSubscriptionsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeEventSubscriptionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists events for a given source identifier and source type. You can also specify a start and end time. For more * information on AWS DMS events, see * Working with Events and Notifications . *

* * @param describeEventsRequest * @return Result of the DescribeEvents operation returned by the service. * @sample AWSDatabaseMigrationService.DescribeEvents * @see AWS API * Documentation */ @Override public DescribeEventsResult describeEvents(DescribeEventsRequest request) { request = beforeClientExecution(request); return executeDescribeEvents(request); } @SdkInternalApi final DescribeEventsResult executeDescribeEvents(DescribeEventsRequest describeEventsRequest) { ExecutionContext executionContext = createExecutionContext(describeEventsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeEventsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeEventsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeEventsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.DescribeOrderableReplicationInstances * @see AWS API Documentation */ @Override public DescribeOrderableReplicationInstancesResult describeOrderableReplicationInstances(DescribeOrderableReplicationInstancesRequest request) { request = beforeClientExecution(request); return executeDescribeOrderableReplicationInstances(request); } @SdkInternalApi final DescribeOrderableReplicationInstancesResult executeDescribeOrderableReplicationInstances( DescribeOrderableReplicationInstancesRequest describeOrderableReplicationInstancesRequest) { ExecutionContext executionContext = createExecutionContext(describeOrderableReplicationInstancesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeOrderableReplicationInstancesRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeOrderableReplicationInstancesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeOrderableReplicationInstancesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.DescribeRefreshSchemasStatus * @see AWS API Documentation */ @Override public DescribeRefreshSchemasStatusResult describeRefreshSchemasStatus(DescribeRefreshSchemasStatusRequest request) { request = beforeClientExecution(request); return executeDescribeRefreshSchemasStatus(request); } @SdkInternalApi final DescribeRefreshSchemasStatusResult executeDescribeRefreshSchemasStatus(DescribeRefreshSchemasStatusRequest describeRefreshSchemasStatusRequest) { ExecutionContext executionContext = createExecutionContext(describeRefreshSchemasStatusRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeRefreshSchemasStatusRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeRefreshSchemasStatusRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeRefreshSchemasStatusResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.DescribeReplicationInstances * @see AWS API Documentation */ @Override public DescribeReplicationInstancesResult describeReplicationInstances(DescribeReplicationInstancesRequest request) { request = beforeClientExecution(request); return executeDescribeReplicationInstances(request); } @SdkInternalApi final DescribeReplicationInstancesResult executeDescribeReplicationInstances(DescribeReplicationInstancesRequest describeReplicationInstancesRequest) { ExecutionContext executionContext = createExecutionContext(describeReplicationInstancesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeReplicationInstancesRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeReplicationInstancesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeReplicationInstancesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.DescribeReplicationSubnetGroups * @see AWS API Documentation */ @Override public DescribeReplicationSubnetGroupsResult describeReplicationSubnetGroups(DescribeReplicationSubnetGroupsRequest request) { request = beforeClientExecution(request); return executeDescribeReplicationSubnetGroups(request); } @SdkInternalApi final DescribeReplicationSubnetGroupsResult executeDescribeReplicationSubnetGroups( DescribeReplicationSubnetGroupsRequest describeReplicationSubnetGroupsRequest) { ExecutionContext executionContext = createExecutionContext(describeReplicationSubnetGroupsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeReplicationSubnetGroupsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeReplicationSubnetGroupsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeReplicationSubnetGroupsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.DescribeReplicationTasks * @see AWS * API Documentation */ @Override public DescribeReplicationTasksResult describeReplicationTasks(DescribeReplicationTasksRequest request) { request = beforeClientExecution(request); return executeDescribeReplicationTasks(request); } @SdkInternalApi final DescribeReplicationTasksResult executeDescribeReplicationTasks(DescribeReplicationTasksRequest describeReplicationTasksRequest) { ExecutionContext executionContext = createExecutionContext(describeReplicationTasksRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeReplicationTasksRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeReplicationTasksRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeReplicationTasksResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.DescribeSchemas * @see AWS API * Documentation */ @Override public DescribeSchemasResult describeSchemas(DescribeSchemasRequest request) { request = beforeClientExecution(request); return executeDescribeSchemas(request); } @SdkInternalApi final DescribeSchemasResult executeDescribeSchemas(DescribeSchemasRequest describeSchemasRequest) { ExecutionContext executionContext = createExecutionContext(describeSchemasRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeSchemasRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeSchemasRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeSchemasResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 AWS 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. * @sample AWSDatabaseMigrationService.DescribeTableStatistics * @see AWS * API Documentation */ @Override public DescribeTableStatisticsResult describeTableStatistics(DescribeTableStatisticsRequest request) { request = beforeClientExecution(request); return executeDescribeTableStatistics(request); } @SdkInternalApi final DescribeTableStatisticsResult executeDescribeTableStatistics(DescribeTableStatisticsRequest describeTableStatisticsRequest) { ExecutionContext executionContext = createExecutionContext(describeTableStatisticsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeTableStatisticsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeTableStatisticsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeTableStatisticsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.ImportCertificate * @see AWS API * Documentation */ @Override public ImportCertificateResult importCertificate(ImportCertificateRequest request) { request = beforeClientExecution(request); return executeImportCertificate(request); } @SdkInternalApi final ImportCertificateResult executeImportCertificate(ImportCertificateRequest importCertificateRequest) { ExecutionContext executionContext = createExecutionContext(importCertificateRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ImportCertificateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(importCertificateRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ImportCertificateResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists all tags for an AWS DMS resource. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @sample AWSDatabaseMigrationService.ListTagsForResource * @see AWS API * Documentation */ @Override public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request) { request = beforeClientExecution(request); return executeListTagsForResource(request); } @SdkInternalApi final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) { ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListTagsForResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsForResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsForResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Modifies the specified endpoint. *

* * @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 * AWS DMS cannot access the KMS key. * @throws AccessDeniedException * AWS DMS was denied access to the endpoint. * @sample AWSDatabaseMigrationService.ModifyEndpoint * @see AWS API * Documentation */ @Override public ModifyEndpointResult modifyEndpoint(ModifyEndpointRequest request) { request = beforeClientExecution(request); return executeModifyEndpoint(request); } @SdkInternalApi final ModifyEndpointResult executeModifyEndpoint(ModifyEndpointRequest modifyEndpointRequest) { ExecutionContext executionContext = createExecutionContext(modifyEndpointRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ModifyEndpointRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(modifyEndpointRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ModifyEndpointResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Modifies an existing AWS 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. * @sample AWSDatabaseMigrationService.ModifyEventSubscription * @see AWS * API Documentation */ @Override public ModifyEventSubscriptionResult modifyEventSubscription(ModifyEventSubscriptionRequest request) { request = beforeClientExecution(request); return executeModifyEventSubscription(request); } @SdkInternalApi final ModifyEventSubscriptionResult executeModifyEventSubscription(ModifyEventSubscriptionRequest modifyEventSubscriptionRequest) { ExecutionContext executionContext = createExecutionContext(modifyEventSubscriptionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ModifyEventSubscriptionRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(modifyEventSubscriptionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ModifyEventSubscriptionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 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. * @sample AWSDatabaseMigrationService.ModifyReplicationInstance * @see AWS * API Documentation */ @Override public ModifyReplicationInstanceResult modifyReplicationInstance(ModifyReplicationInstanceRequest request) { request = beforeClientExecution(request); return executeModifyReplicationInstance(request); } @SdkInternalApi final ModifyReplicationInstanceResult executeModifyReplicationInstance(ModifyReplicationInstanceRequest modifyReplicationInstanceRequest) { ExecutionContext executionContext = createExecutionContext(modifyReplicationInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ModifyReplicationInstanceRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(modifyReplicationInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ModifyReplicationInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

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

* * @param modifyReplicationSubnetGroupRequest * @return Result of the ModifyReplicationSubnetGroup operation returned by the service. * @throws AccessDeniedException * AWS DMS was denied access to the endpoint. * @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 is invalid. * @sample AWSDatabaseMigrationService.ModifyReplicationSubnetGroup * @see AWS API Documentation */ @Override public ModifyReplicationSubnetGroupResult modifyReplicationSubnetGroup(ModifyReplicationSubnetGroupRequest request) { request = beforeClientExecution(request); return executeModifyReplicationSubnetGroup(request); } @SdkInternalApi final ModifyReplicationSubnetGroupResult executeModifyReplicationSubnetGroup(ModifyReplicationSubnetGroupRequest modifyReplicationSubnetGroupRequest) { ExecutionContext executionContext = createExecutionContext(modifyReplicationSubnetGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ModifyReplicationSubnetGroupRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(modifyReplicationSubnetGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ModifyReplicationSubnetGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 AWS DMS tasks, see the AWS DMS user guide at Working with Migration Tasks *

* * @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 * AWS DMS cannot access the KMS key. * @sample AWSDatabaseMigrationService.ModifyReplicationTask * @see AWS API * Documentation */ @Override public ModifyReplicationTaskResult modifyReplicationTask(ModifyReplicationTaskRequest request) { request = beforeClientExecution(request); return executeModifyReplicationTask(request); } @SdkInternalApi final ModifyReplicationTaskResult executeModifyReplicationTask(ModifyReplicationTaskRequest modifyReplicationTaskRequest) { ExecutionContext executionContext = createExecutionContext(modifyReplicationTaskRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ModifyReplicationTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(modifyReplicationTaskRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ModifyReplicationTaskResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 * AWS DMS cannot access the KMS key. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @sample AWSDatabaseMigrationService.RefreshSchemas * @see AWS API * Documentation */ @Override public RefreshSchemasResult refreshSchemas(RefreshSchemasRequest request) { request = beforeClientExecution(request); return executeRefreshSchemas(request); } @SdkInternalApi final RefreshSchemasResult executeRefreshSchemas(RefreshSchemasRequest refreshSchemasRequest) { ExecutionContext executionContext = createExecutionContext(refreshSchemasRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RefreshSchemasRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(refreshSchemasRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RefreshSchemasResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

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

* * @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. * @sample AWSDatabaseMigrationService.ReloadTables * @see AWS API * Documentation */ @Override public ReloadTablesResult reloadTables(ReloadTablesRequest request) { request = beforeClientExecution(request); return executeReloadTables(request); } @SdkInternalApi final ReloadTablesResult executeReloadTables(ReloadTablesRequest reloadTablesRequest) { ExecutionContext executionContext = createExecutionContext(reloadTablesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ReloadTablesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(reloadTablesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ReloadTablesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes metadata tags from a DMS resource. *

* * @param removeTagsFromResourceRequest * @return Result of the RemoveTagsFromResource operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @sample AWSDatabaseMigrationService.RemoveTagsFromResource * @see AWS API * Documentation */ @Override public RemoveTagsFromResourceResult removeTagsFromResource(RemoveTagsFromResourceRequest request) { request = beforeClientExecution(request); return executeRemoveTagsFromResource(request); } @SdkInternalApi final RemoveTagsFromResourceResult executeRemoveTagsFromResource(RemoveTagsFromResourceRequest removeTagsFromResourceRequest) { ExecutionContext executionContext = createExecutionContext(removeTagsFromResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RemoveTagsFromResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(removeTagsFromResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RemoveTagsFromResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Starts the replication task. *

*

* For more information about AWS DMS tasks, see the AWS DMS user guide at Working with Migration Tasks *

* * @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. * @sample AWSDatabaseMigrationService.StartReplicationTask * @see AWS API * Documentation */ @Override public StartReplicationTaskResult startReplicationTask(StartReplicationTaskRequest request) { request = beforeClientExecution(request); return executeStartReplicationTask(request); } @SdkInternalApi final StartReplicationTaskResult executeStartReplicationTask(StartReplicationTaskRequest startReplicationTaskRequest) { ExecutionContext executionContext = createExecutionContext(startReplicationTaskRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartReplicationTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startReplicationTaskRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartReplicationTaskResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. * @sample AWSDatabaseMigrationService.StopReplicationTask * @see AWS API * Documentation */ @Override public StopReplicationTaskResult stopReplicationTask(StopReplicationTaskRequest request) { request = beforeClientExecution(request); return executeStopReplicationTask(request); } @SdkInternalApi final StopReplicationTaskResult executeStopReplicationTask(StopReplicationTaskRequest stopReplicationTaskRequest) { ExecutionContext executionContext = createExecutionContext(stopReplicationTaskRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StopReplicationTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopReplicationTaskRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopReplicationTaskResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 * AWS DMS cannot access the KMS key. * @throws ResourceQuotaExceededException * The quota for this resource quota has been exceeded. * @sample AWSDatabaseMigrationService.TestConnection * @see AWS API * Documentation */ @Override public TestConnectionResult testConnection(TestConnectionRequest request) { request = beforeClientExecution(request); return executeTestConnection(request); } @SdkInternalApi final TestConnectionResult executeTestConnection(TestConnectionRequest testConnectionRequest) { ExecutionContext executionContext = createExecutionContext(testConnectionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new TestConnectionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(testConnectionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TestConnectionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * Returns additional metadata for a previously executed successful, request, typically used for debugging issues * where a service isn't acting as expected. This data isn't considered part of the result data returned by an * operation, so it's available through this separate, diagnostic interface. *

* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic * information for an executed request, you should use this method to retrieve it as soon as possible after * executing the request. * * @param request * The originally executed request * * @return The response metadata for the specified request, or null if none is available. */ public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { return client.getResponseMetadataForRequest(request); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider)); return doInvoke(request, responseHandler, executionContext); } /** * Invoke with no authentication. Credentials are not required and any credentials set on the client or request will * be ignored for this operation. **/ private Response anonymousInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return doInvoke(request, responseHandler, executionContext); } /** * Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the * ExecutionContext beforehand. **/ private Response doInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { request.setEndpoint(endpoint); request.setTimeOffset(timeOffset); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata()); return client.execute(request, responseHandler, errorResponseHandler, executionContext); } @com.amazonaws.annotation.SdkInternalApi static com.amazonaws.protocol.json.SdkJsonProtocolFactory getProtocolFactory() { return protocolFactory; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy