Class: TencentCloud::Dts::V20211206::SubscribeKafkaConfig
- Inherits:
-
Common::AbstractModel
- Object
- Common::AbstractModel
- TencentCloud::Dts::V20211206::SubscribeKafkaConfig
- Defined in:
- lib/v20211206/models.rb
Overview
订阅的kafka分区数和分区规则。mariadb,percona,tdsqlmysql,tdpg不支持自定义分区,所以DistributeRules和DefaultRuleType可以不填,但是NumberOfPartitions是必填。
Instance Attribute Summary collapse
-
#DefaultRuleType ⇒ Object
非mongo产品的枚举值为: table-按表名分区,pk-按表名+主键分区。mongo的枚举值为:collection-按集合名分区。 该字段与DistributeRules搭配使用,如果配置了该字段,视为配置了一条DistributeRules。.
-
#DistributeRules ⇒ Object
非mongo产品的枚举值为: table-按表名分区,pk-按表名+主键分区。mongo的枚举值为:collection-按集合名分区。 该字段与DistributeRules搭配使用,如果配置了该字段,视为配置了一条DistributeRules。.
-
#NumberOfPartitions ⇒ Object
非mongo产品的枚举值为: table-按表名分区,pk-按表名+主键分区。mongo的枚举值为:collection-按集合名分区。 该字段与DistributeRules搭配使用,如果配置了该字段,视为配置了一条DistributeRules。.
Instance Method Summary collapse
- #deserialize(params) ⇒ Object
-
#initialize(numberofpartitions = nil, distributerules = nil, defaultruletype = nil) ⇒ SubscribeKafkaConfig
constructor
A new instance of SubscribeKafkaConfig.
Constructor Details
#initialize(numberofpartitions = nil, distributerules = nil, defaultruletype = nil) ⇒ SubscribeKafkaConfig
Returns a new instance of SubscribeKafkaConfig.
6707 6708 6709 6710 6711 |
# File 'lib/v20211206/models.rb', line 6707 def initialize(numberofpartitions=nil, distributerules=nil, defaultruletype=nil) @NumberOfPartitions = numberofpartitions @DistributeRules = distributerules @DefaultRuleType = defaultruletype end |
Instance Attribute Details
#DefaultRuleType ⇒ Object
非mongo产品的枚举值为: table-按表名分区,pk-按表名+主键分区。mongo的枚举值为:collection-按集合名分区。该字段与DistributeRules搭配使用,如果配置了该字段,视为配置了一条DistributeRules。
6705 6706 6707 |
# File 'lib/v20211206/models.rb', line 6705 def DefaultRuleType @DefaultRuleType end |
#DistributeRules ⇒ Object
非mongo产品的枚举值为: table-按表名分区,pk-按表名+主键分区。mongo的枚举值为:collection-按集合名分区。该字段与DistributeRules搭配使用,如果配置了该字段,视为配置了一条DistributeRules。
6705 6706 6707 |
# File 'lib/v20211206/models.rb', line 6705 def DistributeRules @DistributeRules end |
#NumberOfPartitions ⇒ Object
非mongo产品的枚举值为: table-按表名分区,pk-按表名+主键分区。mongo的枚举值为:collection-按集合名分区。该字段与DistributeRules搭配使用,如果配置了该字段,视为配置了一条DistributeRules。
6705 6706 6707 |
# File 'lib/v20211206/models.rb', line 6705 def NumberOfPartitions @NumberOfPartitions end |
Instance Method Details
#deserialize(params) ⇒ Object
6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 |
# File 'lib/v20211206/models.rb', line 6713 def deserialize(params) @NumberOfPartitions = params['NumberOfPartitions'] unless params['DistributeRules'].nil? @DistributeRules = [] params['DistributeRules'].each do |i| distributerule_tmp = DistributeRule.new distributerule_tmp.deserialize(i) @DistributeRules << distributerule_tmp end end @DefaultRuleType = params['DefaultRuleType'] end |