Class: TencentCloud::Cls::V20201016::MetricConfig

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

Overview

指标配置信息

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metricname = nil, periods = nil, metriclabels = nil) ⇒ MetricConfig

Returns a new instance of MetricConfig.



12851
12852
12853
12854
12855
# File 'lib/v20201016/models.rb', line 12851

def initialize(metricname=nil, periods=nil, metriclabels=nil)
  @MetricName = metricname
  @Periods = periods
  @MetricLabels = metriclabels
end

Instance Attribute Details

#MetricLabels ⇒ Object

Parameters:

  • MetricName: —

    指标名称

  • Periods: —

    统计周期,单位:秒(s)

  • MetricLabels: —

    自定义指标标签



12849
12850
12851
# File 'lib/v20201016/models.rb', line 12849

def MetricLabels
  @MetricLabels
end

#MetricName ⇒ Object

Parameters:

  • MetricName: —

    指标名称

  • Periods: —

    统计周期,单位:秒(s)

  • MetricLabels: —

    自定义指标标签



12849
12850
12851
# File 'lib/v20201016/models.rb', line 12849

def MetricName
  @MetricName
end

#Periods ⇒ Object

Parameters:

  • MetricName: —

    指标名称

  • Periods: —

    统计周期,单位:秒(s)

  • MetricLabels: —

    自定义指标标签



12849
12850
12851
# File 'lib/v20201016/models.rb', line 12849

def Periods
  @Periods
end

Instance Method Details

#deserialize(params) ⇒ Object



12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
# File 'lib/v20201016/models.rb', line 12857

def deserialize(params)
  @MetricName = params['MetricName']
  @Periods = params['Periods']
  unless params['MetricLabels'].nil?
    @MetricLabels = []
    params['MetricLabels'].each do |i|
      metriclabel_tmp = MetricLabel.new
      metriclabel_tmp.deserialize(i)
      @MetricLabels << metriclabel_tmp
    end
  end
end