Creates a migration task for a migration source by calling CreateReplicationJob.
Operation description
Operation description.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
smc:CreateReplicationJob |
create |
*ReplicationJob
*SourceServer
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The ID of the destination Alibaba Cloud region to which the migration source is to be migrated. |
cn-hangzhou |
| ClientToken |
string |
No |
Ensures the idempotency of the request. You can generate a parameter value of up to 64 ASCII characters from the client and assign the value to ClientToken to ensure the idempotency of retry requests. For more information, see How to ensure idempotency. |
123e4567-e89b-12d3-a456-426655440000 |
| Name |
string |
No |
The name of the migration task. The name must meet the following requirements:
|
testMigrationTaskName |
| Description |
string |
No |
The description of the migration task. The description must be 2 to 128 characters in length and must start with a letter or a Chinese character. It cannot start with |
This_is_a_migration_task |
| SourceId |
string |
Yes |
The ID of the migration source. |
s-bp1e2fsl57knvuug**** |
| TargetType |
string |
No |
The target type of the migration task. Valid values:
|
Image |
| ScheduledStartTime |
string |
No |
The execution time of the migration task. The value of this parameter must meet the following requirements:
Note
If this parameter is left empty, Server Migration Center (SMC) does not start the migration task. You must call StartReplicationJob to start the task. |
2019-06-04T13:35:00Z |
| ValidTime |
string |
No |
The expiration time of the migration task. Valid values: creation time of the migration task + 7 days to creation time of the migration task + 90 days. |
2019-06-04T13:35:00Z |
| ImageName |
string |
No |
The name of the destination Alibaba Cloud image delivered by the migration task. The image name must meet the following requirements:
Note
During the migration task, if an image with the same name already exists in the current region, the system appends the migration task ID (JobId) as a suffix to the image name by default, such as ImageName_j-2zexxxxxxxxxxxxx. |
testAliCloudImageName |
| InstanceId |
string |
No |
The target instance ID. |
i-bp1f1dvfto1sigz5**** |
| SystemDiskSize |
integer |
No |
The system cloud disk size of the destination Alibaba Cloud ECS instance. Unit: GiB. Valid values: 20 to 2048. Note
The value of this parameter must be greater than the actual used space of the migration source system cloud disk. For example, if the source system cloud disk size is 500 GiB but the actual used space is 100 GiB, the value of this parameter must be greater than 100 GiB. |
80 |
| VpcId |
string |
No |
The ID of the VPC for which Express Connect or VPN Gateway is configured. |
vpc-bp1vwnn14rqpyiczj**** |
| VSwitchId |
string |
No |
The ID of the vSwitch in the specified VPC. |
vsw-bp1ddbrxdlrcbim46**** |
| ReplicationParameters |
string |
No |
The parameter information of the replication driver. The parameter information is in JSON key-value pair format with fixed keys. Maximum length: 2048 characters. |
{"bandwidth_limit":0,"compress_level":1,"checksum":true} |
| NetMode |
integer |
No |
The network mode for data transmission. Valid values:
Default value: 0. |
0 |
| RunOnce |
boolean |
No |
Specifies whether to create a one-time migration task or an incremental migration task. Valid values:
Note
This parameter can be specified only when you create a migration task. After the value is specified, it cannot be changed. |
true |
| Frequency |
integer |
No |
The interval at which the incremental migration task runs. Unit: hours. Valid values: 1 to 168. This parameter is required when RunOnce is set to false. Default value: null. |
12 |
| MaxNumberOfImageToKeep |
integer |
No |
The maximum number of images retained by default for an incremental migration task. Valid values: 1 to 10. This parameter is required when RunOnce is set to false. Default value: null. |
10 |
| InstanceType |
string |
No |
The instance type of the intermediate ECS instance. Call DescribeInstanceTypes to query the instance types provided by Elastic Compute Service (ECS).
|
ecs.c6.large |
| LaunchTemplateId |
string |
No |
The ID of the instance launch template. |
lt-bp16jovvln1cgaaq**** |
| LaunchTemplateVersion |
string |
No |
The version of the instance launch template. |
1 |
| InstanceRamRole |
string |
No |
The name of the instance RAM role. |
SMCAdmin |
| ContainerNamespace |
string |
No |
The namespace of the Docker container. For more information about Docker container images, see Container Registry. |
testNamespace |
| ContainerRepository |
string |
No |
The Docker image repository. For more information about Docker container images, see Container Registry. |
testRepository |
| ContainerTag |
string |
No |
The Docker image tag. For more information about Docker container images, see Container Registry. |
CentOS:v1 |
| LicenseType |
string |
No |
The license type. Valid values:
For more information, see SMC FAQ. |
BYOL |
| DataDisk |
array<object> |
No |
The list of data cloud disk information. |
|
|
array<object> |
No |
The list of data cloud disk information. |
||
| Index |
integer |
No |
The index of the data cloud disk on the destination Alibaba Cloud ECS instance. The initial value is 1. Valid values: 1 to 16. Note
You can create destination data cloud disks only for data disks that exist on the migration source. |
1 |
| Part |
array<object> |
No |
The partition list. |
|
|
object |
No |
The partition list. |
||
| SizeBytes |
integer |
No |
The size of partition N on target data cloud disk N. Unit: bytes. Default value: the size of the source data cloud disk partition. Note
|
254803968 |
| Block |
boolean |
No |
Specifies whether to enable block replication for partition N on data cloud disk N. Valid values: |
true |
| Device |
string |
No |
The device identifier of partition N on data cloud disk N. For the actual value of N, refer to the partition device identifier of the migration source. Note
If |
0_1 |
| Size |
integer |
No |
The size of the data cloud disk on the destination Alibaba Cloud ECS instance. Unit: GiB. Valid values: 20 to 32768. Note
The value of this parameter must be greater than the actual used space of the migration source data cloud disk. For example, if the source data cloud disk size is 500 GiB with 100 GiB actually used, the value of this parameter must be greater than 100 GiB. |
100 |
| Tag |
array<object> |
No |
The list of tags. |
|
|
object |
No |
The list of tags. |
||
| Key |
string |
No |
The tag key of the migration task. Valid values of N: 1 to 20. |
TestKey |
| Value |
string |
No |
The tag value of the migration task. Valid values of N: 1 to 20. |
TestValue |
| SystemDiskPart |
array<object> |
No |
The partition information of the system cloud disk. |
|
|
object |
No |
The list of system cloud disk partitions. |
||
| SizeBytes |
integer |
No |
The size of system cloud disk partition N. Unit: bytes. Default value: the size of the source system cloud disk partition. |
254803968 |
| Block |
boolean |
No |
Specifies whether to enable block replication for system cloud disk partition N. Valid values: |
true |
| Device |
string |
No |
The device identifier of system disk partition N. For the actual value of N, refer to the partition device identifier of the migration source. Note
If |
0_1 |
| JobType |
integer |
No |
The type of the migration task. Valid values: |
0 |
| ResourceGroupId |
string |
No |
The ID of the resource group. |
rg-acfmw3ty5y7**** |
| Disks |
object |
No |
The disk information. |
|
| System |
object |
No |
The system cloud disk information. |
|
| Size |
integer |
No |
The size of the system disk on the migration source. Unit: GiB. Valid values: 20 to 32768. Note
The value must be greater than the actual used space of the source system disk. For example, if the source system disk is 500 GiB but only 100 GiB is used, set this parameter to a value greater than 100 GiB. |
100 |
| LVM |
boolean |
No |
Specifies whether to use Logical Volume Manager (LVM). Valid values:
LVM cannot be enabled in the following scenarios:
After LVM is enabled, the feature does not take effect in the following scenarios:
|
true |
| Part |
array<object> |
No |
The partition information of the system cloud disk. |
|
|
object |
No |
The partition information of the system cloud disk. |
||
| SizeBytes |
integer |
No |
The size of the system cloud disk partition. Unit: bytes. |
254803968 |
| Block |
boolean |
No |
Specifies whether to enable block replication for the system cloud disk partition. |
true |
| Path |
string |
No |
The path of the system cloud disk partition. |
/boot |
| Data |
array<object> |
No |
The partition information of the data cloud disk. |
|
|
array<object> |
No |
The partition information of the data cloud disk. |
||
| Size |
integer |
No |
The size of the data cloud disk on the migration source. Unit: GiB. |
80 |
| LVM |
boolean |
No |
Specifies whether to use LVM for the data cloud disk. Valid values: |
|
| DiskId |
string |
No |
The ID of the data cloud disk. |
d-2ze8hyowhdgd6ou2m5z6 |
| Part |
array<object> |
No |
The partition information of the data cloud disk. |
|
|
object |
No |
The partition information of the data cloud disk. |
||
| SizeBytes |
integer |
No |
The size of the data cloud disk partition. Unit: bytes. |
21474836480 |
| Block |
boolean |
No |
Specifies whether block replication is enabled for the data cloud disk partition. Valid values:
|
true |
| Path |
string |
No |
The path of the data cloud disk partition. |
/home/date |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
C8B26B44-0189-443E-9816-D951F59623A9 |
| JobId |
string |
The ID of the migration task. |
j-bp17bclvg344jlyt**** |
Examples
Success response
JSON format
{
"RequestId": "C8B26B44-0189-443E-9816-D951F59623A9",
"JobId": "j-bp17bclvg344jlyt****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ReplicationJobDataDiskIndex.Invalid | The specified replication job contains data disk index not found in source server. | The specified replication job contains data disk indexes that do not exist in the source server. |
| 400 | VSwitchIdVpcId.Mismatch | The specified VSwitchId and VpcId does not match. | The specified VSwitchId and VpcId does not match. |
| 400 | InvalidSecurityGroupId.IncorrectNetworkType | The network type of the specified security group does not support this action. | The network type of the specified security group does not support this action. |
| 400 | InvalidSecurityGroupId.VPCMismatch | The specified security group and the specified virtual switch are not in the same VPC. | The specified security group and the specified virtual switch are not in the same VPC. |
| 400 | QuotaExceeded.ReplicationJob | The maximum number of replication jobs is exceeded. Please submit a ticket to raise the quota. | The maximum number of replication jobs is exceeded. Please submit a ticket to raise the quota. |
| 400 | ReplicationJobName.Duplicate | The specified replication job name already exists. | The specified replication job name already exists. |
| 400 | SourceServerState.Invalid | The specified source server status: %s is invalid. This operation can only be performed in the following status: %s. | The specified source server status: %s is invalid. This operation can only be performed in the following status: %s. |
| 400 | ImageName.UsedByReplicationJob | The specified imageName: "%s" was used by another replication job in the current region. | The specified imageName: "%s" was used by another replication job in the current region. |
| 400 | InvalidOsMigrationType.NotMatched | The SourceOsType: %s and TargetOsType: %s are not matched. The supported TargetOsType list is: %s. | The SourceOsType: %s and TargetOsType: %s are not matched. The supported TargetOsType list is: %s. |
| 500 | InternalError | An error occurred while processing your request. Please try again. If the problem still exists, please submit a ticket. | An error occurred while processing your request. Please try again. If the problem still exists, please submit a ticket. |
| 403 | EntityNotExist.Role | The account is unauthorized. Please assign the role AliyunServiceRoleForSMC to your account. | The account does not have the operation permission, please assign the account AliyunServiceRoleForSMC role. |
| 403 | RealNameAuthenticationError | You must perform real-name verification for your account. | The account does not have real-name authentication. Please perform real-name authentication first. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.