GetStorageSuggestion

Updated at:

Performs a paging query on tiered storage suggestions for the current tenant by project, and compares the current costs of each project with the estimated costs after implementing the suggestions.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

odps:GetStorageSuggestion

list

*All Resource

*

None None

Request syntax

GET /api/v1/observations/analysis/storage/cost/info HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

tenantId

string

No

The MaxCompute tenant ID. If omitted, the tenant in the request context is used.

1234567890123456

region

string

No

The MaxCompute region ID. If omitted, the region in the request context is used.

cn-hangzhou

projectPrefix

string

No

The project name prefix. If omitted, all projects are queried.

example

orderColumn

string

No

The sort field. Valid values: price, suggestedPrice, and savedPrice. Default value: savedPrice.

savedPrice

ascOrder

boolean

No

Specifies whether to sort the results in ascending order based on the specified field. Default value: false, which indicates descending order.

pageSize

integer

No

The number of records to return per page. Default value: 10. Maximum value: 100.

10

pageNumber

integer

No

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

1

Response elements

Element

Type

Description

Example

object

PopResult

requestId

string

The unique identifier of the API request. Provide this identifier when troubleshooting call issues.

0be3e0aa16667684362147582e038f

httpCode

integer

The HTTP status code of the request.

200

errorCode

string

The error code returned when the request fails.

InvalidArgument

errorMsg

string

The error message returned when the request fails.

The specified parameter is invalid.

data

object

The project-level tiered storage suggestions and pagination information.

storageSuggestionInfoList

array<object>

The list of suggestions aggregated by project. Each record corresponds to a project.

object

project

string

The name of the MaxCompute project to which the table belongs.

example_project

schema

string

[Deprecated] Do not rely on this field. This API operation does not populate this field.

null

table

string

[Deprecated] Do not rely on this field. This API operation does not populate this field.

null

partition

string

[Deprecated] Do not rely on this field. This API operation does not populate this field.

null

type

string

[Deprecated] Do not rely on this field. This API operation does not populate this field.

null

size

number

[Deprecated] Do not rely on this field. This API operation does not populate this field.

0

unit

string

[Deprecated] Do not rely on this field. This API operation does not populate this field.

null

suggestedType

string

[Deprecated] Do not rely on this field. This API operation does not populate this field.

null

price

number

The current storage cost. For the currency, see priceUnit.

100

suggestedPrice

number

The estimated storage cost after applying the suggested plan. For the currency, see priceUnit.

65

savedPrice

number

The estimated storage cost saved after applying the suggestions. For the currency, see priceUnit.

35

priceUnit

string

The currency of the cost. RMB indicates Chinese yuan, and DOLLAR indicates US dollars.

RMB

lastAccessTime

integer

[Deprecated] Do not rely on this field. This API operation does not populate this field.

0

createTime

integer

[Deprecated] Do not rely on this field. This API operation does not populate this field.

0

date

string

The date corresponding to the statistical data, in the format of yyyyMMdd.

20260101

totalCount

integer

The total number of records that meet the filter conditions.

12

pageNumber

integer

The actual page number of the query. Pages start from 1.

1

pageSize

integer

The page size used for the query.

10

Examples

Success response

JSON format

{
  "requestId": "0be3e0aa16667684362147582e038f",
  "httpCode": 200,
  "errorCode": "InvalidArgument",
  "errorMsg": "The specified parameter is invalid.",
  "data": {
    "storageSuggestionInfoList": [
      {
        "project": "example_project",
        "schema": "null",
        "table": "null",
        "partition": "null",
        "type": "null",
        "size": 0,
        "unit": "null",
        "suggestedType": "null",
        "price": 100,
        "suggestedPrice": 65,
        "savedPrice": 35,
        "priceUnit": "RMB",
        "lastAccessTime": 0,
        "createTime": 0
      }
    ],
    "date": "20260101",
    "totalCount": 12,
    "pageNumber": 1,
    "pageSize": 10
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.