AWS::IoTAnalytics::Channel - AWS CloudFormation
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

AWS::IoTAnalytics::Channel

AWS::IoTAnalytics::Channe 资源从 MQTT 主题中收集数据,并在将数据发布到管道之前存档原始的未处理消息。有关更多信息,请参阅 AWS IoT Analytics 用户指南 中的如何使用 AWS IoT Analytics

语法

要在 AWS CloudFormation 模板中声明此实体,请使用以下语法:

JSON

{ "Type" : "AWS::IoTAnalytics::Channel", "Properties" : { "ChannelName" : String, "ChannelStorage" : ChannelStorage, "RetentionPeriod" : RetentionPeriod, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::IoTAnalytics::Channel Properties: ChannelName: String ChannelStorage: ChannelStorage RetentionPeriod: RetentionPeriod Tags: - Tag

属性

ChannelName

通道的名称。

必需:否

类型:字符串

最低1

最高128

模式^[a-zA-Z0-9_]+$

Update requires: Replacement

ChannelStorage

存储通道数据的位置。

必需:否

类型ChannelStorage

Update requires: No interruption

RetentionPeriod

为通道保留消息数据的时间长度 (以天为单位)。

必需:否

类型RetentionPeriod

Update requires: No interruption

Tags

可用于管理通道的元数据。

有关更多信息,请参阅标签

必需:否

类型Tag 的列表

最高50

Update requires: No interruption

示例

简单通道

以下示例创建一个简单通道。

JSON

{ "Description": "Create a simple Channel", "Resources": { "Channel": { "Type": "AWS::IoTAnalytics::Channel", "Properties": { "ChannelName": "SimpleChannel" } } } }

YAML

--- Description: "Create a simple Channel" Resources: Channel: Type: "AWS::IoTAnalytics::Channel" Properties: ChannelName: "SimpleChannel"

复杂通道

以下示例创建一个复杂通道。

JSON

{ "Description": "Create a complex channel", "Resources": { "Channel": { "Type": "AWS::IoTAnalytics::Channel", "Properties": { "ChannelName": "ComplexChannel", "RetentionPeriod": { "Unlimited": false, "NumberOfDays": 10 }, "Tags": [ { "Key": "keyname1", "Value": "value1" }, { "Key": "keyname2", "Value": "value2" } ] } } } }

YAML

--- Description: "Create a complex channel" Resources: Channel: Type: "AWS::IoTAnalytics::Channel" Properties: ChannelName: "ComplexChannel" RetentionPeriod: Unlimited: false NumberOfDays: 10 Tags: - Key: "keyname1" Value: "value1" - Key: "keyname2" Value: "value2"

另请参阅