All Products
Search
Document Center

AnalyticDB:DescribeAvailableAdvices

Last Updated:Aug 30, 2024

Queries the available suggestions for cluster optimization.

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
adb:DescribeAvailableAdvicesget
  • DBCluster
    acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

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****
RegionIdstringYes

The region ID of the cluster.

Note You can call the DescribeRegions operation to query the most recent region list.
cn-hangzhou
AdviceDatelongYes

The date when the suggestion is generated. Specify the date in the yyyyMMdd format. The date must be in UTC.

20221124
LangstringYes

The display language of the suggestion. Default value: zh. Valid values:

  • zh: simplified Chinese
  • en: English
  • ja: Japanese
  • zh-tw: traditional Chinese
zh
PageSizelongYes

The number of entries to return on each page. Default value: 30. Valid values:

  • 30
  • 50
  • 100
30
PageNumberlongYes

The number of the page to return. The value must be an integer that is greater than 0. Default value: 1.

1

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Itemsarray<object>

The queried suggestions.

object
AdviceIdstring

The suggestion ID.

dcd04135-0925-4aed-a5a7-e7d92cb1****
AdviceDatestring

The time when the suggestion was generated. The time follows the ISO 8601 standard in the yyyyMMdd format. The time is displayed in UTC.

20221124
AdviceTypestring

The type of the suggestion. Valid values:

  • Index: index optimization.
  • Tiering: hot and cold data optimization.
Index
SQLstring

The SQL statement that is used to apply the suggestion.

alter table `schema1`.`table1` drop key col1_1_idx
Reasonstring

The reason why the suggestion was generated.

Unused for 15 days, historical usage less than 1%
Benefitstring

The benefit of the suggestion.

0.4 GB of storage saved
TotalCountlong

The total number of entries returned. Minimum value: 0. Default value: 0.

30
PageSizelong

The number of entries per page. Valid values:

  • 30 (default)
  • 50
  • 100
30
PageNumberlong

The page number. Pages start from 1. Default value: 1.

1
PageNumberlong

The page number of the returned page. The value must be an integer that is greater than 0. Default value: 1.

1
PageSizelong

The number of entries returned per page. Default value: 30. Valid values:

  • 30
  • 50
  • 100
30
RequestIdstring

The ID of the request.

96A55627-28E9-5E47-B8F6-D786BE551349
TotalCountlong

The total number of entries returned. The value must be an integer that is greater than or equal to 0. Default value: 0.

30

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400MissingParameter.PageSizeThe PageSize parameter is required.The PageSize parameter is not specified.

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

Change history

Change timeSummary of changesOperation
2024-04-17The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details
2023-04-06The Error code has changedView Change Details