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:GetUserDefinedLogFieldsConfigpermission (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
| Parameter | Type | Required | Description |
|---|---|---|---|
--bucket | string | Yes | Name of the bucket. |
This command maps to the GetUserDefinedLogFieldsConfig API operation. For response field details, see the API reference.
Global flags
| Flag | Description |
|---|---|
--output-format | Output 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 examplebucketQuery the configuration in JSON format
ossutil api get-user-defined-log-fields-config --bucket examplebucket --output-format jsonQuery the configuration in YAML format
ossutil api get-user-defined-log-fields-config --bucket examplebucket --output-format yaml