All Products
Search
Document Center

ApsaraDB RDS:CreateCloudMigrationPrecheckTask

Last Updated:Apr 17, 2024

Creates an assessment task for cloud migration to an ApsaraDB RDS for PostgreSQL instance.

Operation description

Supported database engines

  • PostgreSQL

References

Note Before you call this operation, carefully read the following documentation. Make sure that you fully understand the prerequisites and impacts for calling this operation.

Use the cloud migration feature

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
rds:CreateCloudMigrationPrecheckTaskRead
  • DBInstance
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
  • rds:ResourceTag
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceNamestringYes

The instance ID. You can call the DescribeDBInstances operation to query the instance ID.

pgm-bp102g323jd4****
SourceIpAddressstringYes

The private IP address that is used to connect to the self-managed PostgreSQL instance.

  • If the self-managed PostgreSQL instance resides on an ECS instance, enter the private IP address of the ECS instance. For more information about how to obtain the private IP address of an ECS instance, see View IP addresses.
  • If the self-managed PostgreSQL instance resides in an on-premises data center, enter the private IP address of the on-premises data center.
172.2.XX.XX
SourcePortlongYes

The port that is used to connect to the self-managed PostgreSQL instance. You can run the netstat -a | grep PGSQL command to view the port.

5432
SourceAccountstringYes

The username of the account that is used to connect to the self-managed PostgreSQL instance. Enter the username of the account that you created in the Create an account for cloud migration on a self-managed PostgreSQL instance topic.

migratetest
SourcePasswordstringYes

The password of the account that is used to connect to the self-managed PostgreSQL instance. Enter the password of the account that you created in the Create an account for cloud migration on a self-managed PostgreSQL instance topic.

123456
TaskNamestringNo

The name of the task. If you do not specify this parameter, ApsaraDB RDS automatically generates a name for the cloud migration task.

slf7w7wj3g
SourceCategorystringYes

The environment in which the self-managed PostgreSQL instance runs.

  • idcOnVpc: The self-managed PostgreSQL instance resides in a data center. The data center can communicate with the VPC to which the ApsaraDB RDS for PostgreSQL instance belongs.
  • ecsOnVpc: The self-managed PostgreSQL instance resides on an ECS instance.
ecsOnVpc

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

DBInstanceNamestring

The name of the instance.

pgm-bp102g323jd4****
RequestIdstring

The ID of the request.

60F9A12A-16B8-4728-B099-4CA38D32C31C
TaskIdlong

The ID of the task.

439946016
TaskNamestring

The name of the task.

slf7w7wj3g

Examples

Sample success responses

JSONformat

{
  "DBInstanceName": "pgm-bp102g323jd4****",
  "RequestId": "60F9A12A-16B8-4728-B099-4CA38D32C31C",
  "TaskId": 439946016,
  "TaskName": "slf7w7wj3g"
}

Error codes

HTTP status codeError codeError messageDescription
400IncorrectDBInstanceStateThe current instance state does not support this operation.The operation is not supported. The RDS instance is not in a ready state.
403IncorrectDBInstanceThe current DB instance does not support this operation.The operation failed. The operation is not supported for the RDS instance.
403IncorrectDBInstanceTypeThe database instance type does not support the operation.The operation failed. The operation is not supported for the database engine of the RDS instance.
404InvalidDBInstanceName.NotFoundThe database instance does not exist.The name of the RDS instance cannot be found. Check the name of the RDS instance.
404IncorrectDBInstanceLockModeCurrent DB instance lock mode does not support this operation.The operation failed. The RDS instance is locked.

For a list of error codes, visit the Service error codes.