All Products
Search
Document Center

Object Storage Service:get-user-defined-log-fields-config

Last Updated:Mar 20, 2026

Queries the user_defined_log_fields configuration for a bucket's real-time logs.

Prerequisites

Before you begin, make sure you have:

  • An OSS bucket

  • The oss:GetUserDefinedLogFieldsConfig permission (required for RAM users and Security Token Service (STS) credentials; Alibaba Cloud accounts have this permission by default). For details, see Attach a custom policy to a RAM user

Syntax

ossutil api get-user-defined-log-fields-config --bucket <bucket-name> [flags]

Parameters

ParameterTypeRequiredDescription
--bucketstringYesName of the bucket.

This command maps to the GetUserDefinedLogFieldsConfig API operation. For response field details, see the API reference.

Global flags

FlagDescription
--output-formatOutput format. Accepted values: json, yaml. Defaults to plain text.

For all supported global flags, see Global command-line options.

Examples

Query the configuration (default output)

ossutil api get-user-defined-log-fields-config --bucket examplebucket

Query the configuration in JSON format

ossutil api get-user-defined-log-fields-config --bucket examplebucket --output-format json

Query the configuration in YAML format

ossutil api get-user-defined-log-fields-config --bucket examplebucket --output-format yaml