All Products
Search
Document Center

Simple Log Service:OSSExportConfiguration

Last Updated:Oct 22, 2026

Parameter

Type

Description

Example

object

OSSExportConfiguration

fromTime

integer

The start time of the time range. If the value is set to 1, the shipping starts from the first entry of data in the Logstore.

1718380800

logstore

string

The name of the Logstore.

my-logstore

roleArn

string

The ARN of the RAM role used to read Simple Log Service data. Specify the ARN of your RAM role.

acs:ram::1234567890:role/aliyunlogdefaultrole

sink

object

The configuration for shipping data to OSS.

bucket

string

OSS Bucket

my-bucket

bufferInterval

integer

The shipping interval. Valid values: 300 to 900. Unit: seconds.

300

bufferSize

integer

The size of the shipped object. Valid values: 5 to 256. Unit: MB.

256

compressionType

string

The compression type. Four compression types are supported: snappy, gzip, zstd, and none.

snappy

contentDetail

object

The content details of the OSS object. Note: The value of this parameter is in JSON format and must be updated based on the value of the contentType parameter.

any

When the value of contentType is JSON, the detailed parameters of contentDetail are as follows:

  • enableTag
    • Required: Yes

    • Type: Boolean

    • Description: Specifies whether to ship the tag field.

    • Values:
      • true
        • Description: Ships the tag field.

        • Example: {"enableTag": true}

      • false
        • Description: Does not ship the tag field.

        • Example: {"enableTag": false}

When the value of contentType is csv, the detailed parameters of contentDetail are as follows:

  • columns
    • Required: Yes

    • Type: Array

    • Description: The keys of the logs in the source Logstore.

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

  • delimiter
    • Required: Yes

    • Type: String

    • Description: The delimiter between content fields.

    • Values: ",", "|", " ", or "\t"

  • header
    • Required: Yes

    • Type: Boolean

    • Description: Specifies whether to write the field names to the first row of the CSV file.

    • Values:
      • true

      • false

  • lineFeed
    • Required: No

    • Type: String

    • Description: The custom line feed.

    • Values: "\t", "\n", or ""

    • Default value: "\n"

  • null
    • Required: No

    • Type: String

    • Description: The custom fill value for invalid fields.

    • Default value: ""

  • quote
    • Required: Yes

    • Type: String

    • Description: The custom escape character.

    • Values: "\"", "'", or "" Complete example: {"null": "-", "header": false, "lineFeed": "\n", "quote": "", "delimiter": ",", "columns": ["a", "b", "c", "d"]}

When the value of contentType is parquet, the detailed parameters of contentDetail are as follows:

  • columns
    • Required: Yes

    • Type: Array

    • Description: The keys of the logs in the source Logstore.

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

When the value of contentType is orc, the detailed parameters of contentDetail are as follows:

  • columns
    • Required: Yes

    • Type: Array

    • Description: The keys of the logs in 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": "\"" },

contentType

string

The storage format of the OSS object. Four formats are supported: json, parquet, csv, and orc.

csv

delaySec

integer

The delayed shipping time.

Note
  • This field is deprecated.

123

delaySeconds

integer

The delayed shipping time. The specified time cannot exceed the data retention period of the destination Logstore.

900

enableDynamicPartition

boolean

Specifies whether to enable dynamic partitioning. This parameter takes effect only for OSS data shipping.

service=${service}/%Y/%m/%d/%H/%M

endpoint

string

  • The OSS endpoint. Only internal OSS endpoints in the same region are supported. For more information, see OSS regions and endpoints. The value format is http://+OSS endpoint.

  • The OSS-HDFS endpoint. Only internal OSS-HDFS endpoints in the same region are supported.

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

errorOutputPrefix

string

The directory for failed data. This parameter takes effect only for OSS data shipping.

error/{errorType}/

pathFormat

string

The partition format. For more information, see Partition format.

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

pathFormatType

string

The type of the partition format.

time

prefix

string

The prefix of the OSS object.

prefix-demo/

roleArn

string

The ARN of the RAM role used to write data to OSS. Specify the ARN of your RAM role.

acs:ram::1234567890:role/aliyunlogdefaultrole

suffix

string

The suffix of the OSS object.

.json

timeZone

string

The time zone. For more information, see Time zone list.

+0800

sourceSecureTransport

boolean

Specifies whether to use secure transport.

true

toTime

integer

The end time of the time range. If the value is set to 0, the task runs continuously until it is manually stopped.

1718380800