AWS Server Migration Service
API Reference (API Version 2016-10-24)

CreateReplicationJob

Creates a replication job. The replication job schedules periodic replication runs to replicate your server to AWS. Each replication run creates an Amazon Machine Image (AMI).

Request Syntax

{ "description": "string", "encrypted": boolean, "frequency": number, "kmsKeyId": "string", "licenseType": "string", "numberOfRecentAmisToKeep": number, "roleName": "string", "runOnce": boolean, "seedReplicationTime": number, "serverId": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

description

The description of the replication job.

Type: String

Required: No

encrypted

When true, the replication job produces encrypted AMIs. For more information, see KmsKeyId.

Type: Boolean

Required: No

frequency

The time between consecutive replication runs, in hours.

Type: Integer

Required: No

kmsKeyId

KMS key ID for replication jobs that produce encrypted AMIs. This value can be any of the following:

  • KMS key ID

  • KMS key alias

  • ARN referring to the KMS key ID

  • ARN referring to the KMS key alias

If encrypted is true but a KMS key ID is not specified, the customer's default KMS key for Amazon EBS is used.

Type: String

Required: No

licenseType

The license type to be used for the AMI created by a successful replication run.

Type: String

Valid Values: AWS | BYOL

Required: No

numberOfRecentAmisToKeep

The maximum number of SMS-created AMIs to retain. The oldest is deleted after the maximum number is reached and a new AMI is created.

Type: Integer

Required: No

roleName

The name of the IAM role to be used by the AWS SMS.

Type: String

Required: No

runOnce

Type: Boolean

Required: No

seedReplicationTime

The seed replication time.

Type: Timestamp

Required: Yes

serverId

The identifier of the server.

Type: String

Required: Yes

Response Syntax

{ "replicationJobId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

replicationJobId

The unique identifier of the replication job.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalError

An internal error occurred.

HTTP Status Code: 500

InvalidParameterException

A specified parameter is not valid.

HTTP Status Code: 400

MissingRequiredParameterException

A required parameter is missing.

HTTP Status Code: 400

NoConnectorsAvailableException

There are no connectors available.

HTTP Status Code: 400

OperationNotPermittedException

This operation is not allowed.

HTTP Status Code: 400

ReplicationJobAlreadyExistsException

The specified replication job already exists.

HTTP Status Code: 400

ServerCannotBeReplicatedException

The specified server cannot be replicated.

HTTP Status Code: 400

TemporarilyUnavailableException

The service is temporarily unavailable.

HTTP Status Code: 500

UnauthorizedOperationException

You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: