Deletes a migration source.

Description

  • If a migration task is created for the migration source and the migration task is in the Running state, the migration source cannot be deleted.
  • If a migration task is created for the migration source but the migration task is not in the Running state, you can set the Force parameter to true to delete the migration source.

Request parameters

Parameter Type Required Example Description
Action String Yes DeleteSourceServer

The operation that you want to perform. Set the value to DeleteSourceServer.

SourceId String Yes s-bp17m1vi6x20c6g6****

The ID of the migration source.

Force Boolean No true

Specifies whether to forcibly delete the migration source. Valid values:

  • true: forcibly deletes the migration source and the migration task created for the migration source, and releases the intermediate resources of the migration task.
  • false: does not delete the migration source if a migration task is created for the migration source.

Response parameters

Parameter Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

Examples

Sample request

http(s)://smc.aliyuncs.com/?Action=DeleteSourceServer
&SourceId=s-bp17m1vi6x20c6g6****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DeleteSourceServerResponse>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
</DeleteSourceServerResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

HTTP status code Error code Error message Description
400 SourceServerState.Invalid The specified source server status is invalid. The error message returned because the migration source is in an invalid state and the operation is not supported.
400 SourceServer.WithRunningReplicationJob The specified source server has related replication jobs that are running. The error message returned because the migration task created for the migration source is in the Running state.
400 ReplicationJob.Related The specified source server has related replication jobs. The error message returned because a migration task is created for the migration source.
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 has occurred. Try again later. If the error persists, submit a ticket.

For a list of error codes, visit the API Error Center.