ListTableBuckets

更新时间:
复制 MD 格式

Lists all table buckets in a specified region in your Alibaba Cloud account.

Usage notes

  • Use the prefix parameter to filter table buckets by a name prefix.

  • Use the maxBuckets parameter to control the maximum number of table buckets returned in a single response. Default: 1,000.

  • If a response contains the continuationToken, the results are truncated. To retrieve the next page of results, include this token in your next request.

Permissions

API

Actions

Description

ListTableBuckets

oss:ListTableBuckets

Lists table buckets.

Request syntax

GET /buckets?continuationToken={continuationToken}&maxBuckets={maxBuckets}&prefix={prefix} HTTP/1.1
Host: cn-hangzhou.oss-tables.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

Request parameters

Parameter

Type

Required

Example

Description

maxBuckets

Integer

No

10

The maximum number of table buckets to return. Valid values: 1 to 1,000. Default value: 1,000.

prefix

String

No

my-

Limits the response to table buckets whose names begin with the specified prefix.

continuationToken

String

No

-

A pagination token from a previous truncated response. Include this token to retrieve the next page of results.

Response parameters

Parameter

Type

Example

Description

tableBuckets

Array

-

The list of table buckets. Each element contains the arn, createdAt, name, ownerAccountId, tableBucketId, and type of a table bucket.

continuationToken

String

-

A pagination token returned when the result set is truncated. Include this token in a subsequent request to retrieve the next page of results.

Examples

Request example

GET /buckets?maxBuckets=10 HTTP/1.1
Host: cn-hangzhou.oss-tables.aliyuncs.com
Date: GMT Date
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/osstables/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c****

Response example

HTTP/1.1 200 OK
Server: AliyunOSS
x-oss-request-id: 5C06A3B67B8B5A3DA422****
x-oss-server-time: 3
Content-Type: application/json


{
   "continuationToken": "xxxxx",
   "tableBuckets": [
      {
         "arn": "acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket",
         "createdAt": "2024-01-01T00:00:00.000000Z",
         "name": "my-table-bucket",
         "ownerAccountId": "1234567890",
         "tableBucketId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
         "type": "customer"
      }
   ]
}

SDKs

You can call this operation by using the following SDKs:

Ossutil command-line tool

For the ossutil command of this operation, see list-table-buckets.

Error codes

Error code

HTTP status code

Description

BadRequestException

400

The request is invalid or malformed.

ForbiddenException

403

The caller is not authorized to perform this operation.