All Products
Search
Document Center

Server Migration Center:ModifyReplicationJobAttribute

Last Updated:Sep 08, 2025

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 Name and Description parameters can be modified at any time during the lifecycle of the migration task.

  • The Frequency and MaxNumberOfImageToKeep parameters can be modified only before the migration task is executed or when the task is in the Waiting state.

  • Other parameters can be modified only before the migration task is executed.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

smc:ModifyReplicationJobAttribute

update

*ReplicationJob

acs:smc:{#regionId}:{#accountId}:replicationjob/{#JobId}

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:

  • The name must be unique.

  • The name must be 2 to 128 characters in length. It must start with a letter or a Chinese character. It cannot start with http:// or https://. It can contain digits, colons (:), underscores (_), and hyphens (-).

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 http:// or https://. It can contain digits, colons (:), underscores (_), and hyphens (-).

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:

  • Image: After the migration is complete, SMC generates an Alibaba Cloud image from the source server. You can use this image to create an ECS instance.

  • ContainerImage: After the migration is complete, SMC generates a container image from the source server. You can use this image in Container Registry.

  • TargetInstance: After the migration is complete, SMC migrates the source to a destination instance. If you set this parameter to this value, you must also specify the InstanceId parameter.

Note
  • The value of this parameter is not case-sensitive.

  • Migrating servers that run Windows or an Arm-based operating system to container images is not supported.

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:

  • The image name must be unique in the same Alibaba Cloud region.

  • The name must be 2 to 128 characters in length. It must start with a letter or a Chinese character. It cannot start with http:// or https://. It can contain digits, colons (:), underscores (_), and hyphens (-).

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 RunOnce parameter is set to false.

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 RunOnce parameter is set to false.

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.

  • If you specify this parameter, the system creates an intermediate instance of this instance type. If the specified instance type is out of stock, the migration task fails to be created.

  • If you do not specify this parameter, the system selects an instance type in a specific order to create the intermediate instance. For more information, see SMC FAQ.

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.

  • You can modify the expiration time only when the migration task is in the Ready, Running, Stopped, InError, or Waiting state.

  • 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).

  • If you leave this parameter empty, the task does not expire.

  • After a task expires, it is marked as Expired. The task is retained for 7 days. After 7 days, the system automatically deletes the task.

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

  • false

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

  • false

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: Internet transfer mode. The source server must be able to access the Internet. Data is transferred over the Internet.

  • 2: internal network transfer mode. If you select this mode, you must set the VSwitchId parameter. The VpcId parameter is not required because the service can automatically query the VPC ID.

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:

  • bandwidth_limit: the bandwidth limit for data transmission.

  • compress_level: the compression ratio of data to be transferred.

  • checksum: specifies whether to enable checksum verification.

For information about the value of the replication driver, see the SourceServers.ReplicationDriver parameter in the response of the DescribeSourceServers operation.

{"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.