Queries the available suggestions for cluster optimization.
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 |
---|---|---|---|---|
adb:DescribeAvailableAdvices | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBClusterId | string | Yes | The ID of the cluster. Note
You can call the DescribeDBClusters operation to query the IDs of Data Warehouse Edition (V3.0) clusters.
| am-bp198m028ih55**** |
RegionId | string | Yes | The region ID of the cluster. Note
You can call the DescribeRegions operation to query the most recent region list.
| cn-hangzhou |
AdviceDate | long | Yes | The date when the suggestion is generated. Specify the date in the yyyyMMdd format. The date must be in UTC. | 20221124 |
Lang | string | Yes | The display language of the suggestion. Default value: zh. Valid values:
| zh |
PageSize | long | Yes | The number of entries to return on each page. Default value: 30. Valid values:
| 30 |
PageNumber | long | Yes | The number of the page to return. The value must be an integer that is greater than 0. Default value: 1. | 1 |
Response parameters
Examples
Sample success responses
JSON
format
{
"Items": [
{
"AdviceId": "dcd04135-0925-4aed-a5a7-e7d92cb1****",
"AdviceDate": "20221124",
"AdviceType": "Index",
"SQL": "alter table `schema1`.`table1` drop key col1_1_idx",
"Reason": "Unused for 15 days, historical usage less than 1%",
"Benefit": "0.4 GB of storage saved",
"TotalCount": 30,
"PageSize": 30,
"PageNumber": 1
}
],
"PageNumber": 1,
"PageSize": 30,
"RequestId": "96A55627-28E9-5E47-B8F6-D786BE551349",
"TotalCount": 30
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | MissingParameter.PageSize | The PageSize parameter is required. | The PageSize parameter is not specified. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-04-17 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2023-04-06 | The Error code has changed | View Change Details |