Class: TencentCloud::Monitor::V20180724::UpdateAlertRuleRequest

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

Overview

UpdateAlertRule请求参数结构体

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ruleid = nil, instanceid = nil, rulestate = nil, rulename = nil, expr = nil, duration = nil, receivers = nil, labels = nil, annotations = nil, type = nil) ⇒ UpdateAlertRuleRequest

Returns a new instance of UpdateAlertRuleRequest.



15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
# File 'lib/v20180724/models.rb', line 15558

def initialize(ruleid=nil, instanceid=nil, rulestate=nil, rulename=nil, expr=nil, duration=nil, receivers=nil, labels=nil, annotations=nil, type=nil)
  @RuleId = ruleid
  @InstanceId = instanceid
  @RuleState = rulestate
  @RuleName = rulename
  @Expr = expr
  @Duration = duration
  @Receivers = receivers
  @Labels = labels
  @Annotations = annotations
  @Type = type
end

Instance Attribute Details

#AnnotationsObject

告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。

Parameters:

  • Type:

    告警策略模板分类(自定义,可不填)



15556
15557
15558
# File 'lib/v20180724/models.rb', line 15556

def Annotations
  @Annotations
end

#DurationObject

告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。

Parameters:

  • Type:

    告警策略模板分类(自定义,可不填)



15556
15557
15558
# File 'lib/v20180724/models.rb', line 15556

def Duration
  @Duration
end

#ExprObject

告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。

Parameters:

  • Type:

    告警策略模板分类(自定义,可不填)



15556
15557
15558
# File 'lib/v20180724/models.rb', line 15556

def Expr
  @Expr
end

#InstanceIdObject

告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。

Parameters:

  • Type:

    告警策略模板分类(自定义,可不填)



15556
15557
15558
# File 'lib/v20180724/models.rb', line 15556

def InstanceId
  @InstanceId
end

#LabelsObject

告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。

Parameters:

  • Type:

    告警策略模板分类(自定义,可不填)



15556
15557
15558
# File 'lib/v20180724/models.rb', line 15556

def Labels
  @Labels
end

#ReceiversObject

告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。

Parameters:

  • Type:

    告警策略模板分类(自定义,可不填)



15556
15557
15558
# File 'lib/v20180724/models.rb', line 15556

def Receivers
  @Receivers
end

#RuleIdObject

告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。

Parameters:

  • Type:

    告警策略模板分类(自定义,可不填)



15556
15557
15558
# File 'lib/v20180724/models.rb', line 15556

def RuleId
  @RuleId
end

#RuleNameObject

告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。

Parameters:

  • Type:

    告警策略模板分类(自定义,可不填)



15556
15557
15558
# File 'lib/v20180724/models.rb', line 15556

def RuleName
  @RuleName
end

#RuleStateObject

告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。

Parameters:

  • Type:

    告警策略模板分类(自定义,可不填)



15556
15557
15558
# File 'lib/v20180724/models.rb', line 15556

def RuleState
  @RuleState
end

#TypeObject

告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。

Parameters:

  • Type:

    告警策略模板分类(自定义,可不填)



15556
15557
15558
# File 'lib/v20180724/models.rb', line 15556

def Type
  @Type
end

Instance Method Details

#deserialize(params) ⇒ Object



15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
# File 'lib/v20180724/models.rb', line 15571

def deserialize(params)
  @RuleId = params['RuleId']
  @InstanceId = params['InstanceId']
  @RuleState = params['RuleState']
  @RuleName = params['RuleName']
  @Expr = params['Expr']
  @Duration = params['Duration']
  @Receivers = params['Receivers']
  unless params['Labels'].nil?
    @Labels = []
    params['Labels'].each do |i|
      prometheusrulekv_tmp = PrometheusRuleKV.new
      prometheusrulekv_tmp.deserialize(i)
      @Labels << prometheusrulekv_tmp
    end
  end
  unless params['Annotations'].nil?
    @Annotations = []
    params['Annotations'].each do |i|
      prometheusrulekv_tmp = PrometheusRuleKV.new
      prometheusrulekv_tmp.deserialize(i)
      @Annotations << prometheusrulekv_tmp
    end
  end
  @Type = params['Type']
end