All Products
Search
Document Center

ApsaraDB RDS:DescribeUpgradeMajorVersionTasks

Last Updated:Apr 28, 2024

Queries the historical tasks for major engine version upgrades of an ApsaraDB RDS for PostgreSQL instance.

Operation description

Supported database engines

PostgreSQL

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

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

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

pgm-bp1gm3yh0ht1****
PageSizeintegerNo

The number of entries per page.

Valid values: 30 to 100.

Default value: 30.

30
PageNumberintegerNo

The page number.

Pages start from 1.

Default value: 1.

1
TargetMajorVersionstringNo

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

  • 10.0
  • 11.0
  • 12.0
  • 13.0
  • 14.0
  • 15.0
12.0
TaskIdintegerNo

A reserved parameter. You do not need to specify this parameter.

417450000

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

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

The page number.

1
PageRecordCountinteger

The number of entries per page.

30
TotalRecordCountinteger

The total number of entries returned.

1
Itemsobject []

The tasks for major engine version upgrades.

TargetMajorVersionstring

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

  • 10.0
  • 11.0
  • 12.0
  • 13.0
  • 14.0
  • 15.0
12.0
Resultstring

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.
Success
EndTimestring

The end time of the task.

This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC. Unit: milliseconds.

1614237779000
StartTimestring

The start time of the task.

This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC. Unit: milliseconds.

1614236007000
SourceMajorVersionstring

The major engine version of the original instance.

11.0
UpgradeModestring

The upgrade mode.

Valid values:

  • clone: The system does not migrate data to the new instance and does not switch your workloads over to the new instance.
  • switch: The system migrates data to the new instance and switches your workloads over to the new instance.
switch
CollectStatModestring

The time when the system collects the statistics.

Valid values:

  • After: The system collects the statistics after a switchover.
  • Before: The system collects the statistics before a switchover.
After
SourceInsNamestring

The ID of the original instance.

pgm-bp1i3kkq7321****
TaskIdinteger

The task ID.

342900000
TargetInsNamestring

The ID of the new instance.

pgm-bp1c0v6d8092****
SwitchTimestring

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

This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC. Unit: milliseconds.

1614237539000
Detailstring

The details of the task.

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

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.