All Products
Search
Document Center

MaxCompute:SumStorageMetricsByType

Last Updated:Apr 16, 2026

Aggregates storage usage by storage type.

Operation description

Aggregates storage usage by storage type.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /api/v1/storageMetrics/sumByType HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body. For example: {"startDate":1775736972887,"endDate":1776255372887}

projectNames

array

No

An array of project names.

string

No

A project name.

projectName

startDate

integer

No

Required. The query start time, specified as a Unix timestamp in milliseconds.

1715393576201

endDate

integer

No

Required. The query end time, specified as a Unix timestamp in milliseconds.

1718590596556

statsType

string

No

The dimension for aggregating statistics. Valid values: PROJECT (by project) and STORAGE_TYPE (by storage type).

PROJECT

Response elements

Element

Type

Description

Example

object

{ "data":[ { "unit":"GB", "usage":1300590.087592, "dailyStorageMetrics":[ { "dateTime":"20260409", "unit":"GB", "usage":188646.972738, "percentage":100.0 }, { "dateTime":"20260410", "unit":"GB", "usage":183595.781138, "percentage":100.0 }, { "dateTime":"20260411", "unit":"GB", "usage":183558.852148, "percentage":100.0 }, { "dateTime":"20260412", "unit":"GB", "usage":182844.984265, "percentage":100.0 }, { "dateTime":"20260413", "unit":"GB", "usage":184196.743598, "percentage":100.0 }, { "dateTime":"20260414", "unit":"GB", "usage":183833.465982, "percentage":100.0 }, { "dateTime":"20260415", "unit":"GB", "usage":193913.287722, "percentage":100.0 } ], "storageType":"Storage" }, { "unit":"GB", "usage":1300590.087592, "dailyStorageMetrics":[ { "dateTime":"20260409", "unit":"GB", "usage":188646.972738, "percentage":100.0 }, { "dateTime":"20260410", "unit":"GB", "usage":183595.781138, "percentage":100.0 }, { "dateTime":"20260411", "unit":"GB", "usage":183558.852148, "percentage":100.0 }, { "dateTime":"20260412", "unit":"GB", "usage":182844.984265, "percentage":100.0 }, { "dateTime":"20260413", "unit":"GB", "usage":184196.743598, "percentage":100.0 }, { "dateTime":"20260414", "unit":"GB", "usage":183833.465982, "percentage":100.0 }, { "dateTime":"20260415", "unit":"GB", "usage":193913.287722, "percentage":100.0 } ], "storageType":"$sum" } ], "requestId":"0adbb1ef17762559936096081d0001" }

requestId

string

The request ID.

0a06dc0917476202205161986edbbc

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 is needed to complete the request.

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

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

200

data

array<object>

The returned data.

array<object>

An object that contains the aggregated storage metrics for a specific storage type.

storageType

string

The storage type. Valid values:

  • Storage: standard storage.

  • LowFreqStorage: infrequent access storage.

  • ColdStorage: archive storage.

  • $sum: total storage.

  • RecycleBinStorage: recycle bin storage.

  • DRStorage: multi-AZ storage.

Storage

usage

number

The total storage usage.

329.503338

unit

string

The unit of the storage metric.

GB

dailyStorageMetrics

array<object>

A list of daily storage usage metrics.

object

An object that contains the daily storage usage metric.

storageType

string

The storage type. Valid values:

  • Storage: standard storage.

  • LowFreqStorage: infrequent access storage.

  • ColdStorage: archive storage.

  • $sum: total storage.

  • RecycleBinStorage: recycle bin storage.

  • DRStorage: multi-AZ storage.

Storage

dateTime

string

The date of the metric, in yyyyMMdd format.

20260410

usage

number

The storage usage for this day.

30

percentage

number

The percentage of total daily storage that this storage type accounts for.

50

unit

string

The unit of the storage metric.

GB

Examples

Success response

JSON format

{
  "requestId": "0a06dc0917476202205161986edbbc",
  "httpCode": 200,
  "data": [
    {
      "storageType": "Storage",
      "usage": 329.503338,
      "unit": "GB",
      "dailyStorageMetrics": [
        {
          "storageType": "Storage",
          "dateTime": "20260410",
          "usage": 30,
          "percentage": 50,
          "unit": "GB"
        }
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.