ALIYUN::ESA::SiteDeliveryTask类型用于新建实时日志投递任务。
语法
{
"Type": "ALIYUN::ESA::SiteDeliveryTask",
"Properties": {
"BusinessType": String,
"DataCenter": String,
"DeliveryType": String,
"FieldName": String,
"SiteId": Integer,
"TaskName": String,
"DiscardRate": Integer,
"HttpDelivery": Map,
"KafkaDelivery": Map,
"OssDelivery": Map,
"SlsDelivery": Map,
"S3Delivery": Map
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
BusinessType | String | 是 | 是 | 业务类型。 | 取值:
|
DataCenter | String | 是 | 否 | 数据中心。 | 取值为:
|
DeliveryType | String | 是 | 否 | 投递类型。 | 取值:
|
FieldName | String | 是 | 是 | 日志所选的字段。 | 以英文逗号“,”隔开。 |
SiteId | Integer | 是 | 否 | 站点 ID。 | 无 |
TaskName | String | 是 | 否 | 任务名称。 | 无 |
DiscardRate | Integer | 否 | 是 | 丢弃率不填则默认为 0。 | 无 |
HttpDelivery | Map | 否 | 否 | HTTP 投递配置参数。 | 更多信息,请参考HttpDelivery属性。 |
KafkaDelivery | Map | 否 | 否 | Kafka 投递配置参数。 | 更多信息,请参考KafkaDelivery属性。 |
OssDelivery | Map | 否 | 否 | OSS 投递配置。 | 更多信息,请参考OssDelivery属性。 |
SlsDelivery | Map | 否 | 否 | SLS 投递配置。 | 更多信息请参考SlsDelivery属性。 |
S3Delivery | Map | 否 | 否 | S3/S3 兼容投递配置参数。 | 更多信息请参考S3Delivery属性。 |
SlsDelivery语法
"SlsDelivery": {
"SLSProject": String,
"SLSRegion": String,
"SLSLogStore": String
}
SlsDelivery属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
SLSProject | String | 否 | 否 | SLS 实时日志名称。 | 无 |
SLSRegion | String | 否 | 否 | SLS 实时日志区域名称。 | 无 |
SLSLogStore | String | 否 | 否 | SLS 实时日志库名称。 | 无 |
HttpDelivery语法
"HttpDelivery": {
"Compress": String,
"LogBodySuffix": String,
"HeaderParam": Map,
"StandardAuthParam": Map,
"StandardAuthOn": Boolean,
"LogBodyPrefix": String,
"QueryParam": Map,
"DestUrl": String,
"MaxBatchSize": Integer,
"TransformTimeout": Integer,
"MaxRetry": Integer,
"MaxBatchMB": Integer
}
HttpDelivery属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
DestUrl | String | 是 | 否 | HTTP 服务器投递地址。 | 无 |
Compress | String | 否 | 否 | 压缩方式。 | 取值:
|
HeaderParam | Map | 否 | 否 | 自定义 Header 头。 | 更多信息,请参考HeaderParam属性。 |
LogBodySuffix | String | 否 | 否 | 日志投递包尾缀。 | 无 |
LogBodyPrefix | String | 否 | 否 | 日志投递包前缀。 | 无 |
MaxBatchSize | Integer | 否 | 否 | 单次投递最大条数。 | 无 |
MaxRetry | Integer | 否 | 否 | 最大重试次数。 | 无 |
MaxBatchMB | Integer | 否 | 否 | 单次投递最大字节数。 | 单位为 MB。 |
QueryParam | Map | 否 | 否 | 自定义请求参数。 | 更多信息,请参考QueryParam属性。 |
StandardAuthParam | Map | 否 | 否 | 标态鉴权参数。 | 更多信息,请参考StandardAuthParam属性。 |
StandardAuthOn | Boolean | 否 | 否 | 是否使用标态鉴权。 | 无 |
TransformTimeout | Integer | 否 | 否 | 超时等待时间。 | 单位为秒。 |
HeaderParam语法
"HeaderParam": {
"StaticValue": String
}
HeaderParam属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
StaticValue | String | 否 | 否 | 自定义请求参数值。 | 无 |
StandardAuthParam语法
"StandardAuthParam": {
"PrivateKey": String,
"UrlPath": String,
"ExpiredTime": Integer
}
StandardAuthParam属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
ExpiredTime | Integer | 否 | 否 | 加密超时时间。 | 说明 大于 0 值,建议 300 以上 |
PrivateKey | String | 否 | 否 | 私钥。 | 无 |
UrlPath | String | 否 | 否 | 标态鉴权 uri 路径。 | 无 |
QueryParam语法
"QueryParam": {
"StaticValue": String
}
QueryParam属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
StaticValue | String | 否 | 否 | 自定义请求参数值。 | 无 |
S3Delivery语法
"S3Delivery": {
"SecretKey": String,
"Endpoint": String,
"VertifyType": String,
"Region": String,
"ServerSideEncryption": Boolean,
"BucketPath": String,
"PrefixPath": String,
"AccessKey": String,
"S3Cmpt": Boolean
}
S3Delivery属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
AccessKey | String | 否 | 否 | 阿里云账号或 RAM 用户的 AccessKey ID。 | 无 |
BucketPath | String | 否 | 否 | Bucket 路径。 | 无 |
Endpoint | String | 否 | 否 | 服务器 Endpoint, | 无 |
PrefixPath | String | 否 | 否 | 存储路径前缀。 | 无 |
Region | String | 否 | 否 | 服务所在区域。 | 无 |
SecretKey | String | 否 | 否 | S3 账号使用的 SecretKey ID。 | 无 |
ServerSideEncryption | Boolean | 否 | 否 | 服务器端加密。 | 无 |
S3Cmpt | Boolean | 否 | 否 | 是否为 S3 兼容。 | 无 |
VertifyType | String | 否 | 否 | 认证类型。 | 无 |
KafkaDelivery语法
"KafkaDelivery": {
"Compress": String,
"UserName": String,
"MachanismType": String,
"Brokers": List,
"Balancer": String,
"Topic": String,
"UserAuth": Boolean,
"Password": String
}
KafkaDelivery属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Brokers | List | 否 | 否 | 服务器数组。 | 无 |
Balancer | String | 否 | 否 | 负载均衡方式。 | 无 |
Compress | String | 否 | 否 | 压缩方式。 | 无 |
MachanismType | String | 否 | 否 | 加密方式。 | 无 |
Password | String | 否 | 否 | 加密密码。 | 无 |
Topic | String | 否 | 否 | Kafka 消息主题。 | 无 |
UserName | String | 否 | 否 | 用户名。 | 无 |
UserAuth | Boolean | 否 | 否 | 是否开启用户鉴权。 | 无 |
OssDelivery语法
"OssDelivery": {
"BucketName": String,
"Region": String,
"PrefixPath": String,
"Aliuid": String
}
OssDelivery属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Aliuid | String | 否 | 否 | 阿里云账号 ID。 | 无 |
BucketName | String | 否 | 否 | Bucket 名称。 | 无 |
PrefixPath | String | 否 | 否 | 存储路径前缀。 | 无 |
Region | String | 否 | 否 | 服务所在区域。 | 无 |
返回值
Fn::GetAtt
SiteId:站点 ID。
DataCenter:数据中心。
DiscardRate:丢弃率不填则默认为 0。
SiteName:站点名称。
SinkConfig:投递配置。
TaskName:任务名称。
BusinessType:实时日志类型。
FilterRules:过滤规则。
FieldName:日志所选的字段。
DeliveryType:投递类型。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
SiteId:
Type: Number
Description:
en: The site ID.
Required: true
DataCenter:
Type: String
Description:
en: |-
Data Center. Values:
- `cn`: Mainland China.
- `sg`: Global (excluding Mainland China).
AllowedValues:
- cn
- sg
Required: true
TaskName:
Type: String
Description:
en: The name of the delivery task.
Required: true
BusinessType:
Type: String
Description:
en: |-
Real-time log type. Valid values:
- `dcdn_log_access_l1 (default)`: access log.
- `dcdn_log_er`: Edge Routine logs.
- `dcdn_log_waf`: firewall logs.
- `dcdn_log_ipa`: TCP/UDP proxy logs.
AllowedValues:
- dcdn_log_access_l1
- dcdn_log_er
- dcdn_log_waf
- dcdn_log_ipa
Required: true
FieldName:
Type: String
Description:
en: The list of delivery fields to be modified, separated by commas.
Required: true
OssDelivery:
AssociationPropertyMetadata:
Parameters:
BucketName:
Type: String
Description:
en: The name of the OSS bucket.
Required: false
Region:
Type: String
Description:
en: The region in which the bucket is located.
Required: false
PrefixPath:
Type: String
Description:
en: The prefix of the path in which you want to store logs.
Required: false
Aliuid:
Type: String
Description:
en: The account ID.
Required: false
Type: Json
Description:
en: OSS delivery configuration.
Required: false
DeliveryType:
Type: String
Description:
en: |-
Delivery Type:
- `sls`: Alibaba Cloud Simple Log Service (SLS).
- `http`: Http service.
- `aws3`: Amazon s3 service.
- `oss`: Alibaba Cloud Object Storage Service.
- `kafka`: Kafka service.
- `aws3cmpt`: Amazon s3 Compatible Service.
AllowedValues:
- sls
- http
- aws3
- oss
- kafka
- aws3cmpt
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::ESA::SiteDeliveryTask
Properties:
SiteId:
Ref: SiteId
DataCenter:
Ref: DataCenter
TaskName:
Ref: TaskName
BusinessType:
Ref: BusinessType
FieldName:
Ref: FieldName
OssDelivery:
Ref: OssDelivery
DeliveryType:
Ref: DeliveryType
Outputs:
SiteId:
Description: The site ID.
Value:
Fn::GetAtt:
- ExtensionResource
- SiteId
DataCenter:
Description: Data Center.
Value:
Fn::GetAtt:
- ExtensionResource
- DataCenter
DiscardRate:
Description: If the discard rate is not filled, the default value is 0.
Value:
Fn::GetAtt:
- ExtensionResource
- DiscardRate
SiteName:
Description: The website name.
Value:
Fn::GetAtt:
- ExtensionResource
- SiteName
SinkConfig:
Description: The delivery configuration.
Value:
Fn::GetAtt:
- ExtensionResource
- SinkConfig
TaskName:
Description: The task name.
Value:
Fn::GetAtt:
- ExtensionResource
- TaskName
BusinessType:
Description: Real-time log type.
Value:
Fn::GetAtt:
- ExtensionResource
- BusinessType
FilterRules:
Description: The filtering rules.
Value:
Fn::GetAtt:
- ExtensionResource
- FilterRules
FieldName:
Description: The list of delivery fields to be modified, separated by commas.
Value:
Fn::GetAtt:
- ExtensionResource
- FieldName
DeliveryType:
Description: Delivery Type:.
Value:
Fn::GetAtt:
- ExtensionResource
- DeliveryType
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"SiteId": {
"Type": "Number",
"Description": {
"en": "The site ID."
},
"Required": true
},
"DataCenter": {
"Type": "String",
"Description": {
"en": "Data Center. Values:\n- `cn`: Mainland China.\n- `sg`: Global (excluding Mainland China)."
},
"AllowedValues": [
"cn",
"sg"
],
"Required": true
},
"TaskName": {
"Type": "String",
"Description": {
"en": "The name of the delivery task."
},
"Required": true
},
"BusinessType": {
"Type": "String",
"Description": {
"en": "Real-time log type. Valid values:\n- `dcdn_log_access_l1 (default)`: access log.\n- `dcdn_log_er`: Edge Routine logs.\n- `dcdn_log_waf`: firewall logs.\n- `dcdn_log_ipa`: TCP/UDP proxy logs."
},
"AllowedValues": [
"dcdn_log_access_l1",
"dcdn_log_er",
"dcdn_log_waf",
"dcdn_log_ipa"
],
"Required": true
},
"FieldName": {
"Type": "String",
"Description": {
"en": "The list of delivery fields to be modified, separated by commas."
},
"Required": true
},
"OssDelivery": {
"AssociationPropertyMetadata": {
"Parameters": {
"BucketName": {
"Type": "String",
"Description": {
"en": "The name of the OSS bucket."
},
"Required": false
},
"Region": {
"Type": "String",
"Description": {
"en": "The region in which the bucket is located."
},
"Required": false
},
"PrefixPath": {
"Type": "String",
"Description": {
"en": "The prefix of the path in which you want to store logs."
},
"Required": false
},
"Aliuid": {
"Type": "String",
"Description": {
"en": "The account ID."
},
"Required": false
}
}
},
"Type": "Json",
"Description": {
"en": "OSS delivery configuration."
},
"Required": false
},
"DeliveryType": {
"Type": "String",
"Description": {
"en": "Delivery Type:\n- `sls`: Alibaba Cloud Simple Log Service (SLS).\n- `http`: Http service.\n- `aws3`: Amazon s3 service.\n- `oss`: Alibaba Cloud Object Storage Service.\n- `kafka`: Kafka service.\n- `aws3cmpt`: Amazon s3 Compatible Service."
},
"AllowedValues": [
"sls",
"http",
"aws3",
"oss",
"kafka",
"aws3cmpt"
],
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ESA::SiteDeliveryTask",
"Properties": {
"SiteId": {
"Ref": "SiteId"
},
"DataCenter": {
"Ref": "DataCenter"
},
"TaskName": {
"Ref": "TaskName"
},
"BusinessType": {
"Ref": "BusinessType"
},
"FieldName": {
"Ref": "FieldName"
},
"OssDelivery": {
"Ref": "OssDelivery"
},
"DeliveryType": {
"Ref": "DeliveryType"
}
}
}
},
"Outputs": {
"SiteId": {
"Description": "The site ID.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SiteId"
]
}
},
"DataCenter": {
"Description": "Data Center.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"DataCenter"
]
}
},
"DiscardRate": {
"Description": "If the discard rate is not filled, the default value is 0.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"DiscardRate"
]
}
},
"SiteName": {
"Description": "The website name.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SiteName"
]
}
},
"SinkConfig": {
"Description": "The delivery configuration.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SinkConfig"
]
}
},
"TaskName": {
"Description": "The task name.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"TaskName"
]
}
},
"BusinessType": {
"Description": "Real-time log type.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"BusinessType"
]
}
},
"FilterRules": {
"Description": "The filtering rules.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"FilterRules"
]
}
},
"FieldName": {
"Description": "The list of delivery fields to be modified, separated by commas.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"FieldName"
]
}
},
"DeliveryType": {
"Description": "Delivery Type:.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"DeliveryType"
]
}
}
}
}