ListStoragePartitionsInfo

Updated at:

Retrieves the storage details of each partition in a partitioned table within 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:ListStoragePartitionsInfo

get

*Storage

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

None None

Request syntax

GET /api/v1/observations/analysis/storage/projects/{project}/tables/{table}/partitionsInfo HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

project

string

Yes

The name of the MaxCompute project.

odps_project

table

string

Yes

The table name.

bank_data

Request parameters

Parameter

Type

Required

Description

Example

tenantId

string

No

The tenant ID. You can view the tenant ID by logging on to the MaxCompute console and choosing Tenant Management > Tenant Properties in the left-side navigation pane.

40713753659****

region

string

No

The region ID.

cn-beijing

date

string

Yes

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

20241205

schema

string

No

The name of the schema.

schema

partitionPrefix

string

No

The partition name for fuzzy matching.

20241201

types

array

No

The storage types.

string

No

The storage type. Valid values:

  • standardStorage: Standard storage.

  • lowFreqStorage: Low-frequency storage.

  • longTermStorage: Long-term storage.

standardStorage

orderColumn

string

No

The sort column.

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.

0be3e0bd16661643917136451ebf55

httpCode

integer

The HTTP status code. Valid values:

  • 1xx: Informational response. 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 it.

  • 4xx: Client error. The request contains bad syntax, invalid parameters, 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.

storagePartitionInfoList

array<object>

The list of partition storage information.

object

The list of partition storage information.

projectName

string

The project name.

odps_project

schemaName

string

The schema name.

schema

tableName

string

The table name.

bank_data

partition

string

The partition name.

ds=20241201

isPartitioned

boolean

Indicates whether the table is partitioned. This API operation returns only partition information. You can ignore this field.

false

type

string

The type.

PARTITION

storageType

string

The storage type. Valid values:

  • standard: Standard storage.

  • lowfrequency: Low-frequency storage.

  • longterm: Long-term storage.

standard

totalFrequency

integer

The access frequency.

Note
  • Access behaviors include:

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

  • The table is downloaded by using 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 additional access.

  • The statistics for this data have been gradually upgraded since July 2023. Accesses that did not occur after the upgrade or accesses made through ALGO jobs or Hologres direct read cannot be counted in the access frequency.

10

totalInputAmount

number

The total amount of accessed data.

Note

The amount of data read by all access behaviors.

1

totalInputAmountUnit

string

The unit of the total amount of accessed data.

GB

fileCount

integer

The number of files.

2

fileSize

number

The storage size.

1

fileSizeUnit

string

The unit of the storage size.

GB

rate

number

The year-over-year comparison of the total storage capacity over the recent {$recentDays} days. This API operation does not return this value.

1%

lastAccessTime

integer

The last access time of the data in the partition.

Note

The collection of this data has been gradually upgraded since July 2023. The last_access_time cannot be collected if the partition has not been accessed after the upgrade or if it is accessed through ALGO jobs or Hologres direct read.

1694589365

date

string

The statistical date. The format is YYYYMMDD.

20241205

totalCount

integer

The total number of returned results.

57

pageNumber

integer

The current page number.

1

pageSize

integer

The number of entries per page.

10

Examples

Success response

JSON format

{
  "requestId": "0be3e0bd16661643917136451ebf55",
  "httpCode": 200,
  "errorCode": "OBJECT_NOT_EXIST",
  "errorMsg": "This object does not exist.",
  "data": {
    "storagePartitionInfoList": [
      {
        "projectName": "odps_project",
        "schemaName": "schema",
        "tableName": "bank_data",
        "partition": "ds=20241201",
        "isPartitioned": false,
        "type": "PARTITION",
        "storageType": "standard",
        "totalFrequency": 10,
        "totalInputAmount": 1,
        "totalInputAmountUnit": "GB",
        "fileCount": 2,
        "fileSize": 1,
        "fileSizeUnit": "GB",
        "rate": 0,
        "lastAccessTime": 1694589365
      }
    ],
    "date": "20241205",
    "totalCount": 57,
    "pageNumber": 1,
    "pageSize": 10
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.