ALIYUN::SLS::EtlV2

Updated at:

ALIYUN::SLS::EtlV2类型用于创建新版数据加工任务。

语法

{
  "Type": "ALIYUN::SLS::EtlV2",
  "Properties": {
    "Configuration": Map,
    "DisplayName": String,
    "Name": String,
    "Project": String,
    "Description": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Configuration

Map

是

否

数据加工任务的配置。

更多信息,请参考Configuration属性。

DisplayName

String

是

否

数据加工任务的显示名称。

无

Name

String

是

否

数据加工任务的名称。

无

Project

String

是

否

数据加工任务的目标日志项目名称。

无

Description

String

否

否

数据加工任务的描述。

无

Configuration语法

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

Configuration属性

属性名称

类型

必须

允许更新

描述

约束

Logstore

String

是

否

数据加工任务的日志库(源日志库)。

无

RoleArn

String

是

否

数据加工任务的目标日志库中的STS角色信息。

无

Script

String

是

否

数据加工任务的语法。

无

Sinks

List

是

否

数据加工任务的存储目标配置。

最多支持50组配置,更多信息,请参考Sinks属性。

FromTime

Integer

否

否

数据加工任务的开始时间。

无

Lang

String

否

否

数据加工任务的语言类型。

重要

指定SPL类型时创建出的数据加工为新版数据加工,否则为旧版数据加工。

Parameters

Map

否

否

数据加工任务的高级参数配置。

无

ToTime

Integer

否

否

数据加工任务的结束时间。

无

Sinks语法

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

Sinks属性

属性名称

类型

必须

允许更新

描述

约束

Logstore

String

是

否

数据加工任务的日志库(目标日志库)。

无

Name

String

是

否

数据加工任务的存储目标名称。

无

Project

String

是

否

数据加工任务的目标日志项目。

无

RoleArn

String

是

否

数据加工任务的目标日志库中的STS角色信息。

无

Datasets

List

否

否

写入结果集。

最多支持50组配置。

Endpoint

String

否

否

数据加工任务的目标日志项目所在的服务端地址。

无

返回值

Fn::GetAtt

Name:数据加工任务的名称。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Project:
    Type: String
    Description:
      en: The name of the project.
    Required: true
  Configuration:
    AssociationPropertyMetadata:
      Parameters:
        Script:
          Type: String
          Description:
            en: The script of the etl job.
          Required: true
        Sinks:
          AssociationPropertyMetadata:
            Parameter:
              AssociationPropertyMetadata:
                Parameters:
                  Datasets:
                    AssociationPropertyMetadata:
                      Parameter:
                        Type: String
                        Required: false
                    AssociationProperty: List[Parameter]
                    Type: Json
                    Description:
                      en: The processing result outputs the target list.
                    Required: false
                    MinLength: 1
                    MaxLength: 50
                  Project:
                    Type: String
                    Description:
                      en: The name of output target project.
                    Required: true
                  Endpoint:
                    Type: String
                    Description:
                      en: The endpoint of the region where the target Project resides.
                    Required: false
                  Logstore:
                    Type: String
                    Description:
                      en: Target Logstore name.
                    Required: true
                  RoleArn:
                    Type: String
                    Description:
                      en: The role ARN authorized to write the target Logstore.
                    Required: true
                  Name:
                    Type: String
                    Description:
                      en: Output target name.
                    Required: true
              Type: Json
              Required: false
          AssociationProperty: List[Parameter]
          Type: Json
          Description:
            en: The processing result outputs the target list.
          Required: true
          MinLength: 1
          MaxLength: 50
        Parameters:
          Type: Json
          Description:
            en: The parameters of the etl job.
          Required: false
        ToTime:
          Type: Number
          Description:
            en: Deadline of processing job, the default value is 0, which means that it will continue to consume until it is manually stopped.
          Required: false
          Default: 0
        Logstore:
          Type: String
          Description:
            en: Source Logstore name.
          Required: true
        Lang:
          Type: String
          Description:
            en: The language of the etl job.
          Required: false
        FromTime:
          Type: Number
          Description:
            en: The start time of the processing job, the default starts from the current time.
          Required: false
        RoleArn:
          Type: String
          Description:
            en: The role ARN authorized to read the source Logstore.
          Required: true
    Type: Json
    Description:
      en: The configuration of the etl job.
    Required: true
  DisplayName:
    Type: String
    Description:
      en: The display name of the etl job.
    Required: true
  Name:
    Type: String
    Description:
      en: The name of the etl job.
    Required: true
Resources:
  EtlV2:
    Type: ALIYUN::SLS::EtlV2
    Properties:
      Project:
        Ref: Project
      Configuration:
        Ref: Configuration
      DisplayName:
        Ref: DisplayName
      Name:
        Ref: Name
Outputs:
  Name:
    Description: ETL name.
    Value:
      Fn::GetAtt:
        - EtlV2
        - Name
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Project": {
      "Type": "String",
      "Description": {
        "en": "The name of the project."
      },
      "Required": true
    },
    "Configuration": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Script": {
            "Type": "String",
            "Description": {
              "en": "The script of the etl job."
            },
            "Required": true
          },
          "Sinks": {
            "AssociationPropertyMetadata": {
              "Parameter": {
                "AssociationPropertyMetadata": {
                  "Parameters": {
                    "Datasets": {
                      "AssociationPropertyMetadata": {
                        "Parameter": {
                          "Type": "String",
                          "Required": false
                        }
                      },
                      "AssociationProperty": "List[Parameter]",
                      "Type": "Json",
                      "Description": {
                        "en": "The processing result outputs the target list."
                      },
                      "Required": false,
                      "MinLength": 1,
                      "MaxLength": 50
                    },
                    "Project": {
                      "Type": "String",
                      "Description": {
                        "en": "The name of output target project."
                      },
                      "Required": true
                    },
                    "Endpoint": {
                      "Type": "String",
                      "Description": {
                        "en": "The endpoint of the region where the target Project resides."
                      },
                      "Required": false
                    },
                    "Logstore": {
                      "Type": "String",
                      "Description": {
                        "en": "Target Logstore name."
                      },
                      "Required": true
                    },
                    "RoleArn": {
                      "Type": "String",
                      "Description": {
                        "en": "The role ARN authorized to write the target Logstore."
                      },
                      "Required": true
                    },
                    "Name": {
                      "Type": "String",
                      "Description": {
                        "en": "Output target name."
                      },
                      "Required": true
                    }
                  }
                },
                "Type": "Json",
                "Required": false
              }
            },
            "AssociationProperty": "List[Parameter]",
            "Type": "Json",
            "Description": {
              "en": "The processing result outputs the target list."
            },
            "Required": true,
            "MinLength": 1,
            "MaxLength": 50
          },
          "Parameters": {
            "Type": "Json",
            "Description": {
              "en": "The parameters of the etl job."
            },
            "Required": false
          },
          "ToTime": {
            "Type": "Number",
            "Description": {
              "en": "Deadline of processing job, the default value is 0, which means that it will continue to consume until it is manually stopped."
            },
            "Required": false,
            "Default": 0
          },
          "Logstore": {
            "Type": "String",
            "Description": {
              "en": "Source Logstore name."
            },
            "Required": true
          },
          "Lang": {
            "Type": "String",
            "Description": {
              "en": "The language of the etl job."
            },
            "Required": false
          },
          "FromTime": {
            "Type": "Number",
            "Description": {
              "en": "The start time of the processing job, the default starts from the current time."
            },
            "Required": false
          },
          "RoleArn": {
            "Type": "String",
            "Description": {
              "en": "The role ARN authorized to read the source Logstore."
            },
            "Required": true
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "The configuration of the etl job."
      },
      "Required": true
    },
    "DisplayName": {
      "Type": "String",
      "Description": {
        "en": "The display name of the etl job."
      },
      "Required": true
    },
    "Name": {
      "Type": "String",
      "Description": {
        "en": "The name of the etl job."
      },
      "Required": true
    }
  },
  "Resources": {
    "EtlV2": {
      "Type": "ALIYUN::SLS::EtlV2",
      "Properties": {
        "Project": {
          "Ref": "Project"
        },
        "Configuration": {
          "Ref": "Configuration"
        },
        "DisplayName": {
          "Ref": "DisplayName"
        },
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Outputs": {
    "Name": {
      "Description": "ETL name.",
      "Value": {
        "Fn::GetAtt": [
          "EtlV2",
          "Name"
        ]
      }
    }
  }
}