Class: TencentCloud::Ecm::V20190719::TargetsWeightRule

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

Overview

目标和权重的描述信息

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(listenerid = nil, targets = nil, weight = nil) ⇒ TargetsWeightRule

Returns a new instance of TargetsWeightRule.



11124
11125
11126
11127
11128
# File 'lib/v20190719/models.rb', line 11124

def initialize(listenerid=nil, targets=nil, weight=nil)
  @ListenerId = listenerid
  @Targets = targets
  @Weight = weight
end

Instance Attribute Details

#ListenerIdObject

Parameters:

  • ListenerId:

    负载均衡监听器 ID

  • Targets:

    要修改权重的后端机器列表

  • Weight:

    后端服务新的转发权重,取值范围:0~100。



11122
11123
11124
# File 'lib/v20190719/models.rb', line 11122

def ListenerId
  @ListenerId
end

#TargetsObject

Parameters:

  • ListenerId:

    负载均衡监听器 ID

  • Targets:

    要修改权重的后端机器列表

  • Weight:

    后端服务新的转发权重,取值范围:0~100。



11122
11123
11124
# File 'lib/v20190719/models.rb', line 11122

def Targets
  @Targets
end

#WeightObject

Parameters:

  • ListenerId:

    负载均衡监听器 ID

  • Targets:

    要修改权重的后端机器列表

  • Weight:

    后端服务新的转发权重,取值范围:0~100。



11122
11123
11124
# File 'lib/v20190719/models.rb', line 11122

def Weight
  @Weight
end

Instance Method Details

#deserialize(params) ⇒ Object



11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
# File 'lib/v20190719/models.rb', line 11130

def deserialize(params)
  @ListenerId = params['ListenerId']
  unless params['Targets'].nil?
    @Targets = []
    params['Targets'].each do |i|
      target_tmp = Target.new
      target_tmp.deserialize(i)
      @Targets << target_tmp
    end
  end
  @Weight = params['Weight']
end