Help Center/ Object Storage Service/ SDK Reference/ C/ Parameters/ Request Parameters for Enabling Bucket Logging
Updated on 2026-08-03 GMT+08:00

Request Parameters for Enabling Bucket Logging

Table 1 List of request parameters

Parameter

Type

Mandatory (Yes/No)

Description

options

const obs_options *

Yes

The context of the requested bucket. Refer to Configuring option (SDK for C) to set the AK, SK, endpoint, bucket, timeout, and temporary credentials through obs_options.

target_bucket

char *

Yes

When enabling the logging function, the owner of the bucket being logged can specify a target bucket to store the generated log files.

Log files generated for multiple buckets can be stored in the same target bucket. If you do so, you need to specify different target_prefix to classify logs for different buckets.

target_prefix

char *

Yes

You can specify a prefix using this element so that log files are named with this prefix.

agency

char *

Yes only when you enable the logging function

Name of the agency created by the owner of the logging bucket for uploading log files by OBS.

acl_group

obs_acl_group *

No

Structure of the permission information group

acl_group->acl_grant_count

int

No

The number of returned obs_acl_grant.

acl_group->acl_grants

obs_acl_grant *

No

Pointer to the permissions information structure. For details, see obs_acl_grant in Configuring a Bucket ACL (SDK for C).

handler

obs_response_handler *

Yes

A callback structure where all members are pointers to callback functions, used to set the callback functions that handle response data. You can set a callback function to copy the response data from the server to your custom callback_data.

callback_data

void *

No

Custom callback data.