Class: TencentCloud::Monitor::V20180724::UpdatePrometheusAlertGroupRequest

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

Overview

UpdatePrometheusAlertGroup请求参数结构体

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instanceid = nil, groupid = nil, groupname = nil, groupstate = nil, ampreceivers = nil, customreceiver = nil, repeatinterval = nil, rules = nil) ⇒ UpdatePrometheusAlertGroupRequest

Returns a new instance of UpdatePrometheusAlertGroupRequest.



16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
# File 'lib/v20180724/models.rb', line 16024

def initialize(instanceid=nil, groupid=nil, groupname=nil, groupstate=nil, ampreceivers=nil, customreceiver=nil, repeatinterval=nil, rules=nil)
  @InstanceId = instanceid
  @GroupId = groupid
  @GroupName = groupname
  @GroupState = groupstate
  @AMPReceivers = ampreceivers
  @CustomReceiver = customreceiver
  @RepeatInterval = repeatinterval
  @Rules = rules
end

Instance Attribute Details

#AMPReceiversObject

2 -- 启用 3 -- 禁用 不为空时会覆盖 Rules字段下所有告警规则状态

Parameters:

  • InstanceId:

    prometheus实例ID

  • GroupId:

    告警分组ID,形如alert-xxxx

  • GroupName:

    告警分组名称,不能与其他告警分组重名

  • GroupState:

    告警分组状态:

  • AMPReceivers:

    腾讯云可观测平台告警通知模板ID列表,形如Consumer-xxxx或notice-xxxx

  • CustomReceiver:

    自定义告警通知模板

  • RepeatInterval:

    告警通知周期(收敛时间),为空默认1h

  • Rules:

    要创建的告警规则列表



16022
16023
16024
# File 'lib/v20180724/models.rb', line 16022

def AMPReceivers
  @AMPReceivers
end

#CustomReceiverObject

2 -- 启用 3 -- 禁用 不为空时会覆盖 Rules字段下所有告警规则状态

Parameters:

  • InstanceId:

    prometheus实例ID

  • GroupId:

    告警分组ID,形如alert-xxxx

  • GroupName:

    告警分组名称,不能与其他告警分组重名

  • GroupState:

    告警分组状态:

  • AMPReceivers:

    腾讯云可观测平台告警通知模板ID列表,形如Consumer-xxxx或notice-xxxx

  • CustomReceiver:

    自定义告警通知模板

  • RepeatInterval:

    告警通知周期(收敛时间),为空默认1h

  • Rules:

    要创建的告警规则列表



16022
16023
16024
# File 'lib/v20180724/models.rb', line 16022

def CustomReceiver
  @CustomReceiver
end

#GroupIdObject

2 -- 启用 3 -- 禁用 不为空时会覆盖 Rules字段下所有告警规则状态

Parameters:

  • InstanceId:

    prometheus实例ID

  • GroupId:

    告警分组ID,形如alert-xxxx

  • GroupName:

    告警分组名称,不能与其他告警分组重名

  • GroupState:

    告警分组状态:

  • AMPReceivers:

    腾讯云可观测平台告警通知模板ID列表,形如Consumer-xxxx或notice-xxxx

  • CustomReceiver:

    自定义告警通知模板

  • RepeatInterval:

    告警通知周期(收敛时间),为空默认1h

  • Rules:

    要创建的告警规则列表



16022
16023
16024
# File 'lib/v20180724/models.rb', line 16022

def GroupId
  @GroupId
end

#GroupNameObject

2 -- 启用 3 -- 禁用 不为空时会覆盖 Rules字段下所有告警规则状态

Parameters:

  • InstanceId:

    prometheus实例ID

  • GroupId:

    告警分组ID,形如alert-xxxx

  • GroupName:

    告警分组名称,不能与其他告警分组重名

  • GroupState:

    告警分组状态:

  • AMPReceivers:

    腾讯云可观测平台告警通知模板ID列表,形如Consumer-xxxx或notice-xxxx

  • CustomReceiver:

    自定义告警通知模板

  • RepeatInterval:

    告警通知周期(收敛时间),为空默认1h

  • Rules:

    要创建的告警规则列表



16022
16023
16024
# File 'lib/v20180724/models.rb', line 16022

def GroupName
  @GroupName
end

#GroupStateObject

2 -- 启用 3 -- 禁用 不为空时会覆盖 Rules字段下所有告警规则状态

Parameters:

  • InstanceId:

    prometheus实例ID

  • GroupId:

    告警分组ID,形如alert-xxxx

  • GroupName:

    告警分组名称,不能与其他告警分组重名

  • GroupState:

    告警分组状态:

  • AMPReceivers:

    腾讯云可观测平台告警通知模板ID列表,形如Consumer-xxxx或notice-xxxx

  • CustomReceiver:

    自定义告警通知模板

  • RepeatInterval:

    告警通知周期(收敛时间),为空默认1h

  • Rules:

    要创建的告警规则列表



16022
16023
16024
# File 'lib/v20180724/models.rb', line 16022

def GroupState
  @GroupState
end

#InstanceIdObject

2 -- 启用 3 -- 禁用 不为空时会覆盖 Rules字段下所有告警规则状态

Parameters:

  • InstanceId:

    prometheus实例ID

  • GroupId:

    告警分组ID,形如alert-xxxx

  • GroupName:

    告警分组名称,不能与其他告警分组重名

  • GroupState:

    告警分组状态:

  • AMPReceivers:

    腾讯云可观测平台告警通知模板ID列表,形如Consumer-xxxx或notice-xxxx

  • CustomReceiver:

    自定义告警通知模板

  • RepeatInterval:

    告警通知周期(收敛时间),为空默认1h

  • Rules:

    要创建的告警规则列表



16022
16023
16024
# File 'lib/v20180724/models.rb', line 16022

def InstanceId
  @InstanceId
end

#RepeatIntervalObject

2 -- 启用 3 -- 禁用 不为空时会覆盖 Rules字段下所有告警规则状态

Parameters:

  • InstanceId:

    prometheus实例ID

  • GroupId:

    告警分组ID,形如alert-xxxx

  • GroupName:

    告警分组名称,不能与其他告警分组重名

  • GroupState:

    告警分组状态:

  • AMPReceivers:

    腾讯云可观测平台告警通知模板ID列表,形如Consumer-xxxx或notice-xxxx

  • CustomReceiver:

    自定义告警通知模板

  • RepeatInterval:

    告警通知周期(收敛时间),为空默认1h

  • Rules:

    要创建的告警规则列表



16022
16023
16024
# File 'lib/v20180724/models.rb', line 16022

def RepeatInterval
  @RepeatInterval
end

#RulesObject

2 -- 启用 3 -- 禁用 不为空时会覆盖 Rules字段下所有告警规则状态

Parameters:

  • InstanceId:

    prometheus实例ID

  • GroupId:

    告警分组ID,形如alert-xxxx

  • GroupName:

    告警分组名称,不能与其他告警分组重名

  • GroupState:

    告警分组状态:

  • AMPReceivers:

    腾讯云可观测平台告警通知模板ID列表,形如Consumer-xxxx或notice-xxxx

  • CustomReceiver:

    自定义告警通知模板

  • RepeatInterval:

    告警通知周期(收敛时间),为空默认1h

  • Rules:

    要创建的告警规则列表



16022
16023
16024
# File 'lib/v20180724/models.rb', line 16022

def Rules
  @Rules
end

Instance Method Details

#deserialize(params) ⇒ Object



16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
# File 'lib/v20180724/models.rb', line 16035

def deserialize(params)
  @InstanceId = params['InstanceId']
  @GroupId = params['GroupId']
  @GroupName = params['GroupName']
  @GroupState = params['GroupState']
  @AMPReceivers = params['AMPReceivers']
  unless params['CustomReceiver'].nil?
    @CustomReceiver = PrometheusAlertCustomReceiver.new
    @CustomReceiver.deserialize(params['CustomReceiver'])
  end
  @RepeatInterval = params['RepeatInterval']
  unless params['Rules'].nil?
    @Rules = []
    params['Rules'].each do |i|
      prometheusalertgroupruleset_tmp = PrometheusAlertGroupRuleSet.new
      prometheusalertgroupruleset_tmp.deserialize(i)
      @Rules << prometheusalertgroupruleset_tmp
    end
  end
end