com.amazonaws.services.servermigration

## Interface AWSServerMigration

All Known Subinterfaces:
  AWSServerMigrationAsync

All Known Implementing Classes:
  AbstractAWSServerMigration, AbstractAWSServerMigrationAsync, AWSServerMigrationAsyncClient, AWSServerMigrationClient

    public interface AWSServerMigration

Interface for accessing SMS.

Note: Do not directly implement this interface, new methods are added to it regularly. Extend from `AbstractAWSServerMigration` instead.

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

### Field Summary

Fields
`static String` `ENDPOINT_PREFIX` The region metadata service name for computing region endpoints.

### Method Summary

All Methods Instance Methods Abstract 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.
`void` `setEndpoint(String endpoint)` Overrides the default endpoint for this client ("sms.us-east-1.amazonaws.com").
`void` `setRegion(Region region)` An alternative to `setEndpoint(String)`, sets the regional endpoint for this client's service calls.
`void` `shutdown()` Shuts down this client object, releasing any resources that might be held open.
`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.

### Field Detail

#### ENDPOINT_PREFIX

    static final String ENDPOINT_PREFIX

The region metadata service name for computing region endpoints. You can use this value to retrieve metadata (such as supported regions) of the service.

See Also:
  `RegionUtils.getRegionsForService(String)`, Constant Field Values

### Method Detail

#### setEndpoint

    void setEndpoint(String endpoint)

Overrides the default endpoint for this client ("sms.us-east-1.amazonaws.com"). Callers can use this method to control which AWS region they want to work with.

Callers can pass in just the endpoint (ex: "sms.us-east-1.amazonaws.com") or a full URL, including the protocol (ex: "sms.us-east-1.amazonaws.com"). If the protocol is not specified here, the default protocol from this client's `ClientConfiguration` will be used, which by default is HTTPS.

For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available endpoints for all AWS services, see: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=3912

This method is not threadsafe. An endpoint should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.

Parameters:
  `endpoint` - The endpoint (ex: "sms.us-east-1.amazonaws.com") or a full URL, including the protocol (ex: "sms.us-east-1.amazonaws.com") of the region specific AWS endpoint this client will communicate with.

#### setRegion

    void setRegion(Region region)

An alternative to `setEndpoint(String)`, sets the regional endpoint for this client's service calls. Callers can use this method to control which AWS region they want to work with.

By default, all service endpoints in all regions use the https protocol. To use http instead, specify it in the `ClientConfiguration` supplied at construction.

This method is not threadsafe. A region should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.

Parameters:
  `region` - The region this client will communicate with. See `Region.getRegion(com.amazonaws.regions.Regions)` for accessing a given region. Must not be null and must be a region where the service is available.
See Also:
  `Region.getRegion(com.amazonaws.regions.Regions)`, `Region.createClient(Class, com.amazonaws.auth.AWSCredentialsProvider, ClientConfiguration)`, `Region.isServiceSupported(String)`

#### createReplicationJob

    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.

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

    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.

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

    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.

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

    DisassociateConnectorResult disassociateConnector(DisassociateConnectorRequest disassociateConnectorRequest)

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

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

    GetConnectorsResult getConnectors(GetConnectorsRequest getConnectorsRequest)

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

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

    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.

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

    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.

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

    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.

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

    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.

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

    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.

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

    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.

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.

#### shutdown

    void shutdown()

Shuts down this client object, releasing any resources that might be held open. This is an optional method, and callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client has been shutdown, it should not be used to make any more requests.

#### getCachedResponseMetadata

    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 a request.

Parameters:
  `request` - The originally executed request.
Returns:
  The response metadata for the specified request, or null if none is available.