You can call the ModifyReplicationJobAttribute operation to modify the information of a migration task.
Operation description
Description
Before you modify a migration task, note the following:
-
The
NameandDescriptionparameters can be modified at any time during the lifecycle of the migration task. -
The
FrequencyandMaxNumberOfImageToKeepparameters can be modified only before the migration task is executed or when the task is in theWaitingstate. -
Other parameters can be modified only before the migration task is executed.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
smc:ModifyReplicationJobAttribute |
update |
*ReplicationJob
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| JobId |
string |
Yes |
The ID of the migration task. |
j-bp19vlwm0tyigbmj**** |
| 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. It must start with a letter or a Chinese character. It cannot start with |
This_is_my_migration_task |
| TargetType |
string |
No |
The type of the migration destination. This parameter can be modified only before the migration task starts. Valid values:
Note
|
Image |
| ScheduledStartTime |
string |
No |
The time when you want to start the migration task. SMC automatically starts the migration task at the specified time. The time must follow the ISO 8601 standard and be in UTC. The format is YYYY-MM-DDThh:mm:ssZ. For example, 2018-01-01T12:00:00Z specifies 20:00:00 on January 1, 2018 (UTC+8). Note
If you leave this parameter empty, SMC does not automatically start the migration task. You must call the StartReplicationJob operation to start the task. |
2019-06-04T13:35:00Z |
| ImageName |
string |
No |
The name of the destination image. The name must meet the following requirements:
Note
If an image with the same name already exists in the current region when the migration task is running, the system adds the migration task ID (JobId) to the end of the image name as a suffix. Example: ImageName-JobId. |
testAliCloudImageName |
| InstanceId |
string |
No |
The ID of the destination instance. |
i-bp1f1dvfto1sigz5**** |
| SystemDiskSize |
integer |
No |
The system disk size of the destination ECS instance. Unit: GiB. Valid values: 20 to 500. Note
The value of this parameter must be greater than the space that is used by the system disk of the source server. For example, if the system disk of the source server is 500 GiB in size and 100 GiB of the space is used, you must set this parameter to a value greater than 100. |
50 |
| Frequency |
integer |
No |
The interval at which an incremental migration task runs. Unit: hours. Valid values: 1 to 168. This parameter is required if the |
10 |
| MaxNumberOfImageToKeep |
integer |
No |
The maximum number of images to retain for an incremental migration task. Valid values: 1 to 10. This parameter is required if the |
5 |
| InstanceType |
string |
No |
The instance type of the intermediate instance. You can call the DescribeInstanceTypes operation to query the instance types provided by ECS.
|
ecs.c5.large |
| LaunchTemplateId |
string |
No |
The ID of the launch template. |
lt-bp16jovvln1cgaaq**** |
| LaunchTemplateVersion |
string |
No |
The version of the launch template. |
Latest |
| InstanceRamRole |
string |
No |
The name of the RAM role for the instance. |
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 image repository for the Docker container. For more information about Docker container images, see Container Registry. |
testRepository |
| ContainerTag |
string |
No |
The image tag for the Docker container. For more information about Docker container images, see Container Registry. |
CentOS:v1 |
| ValidTime |
string |
No |
The expiration time of the migration task. The value can be a time that is 7 to 90 days later than the time when the migration task is created.
Default value: 30 days after the migration task is created. This means that the migration task is valid for 30 days by default. |
2019-06-04T13:35:00Z |
| SystemDiskPart |
array<object> |
No |
The partitions of the system disk. |
|
|
object |
No |
The partitions of the system disk. |
||
| SizeBytes |
integer |
No |
The size of partition N of the destination system disk. Unit: bytes. The default value is the size of the source system disk partition. Note
The size of a partition cannot exceed the size of the system disk. The total size of all partitions in a system disk cannot exceed the size of the system disk. |
254803968 |
| Block |
boolean |
No |
Specifies whether to enable block replication for partition N of the destination system disk. Valid values:
|
true |
| Device |
string |
No |
The device ID of partition N of the destination system disk. Note
For the value of N, see the device ID of the source partition. |
0_1 |
| DataDisk |
array<object> |
No |
The data disks. |
|
|
array<object> |
No |
The data disks. |
||
| Index |
integer |
No |
The sequence number of the data disk on the destination ECS instance. Valid values: 1 to 16. The initial value is 1. Note
You can create a destination data disk only for a data disk that exists on the source server. |
1 |
| Part |
array |
No |
The partitions. |
|
|
object |
No |
The partitions. |
||
| SizeBytes |
integer |
No |
The size of partition N of data disk N. Unit: bytes. The default value is the size of the source data disk partition. Note
The size of a partition cannot exceed the size of the data disk. The total size of all partitions in a data disk cannot exceed the size of the data disk. |
254803968 |
| Block |
boolean |
No |
Specifies whether to enable block replication for partition N of data disk N. Valid values:
|
true |
| Device |
string |
No |
The device ID of partition N of data disk N. Note
For the value of N, see the device ID of the source partition. |
0_1 |
| Size |
integer |
No |
The size of the data disk on the destination ECS instance. Unit: GiB. Valid values: 20 to 32768. Note
The value of this parameter must be greater than the space that is used by the data disk of the source server. For example, if the data disk of the source server is 500 GiB in size and 100 GiB of the space is used, you must set this parameter to a value greater than 100. |
100 |
| NetMode |
integer |
No |
The network mode for data transmission. Valid values:
|
0 |
| VSwitchId |
string |
No |
The ID of the vSwitch in the specified VPC. |
vsw-bp1ddbrxdlrcbim46**** |
| VpcId |
string |
No |
The ID of the VPC that is configured with Express Connect or a VPN Gateway. |
vpc-bp1vwnn14rqpyiczj**** |
| ReplicationParameters |
string |
No |
The parameters of the replication driver. The parameters are key-value pairs in the JSON format. The keys are fixed. The value can be up to 2,048 characters in length. The replication driver is a tool that is used to replicate data from the source server to the intermediate instance. The parameters supported by replication drivers may vary. The SMT replication driver supports the following parameters:
For information about the value of the replication driver, see the |
{"bandwidth_limit":0,"compress_level":1,"checksum":true} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
1C488B66-B819-4D14-8711-C4EAAA13AC01 |
Examples
Success response
JSON format
{
"RequestId": "1C488B66-B819-4D14-8711-C4EAAA13AC01"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | DataDisk.DuplicateIndex | The source server data disk cannot contain the same index. | The source server data disk cannot contain the same index. |
| 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 | ReplicationJobName.Duplicate | The specified replication job name already exists. | The specified replication job name already exists. |
| 400 | ReplicationJob.InvalidStatus | The specified replication job status: %s is invalid. This operation can only be performed in the following status: %s. | The specified replication job status: %s is invalid. This operation can only be performed in the following status: %s. |
| 400 | ReplicationJob.InvalidBusinessStatus | The specified business status: %s of the replication job is invalid. This operation can only be performed in the following status: %s. | The specified business status: %s of the replication job 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. |
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.