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
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
rds:DescribeUpgradeMajorVersionPrecheckTask | Read |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceId | string | Yes | The ID of the instance. | pgm-bp1c808s731l**** |
PageSize | integer | No | The number of entries to return on each page of the upgrade check report. Valid values:
| 30 |
PageNumber | integer | No | The number of the page to return in the upgrade check report. Valid values: any non-zero positive integer. Default value: 1. | 1 |
TargetMajorVersion | string | No | 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 |
TaskId | integer | No | 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
Examples
Sample success responses
JSON
format
{
"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 code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidDBInstanceName.NotFound | The specified DB instance name does not exist. | The instance name does not exist. |
For a list of error codes, visit the Service error codes.