GetTableLogging
Queries the table-level logging override configuration of a specified table.
Usage notes
-
The returned status is either disabled or notConfigured. disabled indicates that logging has been explicitly disabled for the table.
-
notConfigured indicates that no table-level disable configuration is set. Whether the table records logs depends on the logging configuration of the table bucket. notConfigured does not mean that bucket logging is necessarily enabled.
-
This operation returns only the table-level override configuration. It does not return the log delivery destination, prefix, or other information about the table bucket. To query that information, use the GetTableBucketLogging operation.
Permissions
|
API |
Action |
Description |
|
GetTableLogging |
oss:GetTableLogging |
Queries the logging override configuration of the table (the table resource policy is also checked). |
Request syntax
GET /tables/{tableBucketARN}/{namespace}/{name}/logging 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****
Request parameters
|
Parameter |
Type |
Required |
Example |
Description |
|
tableBucketARN |
string |
Yes |
acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket |
The ARN of the table bucket. Format: acs:osstables:{region}:{uid}:bucket/{bucketName}. This parameter is part of the URI, and must be URL-encoded when placed in the path. |
|
namespace |
string |
Yes |
my_namespace |
The name of the top-level namespace that contains the table. This parameter is part of the URI. |
|
name |
string |
Yes |
my_table |
The table name. This parameter is part of the URI. |
Examples
The following example queries the table-level logging configuration of my_table in my_namespace. The status field in the response body indicates the table-level logging status. disabled indicates that logging has been explicitly disabled for the table, and notConfigured indicates that no table-level disable configuration is set.
Request example
GET /tables/acs%3Aosstables%3Acn-hangzhou%3A1234567890%3Abucket%2Fmy-table-bucket/my_namespace/my_table/logging HTTP/1.1
Host: cn-hangzhou.oss-tables.aliyuncs.com
Date: Thu, 10 Apr 2025 08:00:00 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/osstables/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c****
Response example
HTTP/1.1 200 OK
Content-Type: application/json
Server: AliyunOSS
x-oss-request-id: 5C06A3B67B8B5A3DA422****
x-oss-server-time: 3
{
"status": "disabled"
}
Error codes
|
Error code |
HTTP status code |
Description |
|
ForbiddenException |
403 |
The required permissions are missing or the request is not allowed. |
|
NotFoundException |
404 |
The specified table bucket or table does not exist. |