ALIYUN::SLS::EtlV2

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

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

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"
        ]
      }
    }
  }
}