All Products
Search
Document Center

Simple Log Service:OSSExportConfiguration

Last Updated:Jun 11, 2026

Parameter

Type

Description

Example

object

Konfigurasi untuk mengekspor data ke Object Storage Service (OSS).

logstore

string

Nama penyimpanan log sumber.

my-logstore

roleArn

string

ARN peran Resource Access Management (RAM) yang digunakan Log Service untuk membaca data dari penyimpanan log. Anda harus menentukan ARN peran Anda.

acs:ram::1234567890:role/aliyunlogdefaultrole

sink

object

Konfigurasi sink OSS tujuan.

endpoint

string

  • For Object Storage Service (OSS): The OSS internal endpoint. You must use an endpoint in the same region as the Logstore. For more information, see OSS access domains and data centers. The endpoint must use the HTTPS protocol.

  • For OSS-HDFS: The OSS-HDFS internal endpoint. You must use an endpoint in the same region as the Logstore.

https://oss-cn-hangzhou-internal.aliyuncs.com

bucket

string

The name of the destination OSS bucket.

my-bucket

prefix

string

The prefix for files exported to the OSS bucket.

prefix-demo/

suffix

string

The suffix for the exported files.

.json

roleArn

string

The ARN of the RAM role that Log Service assumes to write data to the OSS bucket. You must specify the ARN of your role.

acs:ram::1234567890:role/aliyunlogdefaultrole

pathFormat

string

The path format for exported files. For more information, see Path format.

%Y/%m/%d/%H/%M

pathFormatType

string

The type of the path format.

time

timeZone

string

The time zone used for the path format. For more information, see Time zones.

+0800

contentType

string

The format of the files stored in OSS. Valid values: json, parquet, csv, and orc.

csv

contentDetail

object

Format-specific settings. The structure of this JSON object depends on the contentType value.

any

If contentType is json, contentDetail supports the following parameter:

  • enableTag

    • Required: Yes

    • Type: Boolean

    • Description: Specifies whether to include the log tags in the output.

    • Valid values:

      • true

        • Description: Includes the log tags.

        • Example: {"enableTag": true}

      • false

        • Description: Excludes the log tags.

        • Example: {"enableTag": false}

If contentType is csv, contentDetail supports the following parameters:

  • columns

    • Required: Yes

    • Type: Array

    • Description: The log keys to export from the source Logstore.

    • Example: {"columns":["a", "b", "c", "d"]}

  • delimiter

    • Required: Yes

    • Type: String

    • Description: The delimiter to use between fields.

    • Valid values: ",", "|", " ", or "\t"

  • header

    • Required: Yes

    • Type: Boolean

    • Description: Specifies whether to write a header row with the key names.

    • Valid values:

      • true

      • false

  • lineFeed

    • Required: No

    • Type: String

    • Description: The character to use for line breaks.

    • Valid values: "\t", "\n", or ""

    • Default: "\n"

  • null

    • Required: No

    • Type: String

    • Description: The string to use for fields with null values.

    • Default: ""

  • quote

    • Required: Yes

    • Type: String

    • Description: The quote character to use for enclosing fields.

    • Valid values: "\"", "'", or "". A complete example for a csv contentDetail is: {"null": "-", "header": false, "lineFeed": "\n", "quote": "", "delimiter": ",", "columns": ["a", "b", "c", "d"]}

If contentType is parquet, contentDetail supports the following parameter:

  • columns

    • Required: Yes

    • Type: Array of objects

    • Description: The log keys and their corresponding data types to export from the source Logstore.

    • Example: {"columns": [{"name": "a", "type": "string"}, {"name": "b", "type": "string"}, {"name": "c", "type": "string"},{"name": "d", "type": "string"}]}

If contentType is orc, contentDetail supports the following parameter:

  • columns

    • Required: Yes

    • Type: Array of objects

    • Description: The log keys and their corresponding data types to export from the source Logstore.

    • Example: {"columns": [{"name": "a", "type": "string"}, {"name": "b", "type": "string"}, {"name": "c", "type": "string"},{"name": "d", "type": "string"}]}

{ "columns": [ "your log key1", "your log key2", "your log key3", ], "delimiter": " ", "header": true, "lineFeed": "\n", "null": "-", "quote": "\"" },

compressionType

string

The compression type for the exported files. Valid values: snappy, gzip, zstd, and none (no compression).

snappy

bufferInterval

integer

The time in seconds to buffer data before exporting. The value must be an integer from 300 to 900.

300

bufferSize

integer

The amount of data in MB to buffer before exporting. The value must be an integer from 5 to 256.

256

delaySec

integer

The delivery delay.

Catatan
  • This parameter is deprecated.

123

delaySeconds

integer

The delivery delay, in seconds. This value cannot exceed the data retention period of the source Logstore.

900

fromTime

integer

Pengatur waktu mulai untuk ekspor, ditentukan sebagai Stempel waktu UNIX. Atur ke 1 untuk mengekspor dari data paling awal yang tersedia di penyimpanan log.

1718380800

toTime

integer

Pengatur waktu akhir untuk ekspor, ditentukan sebagai Stempel waktu UNIX. Atur ke 0 untuk menjalankan tugas secara terus-menerus hingga dihentikan.

1718380800

sourceSecureTransport

boolean