Modifies the parameters of a migration task.
Usage notes
Before you modify the parameters of a migration task, take note of the following information:
- The
Name
andDescription
parameters can be modified during the lifecycle of the migration task. - The
Frequency
andMaxNumberOfImageToKeep
parameters can be modified only before the migration task is performed or when the migration task is in theWaiting
state. - Other parameters can be modified only before the migration task is performed.
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | ModifyReplicationJobAttribute | The operation that you want to perform. Set the value to ModifyReplicationJobAttribute. |
JobId | String | No | j-bp19vlwm0tyigbmj**** | The ID of the migration task. |
Name | String | No | testMigrationTaskName | The name of the migration task. The name must meet the following requirements:
|
Description | String | No | This_is_my_migration_task | The description of the migration task. The description must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter but cannot start with |
TargetType | String | No | Image | The type of destination to which the source server is migrated. You can modify the value only before the migration task starts. Valid values:
Note
|
ScheduledStartTime | String | No | 2019-06-04T13:35:00Z | The time when the migration task is performed. SMC starts the migration task at the specified time. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. For example, 2018-01-01T12:00:00Z specifies 20:00:00 on January 1, 2018 (UTC+8). Note If you do not specify this parameter, SMC does not automatically start the migration task. You must call the StartReplicationJob operation to start the task. |
ImageName | String | No | testAliCloudImageName | The name of the destination image. The name must meet the following requirements:
Note If the specified image name already exists in the region in which the migration task is running, the migration task ID is appended to the image name as a suffix. Example: ImageName-JobId. |
InstanceId | String | No | i-bp1f1dvfto1sigz5**** | The ID of the destination ECS instance. |
SystemDiskSize | Integer | No | 50 | The system disk size of the destination ECS instance. Unit: GiB. Valid values: 20 to 500. Note The value must be greater than the used space of the system disk on the source server. For example, if the source system disk has 500 GiB of storage space and 100 GiB of data, you must set this parameter to a value greater than 100 GiB. |
Frequency | Integer | No | 10 | The interval at which an incremental migration task runs. Unit: hours. Valid values: 1 to 168. This parameter is required if you set the |
MaxNumberOfImageToKeep | Integer | No | 5 | The maximum number of images that are retained for an incremental migration task. Valid values: 1 to 10. This parameter is required if you set the |
InstanceType | String | No | ecs.c5.large | The type of the intermediate instance. You can call the DescribeInstanceTypes operation to query the instance types that are provided by ECS.
|
LaunchTemplateId | String | No | lt-bp16jovvln1cgaaq**** | The ID of the launch template. |
LaunchTemplateVersion | String | No | Latest | The version number of the launch template. |
InstanceRamRole | String | No | SMCAdmin | The RAM role that is attached to the intermediate instance. |
ContainerNamespace | String | No | testNamespace | The namespace of the destination Docker container image. For more information about Docker container images, see Terms. |
ContainerRepository | String | No | testRepository | The repository that stores the destination Docker container image. For more information about Docker container images, see Terms. |
ContainerTag | String | No | CentOS:v1 | The tag of the destination Docker container image. For more information about Docker container images, see Terms. |
ValidTime | String | No | 2019-06-04T13:35:00Z | The time when the migration task expires. You can schedule the migration task to expire 7 to 90 days after the task is created.
By default, a migration task is valid for 30 days after it is created. |
SystemDiskPart.N.SizeBytes | Long | No | 254803968 | The size of partition N in the destination system disk. Unit: bytes. The default value is equal to the partition size of the source system disk. Note The total size of all partitions in the destination system disk cannot exceed the size of the destination system disk. |
SystemDiskPart.N.Block | Boolean | No | true | Specifies whether to enable block replication for partition N in the destination system disk. Valid values:
|
SystemDiskPart.N.Device | String | No | 0_1 | The device ID of partition N in the destination system disk. Note The partitions in the destination system disk are arranged in the same sequential order as those in the source system disk. |
DataDisk.N.Index | Integer | No | 1 | The index of data disk N on the destination ECS instance. Valid values: 1 to 16. Data disks on a destination ECS instance are arranged in a sequential order that starts from 1. Note To create a destination data disk for a source server, make sure that the source server has data disks. |
DataDisk.N.Part.N.SizeBytes | Long | No | 254803968 | The size of partition N in the destination data disk. Unit: bytes. The default value is equal to the partition size of the source data disk. Note The total size of all partitions in the destination data disk cannot exceed the size of the destination data disk. |
DataDisk.N.Part.N.Block | Boolean | No | true | Specifies whether to enable block replication for partition N in the destination data disk. Valid values:
|
DataDisk.N.Part.N.Device | String | No | 0_1 | The device ID of partition N in the destination data disk. Note The partitions in the destination data disk are arranged in the same sequential order as those in the source data disk. |
DataDisk.N.Size | Integer | No | 100 | The data disk size of the destination ECS instance. Unit: GiB. Valid values: 20 to 32768. Note The size of a destination data disk must be greater than the size of data in the source data disk. For example, if the source data disk has 500 GiB of storage space and 100 GiB of data, you must set this parameter to a value greater than 100 GiB. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 1C488B66-B819-4D14-8711-C4EAAA13AC01 | The ID of the request. |
Examples
Sample requests
http(s)://smc.aliyuncs.com/?Action=ModifyReplicationJobAttribute
&JobId=j-bp19vlwm0tyigbmj****
&Name=testMigrationTaskName
&Description=This_is_my_migration_task
&TargetType=Image
&ScheduledStartTime=2019-06-04T13:35:00Z
&ImageName=testAliCloudImageName
&InstanceId=i-bp1f1dvfto1sigz5****
&SystemDiskSize=50
&Frequency=10
&MaxNumberOfImageToKeep=5
&InstanceType=ecs.c5.large
&LaunchTemplateId=lt-bp16jovvln1cgaaq****
&LaunchTemplateVersion=Latest
&InstanceRamRole=SMCAdmin
&ContainerNamespace=testNamespace
&ContainerRepository=testRepository
&ContainerTag=CentOS:v1
&ValidTime=2019-06-04T13:35:00Z
&SystemDiskPart=[{"SizeBytes":254803968,"Block":true,"Device":"0_1"}]
&DataDisk=[{"Index":1,"Part":[{"SizeBytes":254803968,"Block":true,"Device":"0_1"}],"Size":100}]
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyReplicationJobAttributeResponse>
<RequestId>1C488B66-B819-4D14-8711-C4EAAA13AC01</RequestId>
</ModifyReplicationJobAttributeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"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 error message returned because the data disks of the migration source have duplicate indexes. |
400 | ReplicationJob.InvalidStatus | The specified replication job status is invalid. | The error message returned because the migration task is in an invalid status and the operation is not supported. |
400 | ReplicationJobDataDiskIndex.Invalid | The specified replication job contains data disk index not found in source server. | The error message returned because the migration task specifies one or more data disk indexes that are not found in the source server. |
400 | ReplicationJobName.Duplicate | The specified replication job name already exists. | The error message returned because the specified migration task name already exists. Specify another name for the migration task. |
500 | InternalError | An error occurred while processing your request. Please try again. If the problem still exists, please submit a ticket. | The error message returned because an internal error had occurred. Try again later. If the error persists, submit a ticket. |
For a list of error codes, see Service error codes.