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
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
smc:ModifyReplicationJobAttribute | update |
|
| none |
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 | array<object> | No | The partition information of the system disk. | |
object | No | Partition information of 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 | array<object> | No | The information about the data disk. | |
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 | array<object> | No | The information about partitions. | |
object | No | The number of parts. | ||
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 |
NetMode | integer | No | The network mode for data transmission. Valid values:
| 0 |
VSwitchId | string | No | The ID of the vSwitch in the VPC. | vsw-bp1ddbrxdlrcbim46**** |
VpcId | string | No | The ID of the VPC for which an Express Connect circuit or VPN gateway is configured. | vpc-bp1vwnn14rqpyiczj**** |
ReplicationParameters | string | No | The parameters of the replication driver. The parameters are fixed key-value pairs of the JSON format. The value can be up to 2,048 characters in length. A replication driver is a tool that is used to replicate the data of a source server to an intermediate instance. The parameters vary based on the replication driver type. If you use a Server Migration Tool (SMT) driver, you can set the following parameters:
For more information about the replication driver, see the response parameter | {"bandwidth_limit":0,"compress_level":1,"checksum":true} |
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 | 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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-03-22 | The Error code has changed | View Change Details |
2024-01-22 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2024-01-19 | The Error code has changed. The request parameters of the API has changed | View Change Details |