Class: TencentCloud::Monitor::V20180724::CreatePrometheusAlertGroupRequest

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

Overview

CreatePrometheusAlertGroup请求参数结构体

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of CreatePrometheusAlertGroupRequest.



2602
2603
2604
2605
2606
2607
2608
2609
2610
# File 'lib/v20180724/models.rb', line 2602

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

Instance Attribute Details

#AMPReceiversObject

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

Parameters:

  • InstanceId:

    prometheus实例ID

  • GroupName:

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

  • GroupState:

    告警分组状态:

  • AMPReceivers:

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

  • CustomReceiver:

    自定义告警通知模板

  • RepeatInterval:

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

  • Rules:

    要创建的告警规则列表



2600
2601
2602
# File 'lib/v20180724/models.rb', line 2600

def AMPReceivers
  @AMPReceivers
end

#CustomReceiverObject

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

Parameters:

  • InstanceId:

    prometheus实例ID

  • GroupName:

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

  • GroupState:

    告警分组状态:

  • AMPReceivers:

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

  • CustomReceiver:

    自定义告警通知模板

  • RepeatInterval:

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

  • Rules:

    要创建的告警规则列表



2600
2601
2602
# File 'lib/v20180724/models.rb', line 2600

def CustomReceiver
  @CustomReceiver
end

#GroupNameObject

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

Parameters:

  • InstanceId:

    prometheus实例ID

  • GroupName:

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

  • GroupState:

    告警分组状态:

  • AMPReceivers:

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

  • CustomReceiver:

    自定义告警通知模板

  • RepeatInterval:

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

  • Rules:

    要创建的告警规则列表



2600
2601
2602
# File 'lib/v20180724/models.rb', line 2600

def GroupName
  @GroupName
end

#GroupStateObject

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

Parameters:

  • InstanceId:

    prometheus实例ID

  • GroupName:

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

  • GroupState:

    告警分组状态:

  • AMPReceivers:

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

  • CustomReceiver:

    自定义告警通知模板

  • RepeatInterval:

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

  • Rules:

    要创建的告警规则列表



2600
2601
2602
# File 'lib/v20180724/models.rb', line 2600

def GroupState
  @GroupState
end

#InstanceIdObject

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

Parameters:

  • InstanceId:

    prometheus实例ID

  • GroupName:

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

  • GroupState:

    告警分组状态:

  • AMPReceivers:

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

  • CustomReceiver:

    自定义告警通知模板

  • RepeatInterval:

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

  • Rules:

    要创建的告警规则列表



2600
2601
2602
# File 'lib/v20180724/models.rb', line 2600

def InstanceId
  @InstanceId
end

#RepeatIntervalObject

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

Parameters:

  • InstanceId:

    prometheus实例ID

  • GroupName:

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

  • GroupState:

    告警分组状态:

  • AMPReceivers:

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

  • CustomReceiver:

    自定义告警通知模板

  • RepeatInterval:

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

  • Rules:

    要创建的告警规则列表



2600
2601
2602
# File 'lib/v20180724/models.rb', line 2600

def RepeatInterval
  @RepeatInterval
end

#RulesObject

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

Parameters:

  • InstanceId:

    prometheus实例ID

  • GroupName:

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

  • GroupState:

    告警分组状态:

  • AMPReceivers:

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

  • CustomReceiver:

    自定义告警通知模板

  • RepeatInterval:

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

  • Rules:

    要创建的告警规则列表



2600
2601
2602
# File 'lib/v20180724/models.rb', line 2600

def Rules
  @Rules
end

Instance Method Details

#deserialize(params) ⇒ Object



2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
# File 'lib/v20180724/models.rb', line 2612

def deserialize(params)
  @InstanceId = params['InstanceId']
  @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