ALIYUN::SLS::OssExport is used to create an Object Storage Service (OSS) data shipping job to manage Simple Log Service (SLS) data and ship Logstore data to OSS for storage.
Syntax
{
"Type": "ALIYUN::SLS::OssExport",
"Properties": {
"Configuration": Map,
"DisplayName": String,
"ExportName": String,
"ProjectName": String,
"Description": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
Configuration | Map | Yes | Yes | The configurations of the job. | For more information, see the "Configuration properties" section of this topic. |
DisplayName | String | Yes | Yes | The display name of the job. | None. |
ExportName | String | Yes | No | The job name. | The name can contain only lowercase letters, digits, en dashes (‒), and underscores (_). It must be 2 and 64 characters in length, and must start and end with a lowercase letter or digit. |
ProjectName | String | Yes | No | The name of the SLS project. | None. |
Description | String | No | Yes | The description of the job. | The description can be up to 256 characters in length. |
Configuration syntax
"Configuration": {
"ToTime": Integer,
"Sink": Map,
"Logstore": String,
"FromTime": Integer,
"RoleArn": String
}
Configuration properties
Property | Type | Required | Editable | Description | Constraint |
Logstore | String | Yes | Yes | The name of the Logstore in the project. | None. |
RoleArn | String | Yes | Yes | The Alibaba Cloud Resource Name (ARN) of the role. You can use this property to control the write permissions on OSS data and the read permissions on Logstore data. | Example: acs:ram::13234:role/aliyunlogdefaultrole. |
Sink | Map | Yes | Yes | The OSS shipping configurations. | None. |
FromTime | Integer | No | Yes | The start time of the job. | None. |
ToTime | Integer | No | Yes | The end time of the job. | None. |
Sink syntax
"Sink": {
"BufferInterval": Integer,
"ContentType": String,
"ContentDetail": Map,
"PathFormat": String,
"Prefix": String,
"PathFormatType": String,
"RoleArn": String,
"BufferSize": Integer,
"TimeZone": String,
"Suffix": String,
"Endpoint": String,
"DelaySeconds": Integer,
"Bucket": String,
"CompressionType": String
}
Sink properties
Property | Type | Required | Editable | Description | Constraint |
BufferInterval | Integer | Yes | Yes | The maximum shipping interval. | Valid values: 300 to 900. Unit: seconds. |
BufferSize | Integer | Yes | Yes | The size of the data that you want to ship. | The value of this property determines the maximum size of raw log data that you can ship to and store in an OSS object. Unit: MB. If the size of the log data that you want to ship reaches the value of this property, a data shipping job is automatically created. |
Bucket | String | Yes | Yes | The name of the OSS bucket. | None. |
ContentType | String | Yes | Yes | The storage format of data that is shipped to OSS. | Valid values:
You can store data in the Parquet format for easy analysis. The Parquet storage format provides higher scanning efficiency than the CSV or JSON storage format, but has higher fees. You can select a storage format based on your business requirements. |
RoleArn | String | Yes | Yes | The ARN of the role. You can use this property to control the write permissions on OSS data and the read permissions on Logstore data. | Example: acs:ram::13234:role/aliyunlogdefaultrole. |
ContentDetail | Map | No | Yes | The content details. | If you set ContentType to json, the default value of ContentDetail is {"EnableTag": false}. |
CompressionType | String | No | Yes | The compression method of OSS data. | Valid values:
A value of none specifies that the raw data is not compressed. A value of snappy, gzip, or zstd specifies that a specified algorithm is used to compress data. This reduces the storage usage of the OSS bucket. Compression methods vary based on different storage formats. |
DelaySeconds | Integer | No | Yes | The shipping latency. | The period of time after which data is shipped. Valid values: 900 to 63244800. Unit: seconds. The value of this property cannot exceed the retention period of Logstore data. We recommend that you specify a buffer period of several days for the shipping latency. Otherwise, data may be lost. |
Endpoint | String | No | Yes | The endpoint of the OSS bucket. | None. |
PathFormat | String | No | Yes | The partition format that is used to generate subdirectories. | The subdirectories are dynamically generated based on the value of BufferInterval. The default partition format is %Y/%m/%d/%H/%M. Example: 2017/01/23/12/00. The partition format cannot start with a forward slash (/). For more information on how to integrate with E-MapReduce (EMR) compute engines such as Hive and Impala to query and analyze data, see "Create an OSS data shipping job (new version)". |
Prefix | String | No | Yes | The prefix of the OSS object name. | None. |
PathFormatType | String | No | Yes | The type of the partition format. |
|
Suffix | String | No | Yes | The suffix of the OSS object name. | None. |
TimeZone | String | No | Yes | The time zone. | The partition path varies based on the time zone. Valid values: -1200 to +1400. Example: +0800. |
Return values
Fn::GetAtt
ProjectName: the name of the SLS project.
ExportName: the job name.