The ALIYUN::SLS::Etl resource type creates a data transformation job.
Syntax
{
"Type": "ALIYUN::SLS::Etl",
"Properties": {
"Description": String,
"Configuration": Map,
"ProjectName": String,
"Schedule": Map,
"DisplayName": String,
"Name": String
}
}Properties
| Property | Type | Required | Update allowed | Description | Constraints |
| Description | String | No | No | The description of the data transformation job. | None |
| Configuration | Map | Yes | No | The configuration of the data transformation job. | For more information, see Configuration properties. |
| ProjectName | String | Yes | No | The target Log Project for the data transformation job. | None |
| Schedule | Map | Yes | No | The scheduling policy for the data transformation job. | For more information, see Schedule properties. |
| DisplayName | String | Yes | No | The display name of the data transformation job. | None |
| Name | String | Yes | No | The name of the data transformation job. | None |
Configuration syntax
"Configuration": {
"Script": String,
"Sinks": List,
"Parameters": Map,
"ToTime": Number,
"Version": Number,
"Logstore": String,
"FromTime": Number,
"RoleArn": String
}Configuration properties
| Property Name | Type | Required | Update allowed | Description | Constraints |
| Script | String | Yes | No | The script for the data transformation job. | None |
| Sinks | List | Yes | No | The destination configurations for the data transformation job. | Destinations include projects and Logstores. For more information, see Sinks properties. |
| Parameters | Map | No | No | The advanced parameter settings for the data transformation job. | None |
| ToTime | Number | No | No | The end time of the data transformation job. | Default value: None. |
| Version | Number | No | No | The script version for the data transformation job. | None |
| Logstore | String | Yes | No | The Logstore for the data transformation job (source Logstore). | None |
| FromTime | Number | No | No | The start time of the data transformation job. | The job starts from the current time by default. |
| RoleArn | String | No | No | The STS role for the data transformation job's target Logstore. | None |
Sinks syntax
"Sinks": [
{
"Project": String,
"Type": String,
"Endpoint": String,
"Logstore": String,
"RoleArn": String,
"Name": String
}
]Sinks properties
| Property Name | Type | Required | Update allowed | Description | Constraints |
| Project | String | Yes | No | Specifies the target Log project for the data transformation Job. | None |
| Type | String | No | No | The type of the destination for the data transformation job. | Destinations include projects and Logstores. Default value: AliyunLOG. |
| Endpoint | String | No | No | The server-side endpoint of the destination log project for the data transformation job. | None |
| Logstore | String | Yes | No | The destination Logstore for the data transformation job. | None |
| RoleArn | String | No | No | The ARN of the RAM role that the data transformation job assumes to write data to the destination Logstore. | None |
| Name | String | Yes | No | The name of the destination for the data transformation job. | Destinations include projects and Logstores. |
Schedule syntax
"Schedule": {
"Type": String
}Schedule properties
| Property Name | Type | Required | Update allowed | Description | Constraints |
| Type | String | Yes | No | The type of the scheduling policy for the data transformation job. | Value: Resident. |
Return value
Fn::GetAtt
Name: The name of the data transformation job.
Examples
JSONformat{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { }, "Resources": { "Etl": { "Type": "ALIYUN::SLS::Etl", "Properties": { "Configuration": { "Logstore": "actiontrail_log", "Parameters": { "test_key": "test value" }, "RoleArn": "acs:ram::17545809XXXXXXX:role/aliyunlogetlrole", "Script": "e_json(\"event\")\ne_drop_fields(\"event\")", "Sinks": [ { "Name": "drds_service", "Project": "test-project", "Logstore": "drds_service_audit", "RoleArn": "acs:ram::17545809XXXXXXX:role/aliyunlogetlrole", "Endpoint": "cn-beijing-intranet.log.aliyuncs.com", "Type": "AliyunLOG" }, { "Name": "rds_service", "Project": "test-project", "Logstore": "rds_service_audit", "RoleArn": "acs:ram::17545809XXXXXXX:role/aliyunlogetlrole" } ], "Version": 2 }, "ProjectName": "sls-audit", "Schedule": { "Type": "Resident" }, "DisplayName": "test_etl", "Name": "test_etl_api" } } }, "Outputs": { "Name": { "Description": "ETL name.", "Value": { "Fn::GetAtt": [ "Etl", "Name" ] } } } }