All Products
Search
Document Center

ApsaraDB RDS:ActivateMigrationTargetInstance

Last Updated:May 29, 2023

Switches workloads over to an ApsaraDB RDS for PostgreSQL instance.

Operation Description

Prerequisites

Before you call the ActivateMigrationTargetInstance operation, make sure that a cloud migration task is created by calling the CreateCloudMigrationTask operation. In addition, make sure that the value that is returned for the MigrateStage parameter from the call of the DescribeCloudMigrationResult operation is increment.

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

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceNamestringYes

The ID of the destination instance. You can call the DescribeDBInstances operation to query the IDs of instances.

pgm-bp102g323jd4****
SwitchTimestringNo

A reserved parameter. This parameter does not take effect.

2022-02-25T06:57:41Z
SwitchTimeModestringNo

The time when you want to perform the switchover.

Set the value to 0. The value 0 specifies an immediate switchover.

0
ForceSwitchstringNo

Specifies whether to forcefully perform a switchover. Set the value to 1. The value 1 specifies a forceful switchover.

1

Response parameters

ParameterTypeDescriptionExample
object
DBInstanceNamestring

The name of the destination instance.

pgm-bp102g323jd4****
RequestIdstring

The ID of the request.

76364A52-E0AB-5CC8-9818-CF1DC482C092
TaskIdlong

The ID of the identification task.

440913675
SourceIpAddressstring

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

172.16.XX.XX
SourcePortlong

The port number that is used to connect to the self-managed PostgreSQL instance.

5432

Examples

Sample success responses

JSONformat

{
  "DBInstanceName": "pgm-bp102g323jd4****",
  "RequestId": "76364A52-E0AB-5CC8-9818-CF1DC482C092",
  "TaskId": 440913675,
  "SourceIpAddress": "172.16.XX.XX",
  "SourcePort": 5432
}

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.