All Products
Search
Document Center

ApsaraDB RDS:DescribeUpgradeMajorVersionTasks

Last Updated:May 29, 2023

You can call the DescribeUpgradeMajorVersionTasks operation to query the tasks that are created to upgrade the major engine version of an ApsaraDB RDS for PostgreSQL instance.

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

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The ID of the original instance.

pgm-bp1gm3yh0ht1****
PageSizeintegerNo

The ID of the new instance.

30
PageNumberintegerNo

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

1
TargetMajorVersionstringNo

The ID of the task.

12.0
TaskIdintegerNo

This parameter is reserved. You do not need to specify this parameter.

417450000

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The time at which the task started.

The value of this parameter is a timestamp that follows the UNIX time format. Unit: milliseconds.

152E0C6D-B9C3-4468-9F2C-FEF9D9E8417B
PageNumberinteger

The total number of entries.

1
PageRecordCountinteger

The major engine version of the new instance. Valid values:

  • 10.0
  • 11.0
  • 12.0
  • 13.0
30
TotalRecordCountinteger

The status of the task.

  • Success: The task is successful.
  • Failed: The task failed.
  • Running: The task is in the phase in which data is being migrated to a new instance.
1
Itemsobject []

The ID of the original instance.

TargetMajorVersionstring

The time at which your workloads are switched over from the original instance to the new instance.

The value of this parameter is a timestamp that follows the UNIX time format. Unit: milliseconds.

12.0
Resultstring

Indicates whether ApsaraDB RDS migrates data to the new instance and switches your workloads over to the new instance.

Valid values:

  • clone: ApsaraDB RDS does not migrate data to the new instance and does not switch your workloads over to the new instance.
  • switch: ApsaraDB RDS migrates data to the new instance and switches your workloads over to the new instance.
Success
EndTimestring

The number of entries returned on each page.

1614237779000
StartTimestring

The details of the task.

1614236007000
SourceMajorVersionstring

The major engine version of the new instance. Valid values:

  • 10.0
  • 11.0
  • 12.0
  • 13.0
11.0
UpgradeModestring

The page number of the returned page.

switch
CollectStatModestring

The ID of the request.

After
SourceInsNamestring

The time at which the task ended.

The value of this parameter is a timestamp that follows the UNIX time format. Unit: milliseconds.

pgm-bp1i3kkq7321****

Examples

Sample success responses

JSONformat

{
  "RequestId": "152E0C6D-B9C3-4468-9F2C-FEF9D9E8417B",
  "PageNumber": 1,
  "PageRecordCount": 30,
  "TotalRecordCount": 1,
  "Items": [
    {
      "TargetMajorVersion": "12.0",
      "Result": "Success",
      "EndTime": "1614237779000",
      "StartTime": "1614236007000",
      "SourceMajorVersion": "11.0",
      "UpgradeMode": "switch",
      "CollectStatMode": "After",
      "SourceInsName": "pgm-bp1i3kkq7321****",
      "TaskId": 342900000,
      "TargetInsName": "pgm-bp1c0v6d8092****",
      "SwitchTime": "1614237539000",
      "Detail": "2021-10-27 15:03:05 --- do upgrade precheck on slave succcess.\\n2021-10-27 15:03:11 --- begin to upgrade major version, source instance will locked in readonly mode.\\n2021-10-27 15:03:21 --- upgrade master success.\\n2021-10-27 15:06:10 --- exchange source and target instance dns success.\\n"
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
404InvalidDBInstanceName.NotFoundThe database instance does not exist.The name of the RDS instance cannot be found. Check the name of the RDS instance.

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