Class: TencentCloud::Iotcloud::V20180614::TopicRulePayload

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20180614/models.rb

Overview

创建规则请求包体

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sql = nil, actions = nil, description = nil, ruledisabled = nil) ⇒ TopicRulePayload

Returns a new instance of TopicRulePayload.



4369
4370
4371
4372
4373
4374
# File 'lib/v20180614/models.rb', line 4369

def initialize(sql=nil, actions=nil, description=nil, ruledisabled=nil)
  @Sql = sql
  @Actions = actions
  @Description = description
  @RuleDisabled = ruledisabled
end

Instance Attribute Details

#ActionsObject

[ { "republish": { "topic": "TEST/test" } }, { "forward": { "api": "http://127.0.0.1:8080", "token":"xxx" } }, { "ckafka": { "instance": { "id": "ckafka-test", "name": "" }, "topic": { "id": "topic-test", "name": "test" }, "region": "gz" } }, { "cmqqueue": { "queuename": "queue-test-TEST", "region": "gz" } }, { "mysql": { "instanceid": "cdb-test", "region": "gz", "username": "test", "userpwd": "*****", "dbname": "d_mqtt", "tablename": "t_test", "fieldpairs": [ { "field": "test", "value": "test" } ], "devicetype": "CUSTOM" } } ]

Parameters:

  • 规则的SQL语句,如: SELECT * FROM 'pid/dname/event',然后对其进行base64编码,得:U0VMRUNUICogRlJPTSAncGlkL2RuYW1lL2V2ZW50Jw==

  • 行为的JSON字符串,大部分种类举例如下:

  • 规则描述

  • 是否禁用规则



4367
4368
4369
# File 'lib/v20180614/models.rb', line 4367

def Actions
  @Actions
end

#DescriptionObject

[ { "republish": { "topic": "TEST/test" } }, { "forward": { "api": "http://127.0.0.1:8080", "token":"xxx" } }, { "ckafka": { "instance": { "id": "ckafka-test", "name": "" }, "topic": { "id": "topic-test", "name": "test" }, "region": "gz" } }, { "cmqqueue": { "queuename": "queue-test-TEST", "region": "gz" } }, { "mysql": { "instanceid": "cdb-test", "region": "gz", "username": "test", "userpwd": "*****", "dbname": "d_mqtt", "tablename": "t_test", "fieldpairs": [ { "field": "test", "value": "test" } ], "devicetype": "CUSTOM" } } ]

Parameters:

  • 规则的SQL语句,如: SELECT * FROM 'pid/dname/event',然后对其进行base64编码,得:U0VMRUNUICogRlJPTSAncGlkL2RuYW1lL2V2ZW50Jw==

  • 行为的JSON字符串,大部分种类举例如下:

  • 规则描述

  • 是否禁用规则



4367
4368
4369
# File 'lib/v20180614/models.rb', line 4367

def Description
  @Description
end

#RuleDisabledObject

[ { "republish": { "topic": "TEST/test" } }, { "forward": { "api": "http://127.0.0.1:8080", "token":"xxx" } }, { "ckafka": { "instance": { "id": "ckafka-test", "name": "" }, "topic": { "id": "topic-test", "name": "test" }, "region": "gz" } }, { "cmqqueue": { "queuename": "queue-test-TEST", "region": "gz" } }, { "mysql": { "instanceid": "cdb-test", "region": "gz", "username": "test", "userpwd": "*****", "dbname": "d_mqtt", "tablename": "t_test", "fieldpairs": [ { "field": "test", "value": "test" } ], "devicetype": "CUSTOM" } } ]

Parameters:

  • 规则的SQL语句,如: SELECT * FROM 'pid/dname/event',然后对其进行base64编码,得:U0VMRUNUICogRlJPTSAncGlkL2RuYW1lL2V2ZW50Jw==

  • 行为的JSON字符串,大部分种类举例如下:

  • 规则描述

  • 是否禁用规则



4367
4368
4369
# File 'lib/v20180614/models.rb', line 4367

def RuleDisabled
  @RuleDisabled
end

#SqlObject

[ { "republish": { "topic": "TEST/test" } }, { "forward": { "api": "http://127.0.0.1:8080", "token":"xxx" } }, { "ckafka": { "instance": { "id": "ckafka-test", "name": "" }, "topic": { "id": "topic-test", "name": "test" }, "region": "gz" } }, { "cmqqueue": { "queuename": "queue-test-TEST", "region": "gz" } }, { "mysql": { "instanceid": "cdb-test", "region": "gz", "username": "test", "userpwd": "*****", "dbname": "d_mqtt", "tablename": "t_test", "fieldpairs": [ { "field": "test", "value": "test" } ], "devicetype": "CUSTOM" } } ]

Parameters:

  • 规则的SQL语句,如: SELECT * FROM 'pid/dname/event',然后对其进行base64编码,得:U0VMRUNUICogRlJPTSAncGlkL2RuYW1lL2V2ZW50Jw==

  • 行为的JSON字符串,大部分种类举例如下:

  • 规则描述

  • 是否禁用规则



4367
4368
4369
# File 'lib/v20180614/models.rb', line 4367

def Sql
  @Sql
end

Instance Method Details

#deserialize(params) ⇒ Object



4376
4377
4378
4379
4380
4381
# File 'lib/v20180614/models.rb', line 4376

def deserialize(params)
  @Sql = params['Sql']
  @Actions = params['Actions']
  @Description = params['Description']
  @RuleDisabled = params['RuleDisabled']
end