All Products
Search
Document Center

Object Storage Service:GetUserDefinedLogFieldsConfig

Last Updated:Jun 17, 2026

Queries custom fields in the user_defined_log_fields element for bucket logging.

Notes

To call the GetUserDefinedLogFieldsConfig operation, you must have the oss:GetUserDefinedLogFieldsConfig permission. For more information, see Grant a custom policy.

Request syntax

GET /?userDefinedLogFieldsConfig HTTP/1.1
Date: GMT Date
Content-Length: ContentLength
Content-Type: application/xml
Host: BucketName.oss.aliyuncs.com
Authorization: SignatureValue

Request headers

This operation uses only common request headers. For more information, see Common request headers.

Response headers

This operation returns only common response headers. For more information, see Common response headers.

Response elements

Element

Type

Required

Example

Description

UserDefinedLogFieldsConfiguration

Container

Yes

N/A

The container for the user-defined logging configuration.

Child elements: HeaderSet and ParamSet

Parent elements: none

HeaderSet

Container

No

N/A

The container for custom request headers.

Child elements: header

Parent elements: UserDefinedLogFieldsConfiguration

header

String

No

header1

The custom request header.

Child elements: none

Parent element: HeaderSet

ParamSet

Container

No

N/A

The container for custom query parameters.

Child elements: parameter

Parent elements: UserDefinedLogFieldsConfiguration

parameter

String

No

param1

The custom query parameter.

Child elements: none

Parent elements: ParamSet

Examples

Sample request

GET /?userDefinedLogFieldsConfig HTTP/1.1
Date: GMT Date
Content-Length: ContentLength
Content-Type: application/xml
Host: BucketName.oss.aliyuncs.com
Authorization: SignatureValue

Sample response

HTTP/1.1 200 OK
x-oss-request-id: 534B371674125A4D8906008B
Date: Date
Content-Length: 0
Connection: keep-alive
Server: AliyunOSS

<?xml version="1.0" encoding="UTF-8"?>
<UserDefinedLogFieldsConfiguration>
	<HeaderSet>
		<header>header1</header>
		<header>header2</header>
		<header>header3</header>
	</HeaderSet>
	<ParamSet>
		<parameter>param1</parameter>
		<parameter>param2</parameter>
	</ParamSet>
</UserDefinedLogFieldsConfiguration>

OSS SDKs

You can use OSS SDKs for the following programming languages to call the GetUserDefinedLogFieldsConfig operation: