ListStoragePartitionsInfo

Updated at:

Retrieves storage details for the partitions of a partitioned table in a 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 MaxCompute project name.

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 find this ID in the MaxCompute console by navigating to Tenant Management > Tenant Properties.

40713753659****

region

string

No

The region ID.

cn-beijing

date

string

Yes

The date for which to retrieve statistics. The date must be in YYYYMMdd format.

20241205

schema

string

No

The schema that contains the table.

schema

partitionPrefix

string

No

The partition name. This parameter supports fuzzy matching.

20241201

types

array

No

The storage types.

string

No

Valid values:

  • standardStorage: standard storage.

  • lowFreqStorage: infrequent access storage.

  • longTermStorage: archive storage.

standardStorage

orderColumn

string

No

The column to sort by.

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.

  • 1xx: Informational response - The request has been received and is being processed.

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

  • 3xx: Redirection - Further action must be taken to complete the request.

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

  • 5xx: Server error - The server failed to fulfill a valid request.

200

errorCode

string

The error code.

OBJECT_NOT_EXIST

errorMsg

string

The error message.

This object does not exist.

data

object

The returned data.

storagePartitionInfoList

array<object>

The storage information for the partitions.

object

The storage information for a partition.

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 a partitioned table. You can ignore this parameter because this operation returns data only for partitions.

false

type

string

The type of the object. The value is always PARTITION.

PARTITION

storageType

string

The storage type. Valid values:

  • standard: Standard storage

  • lowfrequency: Infrequent-access storage

  • longterm: Archive storage

standard

totalFrequency

integer

The access frequency.

Note
  • Access activities include:

Note
  • The table is used as input in a SQL compute task.

  • The table is downloaded via Tunnel.

  • The table data is read by calling the Read operation of the StorageAPI. Partition-level data for partitioned tables is not available. Each access activity increases the access frequency by 1.

  • Data collection for this metric began a gradual rollout in July 2023. Consequently, the access frequency may not be recorded for tables that have not been accessed since then or are accessed only by ALGO jobs or direct reads from Hologres.

10

totalInputAmount

number

The total data accessed.

Note

The cumulative amount of data read from all access operations.

1

totalInputAmountUnit

string

The unit of the total data accessed.

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 period-over-period change in the total storage usage over the last {$recentDays} days. This API operation does not return this parameter.

1%

lastAccessTime

integer

The last access time of the partition.

Note

Data collection for this metric began a gradual rollout in July 2023. Consequently, the lastAccessTime may not be recorded for a partition that has not been accessed since then or is accessed only by ALGO jobs or direct reads from Hologres.

1694589365

date

string

The date to which the statistics apply.

20241205

totalCount

integer

The total number of entries.

57

pageNumber

integer

The page number of the returned data.

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.