You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Log Storage
GetBucketLogging
Copy page
Download PDF
GetBucketLogging

Feature description

This interface retrieves the configuration information of log storage.

Precautions

Currently, only Beijing and Shanghai support the log storage feature.

Request syntax

GET /?logging HTTP/1.1 
Host: bucketname.tos-cn-beijing.volces.com 
Authorization: authorization string 
Date: Fri, 30 Jul 2021 06:45:39 GMT

Request parameters and headers

This request uses public request headers. See Common parameters.

NameLocationTypeRequiredSample ValueDescription
loggingQueryStringYes-Represents a special identifier for the GetBucketLogging request.

Request body elements

This request does not use message elements.

Response headers

This request returns the common response message header. See Common Parameters.

Response body elements

NameTypeSample ValueDescription
LoggingEnabledContainer-Configuration rules for log storage function.
TargetBucketStringtestThe target storage bucket for storing log files.

TargetPrefix

String

tos-accesslog

The log file storage path in the target bucket.
For example, if you set TargetPrefix to tos-accesslog, the log files will be stored under the path tos-accesslog/SourceBucket/YYYY-MM-DD-HH-MM-SS, with file names automatically generated by the system.

RoleStringServiceRoleforTOSLoggingThe role name used to grant object storage permission to read all files from the source bucket and write files to the target bucket. This role must have read and write permissions on TOS as well as service access permissions. You can also use the TOS default role ServiceRoleforTOSLogging.

Sample request

GET /?logging HTTP/1.1 
Host: bucketname.tos-cn-beijing.volces.com 
Authorization: authorization string 
Date: Fri, 30 Jul 2021 06:45:39 GMT

Sample response

HTTP/1.1 200 OK 
x-tos-id-2: 4fac130beeb50032-a444ed0 
x-tos-request-id: 4fac130beeb50032-a444ed0 
Date: Mon, 12 May 2025 07:18:51 GMT 
server: TosServer 
Content-Length: 0 
{ 
    "LoggingEnabled": { 
        "TargetBucket": "test", 
        "TargetPrefix": "tos-accesslog", 
        "Role": "ServiceRoleforTOSLogging" 
    } 
}
Last updated: 2025.06.30 17:27:07