Class: TencentCloud::Monitor::V20180724::Metric

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

Overview

指标,可用于设置告警、查询数据

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(namespace = nil, metricname = nil, description = nil, min = nil, max = nil, dimensions = nil, unit = nil, metricconfig = nil, isadvanced = nil, isopen = nil, productid = nil, operators = nil, periods = nil, islatenessmetric = nil) ⇒ Metric

Returns a new instance of Metric.



11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
# File 'lib/v20180724/models.rb', line 11062

def initialize(namespace=nil, metricname=nil, description=nil, min=nil, max=nil, dimensions=nil, unit=nil, metricconfig=nil, isadvanced=nil, isopen=nil, productid=nil, operators=nil, periods=nil, islatenessmetric=nil)
  @Namespace = namespace
  @MetricName = metricname
  @Description = description
  @Min = min
  @Max = max
  @Dimensions = dimensions
  @Unit = unit
  @MetricConfig = metricconfig
  @IsAdvanced = isadvanced
  @IsOpen = isopen
  @ProductId = productid
  @Operators = operators
  @Periods = periods
  @IsLatenessMetric = islatenessmetric
end

Instance Attribute Details

#DescriptionObject

注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • 告警策略类型

  • 指标名

  • 指标展示名

  • 最小值

  • 最大值

  • 维度列表

  • 单位

  • 指标配置

  • 是否为高级指标。1是 0否

  • 高级指标是否开通。1是 0否

  • 集成中心产品ID

  • 匹配运算符

  • 指标触发

  • 是否延迟指标



11060
11061
11062
# File 'lib/v20180724/models.rb', line 11060

def Description
  @Description
end

#DimensionsObject

注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • 告警策略类型

  • 指标名

  • 指标展示名

  • 最小值

  • 最大值

  • 维度列表

  • 单位

  • 指标配置

  • 是否为高级指标。1是 0否

  • 高级指标是否开通。1是 0否

  • 集成中心产品ID

  • 匹配运算符

  • 指标触发

  • 是否延迟指标



11060
11061
11062
# File 'lib/v20180724/models.rb', line 11060

def Dimensions
  @Dimensions
end

#IsAdvancedObject

注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • 告警策略类型

  • 指标名

  • 指标展示名

  • 最小值

  • 最大值

  • 维度列表

  • 单位

  • 指标配置

  • 是否为高级指标。1是 0否

  • 高级指标是否开通。1是 0否

  • 集成中心产品ID

  • 匹配运算符

  • 指标触发

  • 是否延迟指标



11060
11061
11062
# File 'lib/v20180724/models.rb', line 11060

def IsAdvanced
  @IsAdvanced
end

#IsLatenessMetricObject

注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • 告警策略类型

  • 指标名

  • 指标展示名

  • 最小值

  • 最大值

  • 维度列表

  • 单位

  • 指标配置

  • 是否为高级指标。1是 0否

  • 高级指标是否开通。1是 0否

  • 集成中心产品ID

  • 匹配运算符

  • 指标触发

  • 是否延迟指标



11060
11061
11062
# File 'lib/v20180724/models.rb', line 11060

def IsLatenessMetric
  @IsLatenessMetric
end

#IsOpenObject

注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • 告警策略类型

  • 指标名

  • 指标展示名

  • 最小值

  • 最大值

  • 维度列表

  • 单位

  • 指标配置

  • 是否为高级指标。1是 0否

  • 高级指标是否开通。1是 0否

  • 集成中心产品ID

  • 匹配运算符

  • 指标触发

  • 是否延迟指标



11060
11061
11062
# File 'lib/v20180724/models.rb', line 11060

def IsOpen
  @IsOpen
end

#MaxObject

注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • 告警策略类型

  • 指标名

  • 指标展示名

  • 最小值

  • 最大值

  • 维度列表

  • 单位

  • 指标配置

  • 是否为高级指标。1是 0否

  • 高级指标是否开通。1是 0否

  • 集成中心产品ID

  • 匹配运算符

  • 指标触发

  • 是否延迟指标



11060
11061
11062
# File 'lib/v20180724/models.rb', line 11060

def Max
  @Max
end

#MetricConfigObject

注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • 告警策略类型

  • 指标名

  • 指标展示名

  • 最小值

  • 最大值

  • 维度列表

  • 单位

  • 指标配置

  • 是否为高级指标。1是 0否

  • 高级指标是否开通。1是 0否

  • 集成中心产品ID

  • 匹配运算符

  • 指标触发

  • 是否延迟指标



11060
11061
11062
# File 'lib/v20180724/models.rb', line 11060

def MetricConfig
  @MetricConfig
end

#MetricNameObject

注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • 告警策略类型

  • 指标名

  • 指标展示名

  • 最小值

  • 最大值

  • 维度列表

  • 单位

  • 指标配置

  • 是否为高级指标。1是 0否

  • 高级指标是否开通。1是 0否

  • 集成中心产品ID

  • 匹配运算符

  • 指标触发

  • 是否延迟指标



11060
11061
11062
# File 'lib/v20180724/models.rb', line 11060

def MetricName
  @MetricName
end

#MinObject

注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • 告警策略类型

  • 指标名

  • 指标展示名

  • 最小值

  • 最大值

  • 维度列表

  • 单位

  • 指标配置

  • 是否为高级指标。1是 0否

  • 高级指标是否开通。1是 0否

  • 集成中心产品ID

  • 匹配运算符

  • 指标触发

  • 是否延迟指标



11060
11061
11062
# File 'lib/v20180724/models.rb', line 11060

def Min
  @Min
end

#NamespaceObject

注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • 告警策略类型

  • 指标名

  • 指标展示名

  • 最小值

  • 最大值

  • 维度列表

  • 单位

  • 指标配置

  • 是否为高级指标。1是 0否

  • 高级指标是否开通。1是 0否

  • 集成中心产品ID

  • 匹配运算符

  • 指标触发

  • 是否延迟指标



11060
11061
11062
# File 'lib/v20180724/models.rb', line 11060

def Namespace
  @Namespace
end

#OperatorsObject

注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • 告警策略类型

  • 指标名

  • 指标展示名

  • 最小值

  • 最大值

  • 维度列表

  • 单位

  • 指标配置

  • 是否为高级指标。1是 0否

  • 高级指标是否开通。1是 0否

  • 集成中心产品ID

  • 匹配运算符

  • 指标触发

  • 是否延迟指标



11060
11061
11062
# File 'lib/v20180724/models.rb', line 11060

def Operators
  @Operators
end

#PeriodsObject

注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • 告警策略类型

  • 指标名

  • 指标展示名

  • 最小值

  • 最大值

  • 维度列表

  • 单位

  • 指标配置

  • 是否为高级指标。1是 0否

  • 高级指标是否开通。1是 0否

  • 集成中心产品ID

  • 匹配运算符

  • 指标触发

  • 是否延迟指标



11060
11061
11062
# File 'lib/v20180724/models.rb', line 11060

def Periods
  @Periods
end

#ProductIdObject

注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • 告警策略类型

  • 指标名

  • 指标展示名

  • 最小值

  • 最大值

  • 维度列表

  • 单位

  • 指标配置

  • 是否为高级指标。1是 0否

  • 高级指标是否开通。1是 0否

  • 集成中心产品ID

  • 匹配运算符

  • 指标触发

  • 是否延迟指标



11060
11061
11062
# File 'lib/v20180724/models.rb', line 11060

def ProductId
  @ProductId
end

#UnitObject

注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • 告警策略类型

  • 指标名

  • 指标展示名

  • 最小值

  • 最大值

  • 维度列表

  • 单位

  • 指标配置

  • 是否为高级指标。1是 0否

  • 高级指标是否开通。1是 0否

  • 集成中心产品ID

  • 匹配运算符

  • 指标触发

  • 是否延迟指标



11060
11061
11062
# File 'lib/v20180724/models.rb', line 11060

def Unit
  @Unit
end

Instance Method Details

#deserialize(params) ⇒ Object



11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
# File 'lib/v20180724/models.rb', line 11079

def deserialize(params)
  @Namespace = params['Namespace']
  @MetricName = params['MetricName']
  @Description = params['Description']
  @Min = params['Min']
  @Max = params['Max']
  @Dimensions = params['Dimensions']
  @Unit = params['Unit']
  unless params['MetricConfig'].nil?
    @MetricConfig = MetricConfig.new
    @MetricConfig.deserialize(params['MetricConfig'])
  end
  @IsAdvanced = params['IsAdvanced']
  @IsOpen = params['IsOpen']
  @ProductId = params['ProductId']
  unless params['Operators'].nil?
    @Operators = []
    params['Operators'].each do |i|
      operator_tmp = Operator.new
      operator_tmp.deserialize(i)
      @Operators << operator_tmp
    end
  end
  @Periods = params['Periods']
  @IsLatenessMetric = params['IsLatenessMetric']
end