All Products
Search
Document Center

Server Migration Center:ModifyReplicationJobAttribute

Last Updated:Oct 29, 2024

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 and Description parameters can be modified during the lifecycle of the migration job.
  • The Frequency and MaxNumberOfImageToKeep parameters can be modified only before the migration job is executed or when the migration job is in the Waiting state.
  • Other parameters can be modified only before the migration job is executed.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
smc:ModifyReplicationJobAttributeupdate
  • ReplicationJob
    acs:smc:{#regionId}:{#accountId}:replicationjob/{#JobId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
JobIdstringYes

The migration job ID.

j-bp19vlwm0tyigbmj****
NamestringNo

The name of the migration job. The name must meet the following requirements:

  • The name must be unique.
  • The name 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 http:// or https://.
testMigrationTaskName
DescriptionstringNo

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 http:// or https://.

This_is_my_migration_task
TargetTypestringNo

The type of destination to which the source server is migrated. You can modify the value only before the migration job starts. Valid values:

  • Image: After the migration job is complete, Server Migration Center (SMC) generates a destination Elastic Compute Service (ECS) image for the source server. You can use the image to create an ECS instance.
  • ContainerImage: After the migration job is complete, SMC generates a container image for the source server. You can use the container image in Container Registry.
  • TargetInstance: After the migration job is complete, SMC migrates the source server to the destination instance. If you set this parameter to TargetInstance, you must set the InstanceId parameter.
Note
  • The value of this parameter is not case-sensitive.

  • SMC does not allow you to migrate Windows servers or servers that run operating systems on the ARM architecture to Container Registry.

Image
ScheduledStartTimestringNo

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
ImageNamestringNo

The name of the destination image. The name must meet the following requirements:

  • The name must be unique within an Alibaba Cloud region.
  • The name 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 http:// or https://.
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
InstanceIdstringNo

The destination instance ID.

i-bp1f1dvfto1sigz5****
SystemDiskSizeintegerNo

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
FrequencyintegerNo

The interval at which an incremental migration job runs. Unit: hour. Valid values: 1 to 168.

This parameter is required if you set the RunOnce parameter to false.

10
MaxNumberOfImageToKeepintegerNo

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

5
InstanceTypestringNo

The type of the intermediate instance.

You can call the DescribeInstanceTypes operation to query the ECS instance types.

  • If you specify this parameter, SMC creates an intermediate instance of the specified instance type. If the specified instance type is unavailable, you cannot create the migration job.
  • If you do not specify this parameter, SMC selects an available instance type in a specific order to create an intermediate instance. For more information,

see the "How does SMC create an intermediate instance?" section of the "FAQ" topic.

ecs.c5.large
LaunchTemplateIdstringNo

The launch template ID.

lt-bp16jovvln1cgaaq****
LaunchTemplateVersionstringNo

The version number of the launch template.

Latest
InstanceRamRolestringNo

The name of the Resource Access Management (RAM) role that is attached to the intermediate instance.

SMCAdmin
ContainerNamespacestringNo

The namespace of the destination Docker container image. For more information about Docker container images, see Terms .

testNamespace
ContainerRepositorystringNo

The repository that stores the destination Docker container image. For more information about Docker container images, see Terms .

testRepository
ContainerTagstringNo

The tag of the destination Docker container image. For more information about Docker container images, see Terms .

CentOS:v1
ValidTimestringNo

The time when the migration job expires. You can schedule the migration job to expire 7 to 90 days after the job is created.

  • This parameter can be modified only if the migration job is in the Ready, Running, Stopped, InError, or Waiting state.
  • 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).
  • If you do not specify this parameter, the migration job does not expire.
  • After a migration job expires, the job state changes to Expired. SMC retains the migration job for seven days after the job expires. After the job is retained for seven days, SMC deletes the migration job.

By default, a migration job is valid for 30 days after it is created.

2019-06-04T13:35:00Z
SystemDiskPartarray<object>No

The partition information of the system disk.

objectNo

Partition information of system disk.

SizeByteslongNo

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
BlockbooleanNo

Specifies whether to enable block replication for partition N in the destination system disk. Valid values:

  • true
  • false
true
DevicestringNo

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
DataDiskarray<object>No

The information about the data disk.

objectNo

The information about the data disk.

IndexintegerNo

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
Partarray<object>No

The information about partitions.

objectNo

The number of parts.

SizeByteslongNo

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
BlockbooleanNo

Specifies whether to enable block replication for partition N in the destination data disk. Valid values:

  • true
  • false
true
DevicestringNo

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
SizeintegerNo

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
NetModeintegerNo

The network mode for data transmission. Valid values:

  • 0: Data is transmitted over the Internet. Make sure that the source server can access the Internet.
  • 2: Data is transmitted over a virtual private cloud (VPC). If you set this parameter to 2, you must specify the VSwitchId parameter. You can leave the VpcId parameter empty, the VPC ID can be queried by calling an operation.
0
VSwitchIdstringNo

The ID of the vSwitch in the VPC.

vsw-bp1ddbrxdlrcbim46****
VpcIdstringNo

The ID of the VPC for which an Express Connect circuit or VPN gateway is configured.

vpc-bp1vwnn14rqpyiczj****
ReplicationParametersstringNo

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:

  • bandwidth_limit: the maximum bandwidth for data transmission.
  • compress_level: the compression ratio of data to be transmitted.
  • checksum: specifies whether to enable checksum verification

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

{"bandwidth_limit":0,"compress_level":1,"checksum":true}

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

1C488B66-B819-4D14-8711-C4EAAA13AC01

Examples

Sample success responses

JSONformat

{
  "RequestId": "1C488B66-B819-4D14-8711-C4EAAA13AC01"
}

Error codes

HTTP status codeError codeError messageDescription
400DataDisk.DuplicateIndexThe source server data disk cannot contain the same index.The source server data disk cannot contain the same index.
400ReplicationJobDataDiskIndex.InvalidThe 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.
400ReplicationJobName.DuplicateThe specified replication job name already exists.The specified replication job name already exists.
400ReplicationJob.InvalidStatusThe 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.
400ReplicationJob.InvalidBusinessStatusThe 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.
400ImageName.UsedByReplicationJobThe 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.
500InternalErrorAn 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 timeSummary of changesOperation
2024-03-22The Error code has changedView Change Details
2024-01-22The Error code has changed. The request parameters of the API has changedView Change Details
2024-01-19The Error code has changed. The request parameters of the API has changedView Change Details