ListStorageTablesInfo

Updated at:

Retrieves the storage details of tables in a specified MaxCompute project.

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:ListStorageTablesInfo

get

*Storage

acs:odps:{#regionId}:{#accountId}:storage/{#project}

None None

Request syntax

GET /api/v1/observations/analysis/storage/projects/{project}/tablesInfo HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

project

string

Yes

The name of the MaxCompute project.

odps_project

Request parameters

Parameter

Type

Required

Description

Example

tenantId

string

No

The tenant ID. To view the tenant ID, log on to the MaxCompute console and choose Tenant Management > Tenant Properties in the left-side navigation pane.

28074710977****

region

string

No

The region ID.

cn-beijing

date

string

Yes

The statistical date at the day level. Specify the date in the YYYYMMdd format.

20241205

recentDays

integer

No

The number of days for comparison.

1

schema

string

No

The schema to which the table belongs.

schema

tablePrefix

string

No

The table name for fuzzy match.

bank

types

array

No

The storage type.

string

No

The storage type.

standardStorage

orderColumn

string

No

The column used for sorting.

totalFrequency

ascOrder

boolean

No

Specifies whether to sort the results in ascending order.

false

pageSize

integer

No

The number of entries to return on each page. Default value: 10.

10

pageNumber

integer

No

The page number.

1

Response elements

Element

Type

Description

Example

object

The response parameters.

requestId

string

The request ID.

0bc12e6a16679892465424670db3eb

httpCode

integer

The HTTP status code.

  • 1xx: Informational - The request was received and is being processed.

  • 2xx: Success - The request was successfully received, understood, and accepted by the server.

  • 3xx: Redirection - The request was redirected, and further action is required to complete the request.

  • 4xx: Client error - The request contains invalid parameters, bad syntax, or cannot be fulfilled.

  • 5xx: Server error - The server failed to fulfill the request due to other reasons.

200

errorCode

string

The error code.

OBJECT_NOT_EXIST

errorMsg

string

The error message.

This object does not exist.

data

object

The returned result.

storageTableInfoList

array<object>

The list of table storage information.

object

The list of table storage information.

date

string

The statistical date. This field is not returned. The format is YYYYMMDD.

20241205

projectName

string

The name of the project.

odps_project

schemaName

string

The name of the schema.

schema

tableName

string

The name of the table.

bank_data

isPartitioned

boolean

Indicates whether the table is a partitioned table.

false

storageType

string

The storage type of the table. Valid values:

  • standard: Standard storage.

  • lowfrequency: Infrequent access storage.

  • longterm: Long-term storage.

  • unknown: This value is returned when the table is a partitioned table. You must call the ListStoragePartitionsInfo operation to query the storage type of each partition.

standard

lastAccessTime

integer

The last time the data in the table was accessed. This field is returned only when the table is a non-partitioned table.

Note

Data collection for this metric was gradually upgraded starting from July 2023. If the table has not been accessed since the upgrade, or if it was accessed through ALGO jobs or Hologres direct read, the last access time cannot be collected.

1694589365

totalStorageFileCount

integer

The total number of files.

2

totalStorage

number

The total storage usage. For a partitioned table, this value is the sum of the storage usage of all partitions. If the partitions have different storage types, this value is the sum of the storage usage of all storage types.

600

totalStorageUnit

string

The unit of storage usage.

KB

rate

number

The comparison of the total storage usage over the recent {$recentDays} days.

0

standardStorageFileCount

integer

The number of files in standard storage.

2

standardStorage

number

The standard storage usage.

600

standardStorageUnit

string

The unit of standard storage usage.

KB

longTermStorageFileCount

integer

The number of files in long-term storage.

0

longTermStorage

number

The long-term storage usage.

0

longTermStorageUnit

string

The unit of long-term storage usage.

B

lowFreqStorageFileCount

integer

The number of files in infrequent access storage.

0

lowFreqStorage

number

The infrequent access storage usage.

0

lowFreqStorageUnit

string

The unit of infrequent access storage usage.

B

totalFrequency

integer

The access frequency.

Note
  • Access behaviors include:

Note
  • The table is used as an input table in an SQL computing task.

  • The table is downloaded through Tunnel.

  • The table is read by calling the Read operation of StorageAPI (partition-level data for partitioned tables is currently unavailable). The access frequency increases by 1 for each access.

  • Data collection for this metric was gradually upgraded starting from July 2023. If the table has not been accessed since the upgrade, or if it was accessed through ALGO jobs or Hologres direct read, the accesses cannot be counted towards the access frequency.

10

totalInputAmount

number

The total amount of accessed data.

Note

The total amount of data read by all access behaviors.

1

totalInputAmountUnit

string

The unit of the total amount of accessed data.

GB

date

string

The statistical date. The format is YYYYMMDD.

20241205

totalCount

integer

The total number of returned results.

1

pageNumber

integer

The page number.

1

pageSize

integer

The number of entries per page.

10

Examples

Success response

JSON format

{
  "requestId": "0bc12e6a16679892465424670db3eb",
  "httpCode": 200,
  "errorCode": "OBJECT_NOT_EXIST",
  "errorMsg": "This object does not exist.\n",
  "data": {
    "storageTableInfoList": [
      {
        "date": "20241205",
        "projectName": "odps_project",
        "schemaName": "schema",
        "tableName": "bank_data",
        "isPartitioned": false,
        "storageType": "standard",
        "lastAccessTime": 1694589365,
        "totalStorageFileCount": 2,
        "totalStorage": 600,
        "totalStorageUnit": "KB",
        "rate": 0,
        "standardStorageFileCount": 2,
        "standardStorage": 600,
        "standardStorageUnit": "KB",
        "longTermStorageFileCount": 0,
        "longTermStorage": 0,
        "longTermStorageUnit": "B",
        "lowFreqStorageFileCount": 0,
        "lowFreqStorage": 0,
        "lowFreqStorageUnit": "B",
        "totalFrequency": 10,
        "totalInputAmount": 1,
        "totalInputAmountUnit": "GB"
      }
    ],
    "date": "20241205",
    "totalCount": 1,
    "pageNumber": 1,
    "pageSize": 10
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.