ALIYUN::SLS::Etl is used to create a data transformation task.

Syntax

{
  "Type": "ALIYUN::SLS::Etl",
  "Properties": {
    "Description": String,
    "Configuration": Map,
    "ProjectName": String,
    "Schedule": Map,
    "DisplayName": String,
    "Name": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
DescriptionStringNoNoThe description of the task. None
ConfigurationMapYesNoThe configurations of the task. For more information, see Configuration properties.
ProjectNameStringYesNoThe name of the destination Log Service project of the task. None
ScheduleMapYesNoThe scheduling policy of the task. For more information, see Schedule properties.
DisplayNameStringYesNoThe display name of the task. None
NameStringYesNoThe name of the task. None

Configuration syntax

"Configuration": {
  "Script": String,
  "Sinks": List,
  "Parameters": Map,
  "ToTime": Number,
  "Version": Number,
  "Logstore": String,
  "FromTime": Number,
  "RoleArn": String
}

Configuration properties

PropertyTypeRequiredEditableDescriptionConstraint
ScriptStringYesNoThe syntax of the task. None
SinksListYesNoThe storage destination configurations of the task. Storage destinations include Log Service projects and Logstores.

For more information, see Sinks properties.

ParametersMapNoNoThe configurations of advanced parameters of the task. None
ToTimeNumberNoNoThe time when the task ends. Default value: None.
VersionNumberNoNoThe script version of the task. None
LogstoreStringYesNoThe source Logstore of the task. None
FromTimeNumberNoNoThe time when the task starts. The default start time is the current time.
RoleArnStringNoNoThe Alibaba Cloud Resource Name (ARN) of the role that the user must assume by using Security Token Service (STS) to access the destination Logstore of the task. None

Sinks syntax

"Sinks": [
  {
    "Project": String,
    "Type": String,
    "Endpoint": String,
    "Logstore": String,
    "RoleArn": String,
    "Name": String
  }
]

Sinks properties

PropertyTypeRequiredEditableDescriptionConstraint
ProjectStringYesNoThe destination Log Service project of the task. None
TypeStringNoNoThe storage destination type of the task. Storage destinations include Log Service projects and Logstores.

Default value: AliyunLOG.

EndpointStringNoNoThe endpoint of the server to which the destination Log Service project of the task belongs. None
LogstoreStringYesNoThe destination Logstore of the task. None
RoleArnStringNoNoThe ARN of the role that the user must assume by using STS to access the destination Logstore of the task. None
NameStringYesNoThe storage destination name of the task. Storage destinations include Log Service projects and Logstores.

Schedule syntax

"Schedule": {
  "Type": String
}

Schedule properties

PropertyTypeRequiredEditableDescriptionConstraint
TypeStringYesNoThe scheduling policy type of the task. Set the value to Resident.

Response parameters

Fn::GetAtt

Name: the name of the task.

Examples

  • YAMLformat

    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")
              e_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
  • 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"
            ]
          }
        }
      }
    }