Class: TencentCloud::Monitor::V20180724::PrometheusAlertRule

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

Overview

Prometheus告警规则

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil, rule = nil, labels = nil, template = nil, _for = nil, describe = nil, annotations = nil, rulestate = nil) ⇒ PrometheusAlertRule

Returns a new instance of PrometheusAlertRule.



13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
# File 'lib/v20180724/models.rb', line 13164

def initialize(name=nil, rule=nil, labels=nil, template=nil, _for=nil, describe=nil, annotations=nil, rulestate=nil)
  @Name = name
  @Rule = rule
  @Labels = labels
  @Template = template
  @For = _for
  @Describe = describe
  @Annotations = annotations
  @RuleState = rulestate
end

Instance Attribute Details

#AnnotationsObject

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

Parameters:

  • Name:

    规则名称

  • Rule:

    prometheus语句

  • Labels:

    额外标签

  • Template:

    告警发送模板

  • For:

    持续时间

  • Describe:

    该条规则的描述信息

  • Annotations:

    参考prometheus rule中的annotations

  • RuleState:

    告警规则状态



13162
13163
13164
# File 'lib/v20180724/models.rb', line 13162

def Annotations
  @Annotations
end

#DescribeObject

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

Parameters:

  • Name:

    规则名称

  • Rule:

    prometheus语句

  • Labels:

    额外标签

  • Template:

    告警发送模板

  • For:

    持续时间

  • Describe:

    该条规则的描述信息

  • Annotations:

    参考prometheus rule中的annotations

  • RuleState:

    告警规则状态



13162
13163
13164
# File 'lib/v20180724/models.rb', line 13162

def Describe
  @Describe
end

#ForObject

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

Parameters:

  • Name:

    规则名称

  • Rule:

    prometheus语句

  • Labels:

    额外标签

  • Template:

    告警发送模板

  • For:

    持续时间

  • Describe:

    该条规则的描述信息

  • Annotations:

    参考prometheus rule中的annotations

  • RuleState:

    告警规则状态



13162
13163
13164
# File 'lib/v20180724/models.rb', line 13162

def For
  @For
end

#LabelsObject

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

Parameters:

  • Name:

    规则名称

  • Rule:

    prometheus语句

  • Labels:

    额外标签

  • Template:

    告警发送模板

  • For:

    持续时间

  • Describe:

    该条规则的描述信息

  • Annotations:

    参考prometheus rule中的annotations

  • RuleState:

    告警规则状态



13162
13163
13164
# File 'lib/v20180724/models.rb', line 13162

def Labels
  @Labels
end

#NameObject

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

Parameters:

  • Name:

    规则名称

  • Rule:

    prometheus语句

  • Labels:

    额外标签

  • Template:

    告警发送模板

  • For:

    持续时间

  • Describe:

    该条规则的描述信息

  • Annotations:

    参考prometheus rule中的annotations

  • RuleState:

    告警规则状态



13162
13163
13164
# File 'lib/v20180724/models.rb', line 13162

def Name
  @Name
end

#RuleObject

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

Parameters:

  • Name:

    规则名称

  • Rule:

    prometheus语句

  • Labels:

    额外标签

  • Template:

    告警发送模板

  • For:

    持续时间

  • Describe:

    该条规则的描述信息

  • Annotations:

    参考prometheus rule中的annotations

  • RuleState:

    告警规则状态



13162
13163
13164
# File 'lib/v20180724/models.rb', line 13162

def Rule
  @Rule
end

#RuleStateObject

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

Parameters:

  • Name:

    规则名称

  • Rule:

    prometheus语句

  • Labels:

    额外标签

  • Template:

    告警发送模板

  • For:

    持续时间

  • Describe:

    该条规则的描述信息

  • Annotations:

    参考prometheus rule中的annotations

  • RuleState:

    告警规则状态



13162
13163
13164
# File 'lib/v20180724/models.rb', line 13162

def RuleState
  @RuleState
end

#TemplateObject

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

Parameters:

  • Name:

    规则名称

  • Rule:

    prometheus语句

  • Labels:

    额外标签

  • Template:

    告警发送模板

  • For:

    持续时间

  • Describe:

    该条规则的描述信息

  • Annotations:

    参考prometheus rule中的annotations

  • RuleState:

    告警规则状态



13162
13163
13164
# File 'lib/v20180724/models.rb', line 13162

def Template
  @Template
end

Instance Method Details

#deserialize(params) ⇒ Object



13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
# File 'lib/v20180724/models.rb', line 13175

def deserialize(params)
  @Name = params['Name']
  @Rule = params['Rule']
  unless params['Labels'].nil?
    @Labels = []
    params['Labels'].each do |i|
      label_tmp = Label.new
      label_tmp.deserialize(i)
      @Labels << label_tmp
    end
  end
  @Template = params['Template']
  @For = params['For']
  @Describe = params['Describe']
  unless params['Annotations'].nil?
    @Annotations = []
    params['Annotations'].each do |i|
      label_tmp = Label.new
      label_tmp.deserialize(i)
      @Annotations << label_tmp
    end
  end
  @RuleState = params['RuleState']
end