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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
rds:DescribeUpgradeMajorVersionTasks | Read |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceId | string | Yes | The ID of the original instance. | pgm-bp1gm3yh0ht1**** |
PageSize | integer | No | The ID of the new instance. | 30 |
PageNumber | integer | No | The operation that you want to perform. Set the value to DescribeUpgradeMajorVersionTasks. | 1 |
TargetMajorVersion | string | No | The ID of the task. | 12.0 |
TaskId | integer | No | This parameter is reserved. You do not need to specify this parameter. | 417450000 |
Response parameters
Examples
Sample success responses
JSON
format
{
"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 code | Error code | Error message | Description |
---|---|---|---|
404 | InvalidDBInstanceName.NotFound | The 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.