Modifies the parameters of a migration job.
Operation description
Usage notes
Before you modify the parameters of a migration job, take note of the following information:
- The
Name
andDescription
parameters can be modified during the lifecycle of the migration job. - The
Frequency
andMaxNumberOfImageToKeep
parameters can be modified only before the migration job is executed or when the migration job is in theWaiting
state. - Other parameters can be modified only before the migration job is executed.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
JobId | string | Yes | The migration job ID. | j-bp19vlwm0tyigbmj**** |
Name | string | No | The name of the migration job. The name must meet the following requirements:
| testMigrationTaskName |
Description | string | No | The description of the migration job. 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 and cannot start with | This_is_my_migration_task |
TargetType | string | No | The type of destination to which the source server is migrated. You can modify the value only before the migration job starts. Valid values:
Note
| Image |
ScheduledStartTime | string | No | The time when the migration job is executed. SMC starts the migration job 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 indicates 20:00:00 on January 1, 2018 (UTC+8). Note
If ScheduledStartTime is left empty, SMC does not automatically start the migration job. In this case, you must call the StartReplicationJob operation to start the migration job.
| 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 whose name is the same as that of the destination image already exists in the current region when the migration job is in progress, the system adds the migration job ID to the end of the image name by default. Example: ImageName-JobId.
| testAliCloudImageName |
InstanceId | string | No | The destination instance ID. | i-bp1f1dvfto1sigz5**** |
SystemDiskSize | integer | No | The system disk size of the destination ECS instance. Unit: GiB. Valid values: 20 to 500. 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.
| 50 |
Frequency | integer | No | The interval at which an incremental migration job runs. Unit: hour. Valid values: 1 to 168. This parameter is required if you set the | 10 |
MaxNumberOfImageToKeep | integer | No | The maximum number of images that are retained for an incremental migration job. Valid values: 1 to 10. This parameter is required if you set the | 5 |
InstanceType | string | No | The type of the intermediate instance. You can call the DescribeInstanceTypes operation to query the ECS instance types.
see the "How does SMC create an intermediate instance?" section of the "FAQ" topic. | ecs.c5.large |
LaunchTemplateId | string | No | The launch template ID. | lt-bp16jovvln1cgaaq**** |
LaunchTemplateVersion | string | No | The version number of the launch template. | Latest |
InstanceRamRole | string | No | The name of the Resource Access Management (RAM) role that is attached to the intermediate instance. | SMCAdmin |
ContainerNamespace | string | No | The namespace of the destination Docker container image. For more information about Docker container images, see Terms . | testNamespace |
ContainerRepository | string | No | The repository that stores the destination Docker container image. For more information about Docker container images, see Terms . | testRepository |
ContainerTag | string | No | The tag of the destination Docker container image. For more information about Docker container images, see Terms . | CentOS:v1 |
ValidTime | string | No | The time when the migration job expires. You can schedule the migration job to expire 7 to 90 days after the job is created.
By default, a migration job is valid for 30 days after it is created. | 2019-06-04T13:35:00Z |
SystemDiskPart | object [] | No | The partition information of the system disk. | |
SizeBytes | long | No | 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.
| 254803968 |
Block | boolean | No | Specifies whether to enable block replication for partition N in the destination system disk. Valid values:
| true |
Device | string | No | The 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.
| 0_1 |
DataDisk | object [] | No | The information about the data disk. | |
Index | integer | No | The index of data disk N on the destination ECS instance. Valid values of N: 1 to 16. Data disks on a destination ECS instance are arranged in a sequential order that starts from 1. Note
You can create a destination data disk only for a source server that has data disks.
| 1 |
Part | object [] | No | The information about partitions. | |
SizeBytes | long | No | The size of partition N in the destination data disk. Unit: bytes. The default value is equal to the corresponding size of the partition in 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.
| 254803968 |
Block | boolean | No | Specifies whether to enable block replication for partition N in the destination data disk. Valid values:
| true |
Device | string | No | The 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.
| 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 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.
| 100 |
Response parameters
Examples
Sample success responses
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 | ReplicationJob.InvalidStatus | The specified replication job status is invalid. | The specified replication job status is invalid. |
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. |
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-01-22 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||||||||||
| ||||||||||||||||||||
2024-01-19 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||||||||||
|