All Products
Search
Document Center

ApsaraDB RDS:DescribeUpgradeMajorVersionPrecheckTask

Last Updated:Jan 15, 2024

You can call the DescribeUpgradeMajorVersionPrecheckTask operation to query the check report for a major engine version upgrade to an ApsaraDB RDS for PostgreSQL instance.

Operation Description

Before you upgrade the major engine version of an ApsaraDB RDS for PostgreSQL instance, you must perform an upgrade check and make sure that the check result is Success. You can call this operation to query the upgrade check report.

If the check result is Fail, you must handle the errors that occurred. For more information about how to handle common errors, see Introduction to the check report for a major engine version upgrade to an ApsaraDB RDS for PostgreSQL instance.

debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

debugging

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

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The ID of the instance.

pgm-bp1c808s731l****
PageSizeintegerNo

The number of entries to return on each page of the upgrade check report.

Valid values:

  • 30 (This is the default value.)
  • 50
  • 100
30
PageNumberintegerNo

The number of the page to return in the upgrade check report.

Valid values: any non-zero positive integer. Default value: 1.

1
TargetMajorVersionstringNo

The new major engine version of the instance. The new major engine version must be later than the original major engine version.

For example, if the original major engine version is PostgreSQL 9.4, the new major engine version can be PostgreSQL 10, PostgreSQL 11, PostgreSQL 12, or PostgreSQL 13.

12.0
TaskIdintegerNo

The ID of the upgrade check task. You can obtain the ID of the upgrade check task from the TaskId parameter that is returned from the call of the UpgradeDBInstanceMajorVersionPrecheck operation.

416980000

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

D1586777-41B5-5F9E-81E8-93DFDD379024
PageNumberinteger

The page number of the returned page.

1
PageRecordCountinteger

The number of entries returned per page.

30
TotalRecordCountinteger

The total number of entries in the upgrade check report.

1
Itemsobject []

An array that consists of the attributes in the upgrade check report.

TargetMajorVersionstring

The new major engine version of the instance.

12.0
EffectiveTimestring

The expiration time of the upgrade check report.

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

1635748703000
SourceMajorVersionstring

The original major engine version of the instance.

11.0
Resultstring

The result of the upgrade check.

Valid values:

  • Success
  • Fail
Note If the check result is Fail, you must check the value of the Detail parameter to obtain the information about the errors that occurred. After you handle the errors, you can try again. For more information about how to handle common errors, see Introduction to the check report for a major engine version upgrade to an ApsaraDB RDS for PostgreSQL instance.
Success
TaskIdinteger

The ID of the upgrade check task.

416980000
Detailstring

The content of the upgrade check report.

[user_check_report]User check success\n[pg_upgrade_internal.log]Performing...
CheckTimestring

The time at which the upgrade check was performed.

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

1635143903000

Examples

Sample success responses

JSONformat

{
  "RequestId": "D1586777-41B5-5F9E-81E8-93DFDD379024",
  "PageNumber": 1,
  "PageRecordCount": 30,
  "TotalRecordCount": 1,
  "Items": [
    {
      "TargetMajorVersion": "12.0",
      "EffectiveTime": "1635748703000",
      "SourceMajorVersion": "11.0",
      "Result": "Success",
      "TaskId": 416980000,
      "Detail": "[user_check_report]User check success\\n[pg_upgrade_internal.log]Performing...",
      "CheckTime": "1635143903000"
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidDBInstanceName.NotFoundThe specified DB instance name does not exist.The instance name does not exist.

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