SetTableStorageTier
Sets the storage tiers for tables or partitions in batches within the same project. Returns the tables or partitions that failed to be processed along with the failure reasons. Returns an empty list if all operations succeed.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
odps:SetTableStorageTier |
update |
*All Resource
|
None | None |
Request syntax
PUT /api/v1/projects/{projectName}/tables/storageTier HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| projectName |
string |
Yes |
The name of the MaxCompute project in which to set the storage tiers. |
analytics_prod |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
array<object> |
No |
The list of tables or partitions for which to set the storage tiers. |
|
|
object |
No |
|||
| tableName |
string |
No |
The name of the table. |
order_detail |
| schemaName |
string |
No |
The name of the schema. If this parameter is not specified, the default schema is used. |
sales |
| partitionSpec |
string |
No |
The partition expression, in the format of ds=20240101/region=cn. If this parameter is not specified, the operation is performed at the table level. |
ds=20261123/region=cn |
| storageTier |
string |
No |
The target storage tier. |
lowfrequency |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
PopResult |
||
| requestId |
string |
The unique identifier of the API request. You can use this ID to troubleshoot 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 |
array<object> |
The list of tables or partitions for which the storage tier configuration failed. An empty list is returned if all operations succeed. |
|
|
object |
|||
| tableName |
string |
The name of the table. |
order_detail |
| schemaName |
string |
The name of the schema. |
sales |
| partitionSpec |
string |
The partition expression. |
ds=20261123/region=cn |
| storageTier |
string |
The target storage tier. |
lowfrequency |
| errorMessage |
string |
The cause of the failure. |
The specified partition does not exist. |
Examples
Success response
JSON format
{
"requestId": "0be3e0aa16667684362147582e038f",
"httpCode": 200,
"errorCode": "InvalidArgument",
"errorMsg": "The specified parameter is invalid.",
"data": [
{
"tableName": "order_detail",
"schemaName": "sales",
"partitionSpec": "ds=20261123/region=cn",
"storageTier": "lowfrequency",
"errorMessage": "The specified partition does not exist."
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.