com.amazonaws.services.servermigration

## Class AWSServerMigrationClient

- java.lang.Object
- - com.amazonaws.AmazonWebServiceClient
  - - com.amazonaws.services.servermigration.AWSServerMigrationClient

All Implemented Interfaces:
  AWSServerMigration

Direct Known Subclasses:
  AWSServerMigrationAsyncClient

    @ThreadSafe
    public class AWSServerMigrationClient
    extends AmazonWebServiceClient
    implements AWSServerMigration

Client for accessing SMS. All service calls made using this client are blocking, and will not return until the service call completes.

Amazon Server Migration Service automates the process of migrating servers to EC2.

### Field Summary

Fields
`protected static ClientConfigurationFactory` `configFactory` Client configuration factory providing ClientConfigurations tailored to this client

### Fields inherited from class com.amazonaws.AmazonWebServiceClient

`client, clientConfiguration, endpoint, LOGGING_AWS_REQUEST_METRIC, requestHandler2s, timeOffset`

### Fields inherited from interface com.amazonaws.services.servermigration.AWSServerMigration

`ENDPOINT_PREFIX`

### Constructor Summary

Constructors
Constructor and Description
`AWSServerMigrationClient()` Constructs a new client to invoke service methods on SMS.
`AWSServerMigrationClient(AWSCredentials awsCredentials)` Constructs a new client to invoke service methods on SMS using the specified AWS account credentials.
`AWSServerMigrationClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration)` Constructs a new client to invoke service methods on SMS using the specified AWS account credentials and client configuration options.
`AWSServerMigrationClient(AWSCredentialsProvider awsCredentialsProvider)` Constructs a new client to invoke service methods on SMS using the specified AWS account credentials provider.
`AWSServerMigrationClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)` Constructs a new client to invoke service methods on SMS using the specified AWS account credentials provider and client configuration options.
`AWSServerMigrationClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector)` Constructs a new client to invoke service methods on SMS using the specified AWS account credentials provider, client configuration options, and request metric collector.
`AWSServerMigrationClient(ClientConfiguration clientConfiguration)` Constructs a new client to invoke service methods on SMS.

### Method Summary

All Methods Instance Methods Concrete Methods
`CreateReplicationJobResult` `createReplicationJob(CreateReplicationJobRequest createReplicationJobRequest)` The CreateReplicationJob API is used to create a ReplicationJob to replicate a server on AWS.
`DeleteReplicationJobResult` `deleteReplicationJob(DeleteReplicationJobRequest deleteReplicationJobRequest)` The DeleteReplicationJob API is used to delete a ReplicationJob, resulting in no further ReplicationRuns.
`DeleteServerCatalogResult` `deleteServerCatalog(DeleteServerCatalogRequest deleteServerCatalogRequest)` The DeleteServerCatalog API clears all servers from your server catalog.
`DisassociateConnectorResult` `disassociateConnector(DisassociateConnectorRequest disassociateConnectorRequest)` The DisassociateConnector API will disassociate a connector from the Server Migration Service, rendering it unavailable to support replication jobs.
`ResponseMetadata` `getCachedResponseMetadata(AmazonWebServiceRequest request)` Returns additional metadata for a previously executed successful, request, typically used for debugging issues where a service isn't acting as expected.
`GetConnectorsResult` `getConnectors(GetConnectorsRequest getConnectorsRequest)` The GetConnectors API returns a list of connectors that are registered with the Server Migration Service.
`GetReplicationJobsResult` `getReplicationJobs(GetReplicationJobsRequest getReplicationJobsRequest)` The GetReplicationJobs API will return all of your ReplicationJobs and their details.
`GetReplicationRunsResult` `getReplicationRuns(GetReplicationRunsRequest getReplicationRunsRequest)` The GetReplicationRuns API will return all ReplicationRuns for a given ReplicationJob.
`GetServersResult` `getServers(GetServersRequest getServersRequest)` The GetServers API returns a list of all servers in your server catalog.
`ImportServerCatalogResult` `importServerCatalog(ImportServerCatalogRequest importServerCatalogRequest)` The ImportServerCatalog API is used to gather the complete list of on-premises servers on your premises.
`StartOnDemandReplicationRunResult` `startOnDemandReplicationRun(StartOnDemandReplicationRunRequest startOnDemandReplicationRunRequest)` The StartOnDemandReplicationRun API is used to start a ReplicationRun on demand (in addition to those that are scheduled based on your frequency).
`UpdateReplicationJobResult` `updateReplicationJob(UpdateReplicationJobRequest updateReplicationJobRequest)` The UpdateReplicationJob API is used to change the settings of your existing ReplicationJob created using CreateReplicationJob.

### Methods inherited from class com.amazonaws.AmazonWebServiceClient

`addRequestHandler, addRequestHandler, beforeMarshalling, calculateCRC32FromCompressedData, checkMutability, configureRegion, createExecutionContext, createExecutionContext, createExecutionContext, createSignerProvider, endClientExecution, endClientExecution, getEndpointPrefix, getRequestMetricsCollector, getServiceAbbreviation, getServiceName, getServiceNameIntern, getSigner, getSignerByURI, getSignerProvider, getSignerRegionOverride, getTimeOffset, isProfilingEnabled, isRequestMetricsEnabled, makeImmutable, removeRequestHandler, removeRequestHandler, requestMetricCollector, setEndpoint, setEndpointPrefix, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, useStrictHostNameVerification, withEndpoint, withRegion, withRegion, withTimeOffset`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface com.amazonaws.services.servermigration.AWSServerMigration

`setEndpoint, setRegion, shutdown`

### Field Detail

#### configFactory

    protected static final ClientConfigurationFactory configFactory

Client configuration factory providing ClientConfigurations tailored to this client

### Constructor Detail

#### AWSServerMigrationClient

    public AWSServerMigrationClient()

Constructs a new client to invoke service methods on SMS. 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 Also:
  `DefaultAWSCredentialsProviderChain`

#### AWSServerMigrationClient

    public AWSServerMigrationClient(ClientConfiguration clientConfiguration)

Constructs a new client to invoke service methods on SMS. 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.

Parameters:
  `clientConfiguration` - The client configuration options controlling how this client connects to SMS (ex: proxy settings, retry counts, etc.).
See Also:
  `DefaultAWSCredentialsProviderChain`

#### AWSServerMigrationClient

    public AWSServerMigrationClient(AWSCredentials awsCredentials)

Constructs a new client to invoke service methods on SMS 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.

Parameters:
  `awsCredentials` - The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.

#### AWSServerMigrationClient

    public AWSServerMigrationClient(AWSCredentials awsCredentials,
                                    ClientConfiguration clientConfiguration)

Constructs a new client to invoke service methods on SMS 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.

Parameters:
  `awsCredentials` - The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
  `clientConfiguration` - The client configuration options controlling how this client connects to SMS (ex: proxy settings, retry counts, etc.).

#### AWSServerMigrationClient

    public AWSServerMigrationClient(AWSCredentialsProvider awsCredentialsProvider)

Constructs a new client to invoke service methods on SMS 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.

Parameters:
  `awsCredentialsProvider` - The AWS credentials provider which will provide credentials to authenticate requests with AWS services.

#### AWSServerMigrationClient

    public AWSServerMigrationClient(AWSCredentialsProvider awsCredentialsProvider,
                                    ClientConfiguration clientConfiguration)

Constructs a new client to invoke service methods on SMS 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.

Parameters:
  `awsCredentialsProvider` - The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
  `clientConfiguration` - The client configuration options controlling how this client connects to SMS (ex: proxy settings, retry counts, etc.).

#### AWSServerMigrationClient

    public AWSServerMigrationClient(AWSCredentialsProvider awsCredentialsProvider,
                                    ClientConfiguration clientConfiguration,
                                    RequestMetricCollector requestMetricCollector)

Constructs a new client to invoke service methods on SMS 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.

Parameters:
  `awsCredentialsProvider` - The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
  `clientConfiguration` - The client configuration options controlling how this client connects to SMS (ex: proxy settings, retry counts, etc.).
  `requestMetricCollector` - optional request metric collector

### Method Detail

#### createReplicationJob

    public CreateReplicationJobResult createReplicationJob(CreateReplicationJobRequest createReplicationJobRequest)

The CreateReplicationJob API is used to create a ReplicationJob to replicate a server on AWS. Call this API to first create a ReplicationJob, which will then schedule periodic ReplicationRuns to replicate your server to AWS. Each ReplicationRun will result in the creation of an AWS AMI.

Specified by:
  `createReplicationJob` in interface `AWSServerMigration`
Parameters:
  `createReplicationJobRequest` -
Returns:
  Result of the CreateReplicationJob operation returned by the service.
Throws:
  `InvalidParameterException` - A parameter specified in the request is not valid, is unsupported, or cannot be used.
  `MissingRequiredParameterException` - The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request.
  `UnauthorizedOperationException` - This user does not have permissions to perform this operation.
  `OperationNotPermittedException` - The specified operation is not allowed. This error can occur for a number of reasons; for example, you might be trying to start a Replication Run before seed Replication Run.
  `ServerCannotBeReplicatedException` - The provided server cannot be replicated.
  `ReplicationJobAlreadyExistsException` - An active Replication Job already exists for the specified server.
  `NoConnectorsAvailableException` - No connectors are available to handle this request. Please associate connector(s) and verify any existing connectors are healthy and can respond to requests.
  `InternalErrorException` - An internal error has occured.

#### deleteReplicationJob

    public DeleteReplicationJobResult deleteReplicationJob(DeleteReplicationJobRequest deleteReplicationJobRequest)

The DeleteReplicationJob API is used to delete a ReplicationJob, resulting in no further ReplicationRuns. This will delete the contents of the S3 bucket used to store SMS artifacts, but will not delete any AMIs created by the SMS service.

Specified by:
  `deleteReplicationJob` in interface `AWSServerMigration`
Parameters:
  `deleteReplicationJobRequest` -
Returns:
  Result of the DeleteReplicationJob operation returned by the service.
Throws:
  `InvalidParameterException` - A parameter specified in the request is not valid, is unsupported, or cannot be used.
  `MissingRequiredParameterException` - The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request.
  `UnauthorizedOperationException` - This user does not have permissions to perform this operation.
  `OperationNotPermittedException` - The specified operation is not allowed. This error can occur for a number of reasons; for example, you might be trying to start a Replication Run before seed Replication Run.
  `ReplicationJobNotFoundException` - The specified Replication Job cannot be found.

#### deleteServerCatalog

    public DeleteServerCatalogResult deleteServerCatalog(DeleteServerCatalogRequest deleteServerCatalogRequest)

The DeleteServerCatalog API clears all servers from your server catalog. This means that these servers will no longer be accessible to the Server Migration Service.

Specified by:
  `deleteServerCatalog` in interface `AWSServerMigration`
Parameters:
  `deleteServerCatalogRequest` -
Returns:
  Result of the DeleteServerCatalog operation returned by the service.
Throws:
  `UnauthorizedOperationException` - This user does not have permissions to perform this operation.
  `OperationNotPermittedException` - The specified operation is not allowed. This error can occur for a number of reasons; for example, you might be trying to start a Replication Run before seed Replication Run.
  `InvalidParameterException` - A parameter specified in the request is not valid, is unsupported, or cannot be used.
  `MissingRequiredParameterException` - The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request.

#### disassociateConnector

    public DisassociateConnectorResult disassociateConnector(DisassociateConnectorRequest disassociateConnectorRequest)

The DisassociateConnector API will disassociate a connector from the Server Migration Service, rendering it unavailable to support replication jobs.

Specified by:
  `disassociateConnector` in interface `AWSServerMigration`
Parameters:
  `disassociateConnectorRequest` -
Returns:
  Result of the DisassociateConnector operation returned by the service.
Throws:
  `MissingRequiredParameterException` - The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request.
  `UnauthorizedOperationException` - This user does not have permissions to perform this operation.
  `OperationNotPermittedException` - The specified operation is not allowed. This error can occur for a number of reasons; for example, you might be trying to start a Replication Run before seed Replication Run.
  `InvalidParameterException` - A parameter specified in the request is not valid, is unsupported, or cannot be used.

#### getConnectors

    public GetConnectorsResult getConnectors(GetConnectorsRequest getConnectorsRequest)

The GetConnectors API returns a list of connectors that are registered with the Server Migration Service.

Specified by:
  `getConnectors` in interface `AWSServerMigration`
Parameters:
  `getConnectorsRequest` -
Returns:
  Result of the GetConnectors operation returned by the service.
Throws:
  `UnauthorizedOperationException` - This user does not have permissions to perform this operation.

#### getReplicationJobs

    public GetReplicationJobsResult getReplicationJobs(GetReplicationJobsRequest getReplicationJobsRequest)

The GetReplicationJobs API will return all of your ReplicationJobs and their details. This API returns a paginated list, that may be consecutively called with nextToken to retrieve all ReplicationJobs.

Specified by:
  `getReplicationJobs` in interface `AWSServerMigration`
Parameters:
  `getReplicationJobsRequest` -
Returns:
  Result of the GetReplicationJobs operation returned by the service.
Throws:
  `InvalidParameterException` - A parameter specified in the request is not valid, is unsupported, or cannot be used.
  `MissingRequiredParameterException` - The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request.
  `UnauthorizedOperationException` - This user does not have permissions to perform this operation.

#### getReplicationRuns

    public GetReplicationRunsResult getReplicationRuns(GetReplicationRunsRequest getReplicationRunsRequest)

The GetReplicationRuns API will return all ReplicationRuns for a given ReplicationJob. This API returns a paginated list, that may be consecutively called with nextToken to retrieve all ReplicationRuns for a ReplicationJob.

Specified by:
  `getReplicationRuns` in interface `AWSServerMigration`
Parameters:
  `getReplicationRunsRequest` -
Returns:
  Result of the GetReplicationRuns operation returned by the service.
Throws:
  `InvalidParameterException` - A parameter specified in the request is not valid, is unsupported, or cannot be used.
  `MissingRequiredParameterException` - The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request.
  `UnauthorizedOperationException` - This user does not have permissions to perform this operation.

#### getServers

    public GetServersResult getServers(GetServersRequest getServersRequest)

The GetServers API returns a list of all servers in your server catalog. For this call to succeed, you must previously have called ImportServerCatalog.

Specified by:
  `getServers` in interface `AWSServerMigration`
Parameters:
  `getServersRequest` -
Returns:
  Result of the GetServers operation returned by the service.
Throws:
  `UnauthorizedOperationException` - This user does not have permissions to perform this operation.

#### importServerCatalog

    public ImportServerCatalogResult importServerCatalog(ImportServerCatalogRequest importServerCatalogRequest)

The ImportServerCatalog API is used to gather the complete list of on-premises servers on your premises. This API call requires connectors to be installed and monitoring all servers you would like imported. This API call returns immediately, but may take some time to retrieve all of the servers.

Specified by:
  `importServerCatalog` in interface `AWSServerMigration`
Parameters:
  `importServerCatalogRequest` -
Returns:
  Result of the ImportServerCatalog operation returned by the service.
Throws:
  `UnauthorizedOperationException` - This user does not have permissions to perform this operation.
  `OperationNotPermittedException` - The specified operation is not allowed. This error can occur for a number of reasons; for example, you might be trying to start a Replication Run before seed Replication Run.
  `InvalidParameterException` - A parameter specified in the request is not valid, is unsupported, or cannot be used.
  `MissingRequiredParameterException` - The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request.
  `NoConnectorsAvailableException` - No connectors are available to handle this request. Please associate connector(s) and verify any existing connectors are healthy and can respond to requests.

#### startOnDemandReplicationRun

    public StartOnDemandReplicationRunResult startOnDemandReplicationRun(StartOnDemandReplicationRunRequest startOnDemandReplicationRunRequest)

The StartOnDemandReplicationRun API is used to start a ReplicationRun on demand (in addition to those that are scheduled based on your frequency). This ReplicationRun will start immediately. StartOnDemandReplicationRun is subject to limits on how many on demand ReplicationRuns you may call per 24-hour period.

Specified by:
  `startOnDemandReplicationRun` in interface `AWSServerMigration`
Parameters:
  `startOnDemandReplicationRunRequest` -
Returns:
  Result of the StartOnDemandReplicationRun operation returned by the service.
Throws:
  `InvalidParameterException` - A parameter specified in the request is not valid, is unsupported, or cannot be used.
  `MissingRequiredParameterException` - The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request.
  `UnauthorizedOperationException` - This user does not have permissions to perform this operation.
  `OperationNotPermittedException` - The specified operation is not allowed. This error can occur for a number of reasons; for example, you might be trying to start a Replication Run before seed Replication Run.
  `ReplicationRunLimitExceededException` - This user has exceeded the maximum allowed Replication Run limit.

#### updateReplicationJob

    public UpdateReplicationJobResult updateReplicationJob(UpdateReplicationJobRequest updateReplicationJobRequest)

The UpdateReplicationJob API is used to change the settings of your existing ReplicationJob created using CreateReplicationJob. Calling this API will affect the next scheduled ReplicationRun.

Specified by:
  `updateReplicationJob` in interface `AWSServerMigration`
Parameters:
  `updateReplicationJobRequest` -
Returns:
  Result of the UpdateReplicationJob operation returned by the service.
Throws:
  `InvalidParameterException` - A parameter specified in the request is not valid, is unsupported, or cannot be used.
  `MissingRequiredParameterException` - The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request.
  `OperationNotPermittedException` - The specified operation is not allowed. This error can occur for a number of reasons; for example, you might be trying to start a Replication Run before seed Replication Run.
  `UnauthorizedOperationException` - This user does not have permissions to perform this operation.
  `ServerCannotBeReplicatedException` - The provided server cannot be replicated.
  `ReplicationJobNotFoundException` - The specified Replication Job cannot be found.
  `InternalErrorException` - An internal error has occured.

#### getCachedResponseMetadata

    public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)

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.

Specified by:
  `getCachedResponseMetadata` in interface `AWSServerMigration`
Parameters:
  `request` - The originally executed request
Returns:
  The response metadata for the specified request, or null if none is available.