Class: TencentCloud::Dbbrain::V20210527::ModifyAlarmPolicyRequest

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

Overview

ModifyAlarmPolicy请求参数结构体

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(applytype = nil, enable = nil, instanceids = nil, newprofilelevel = nil, newprofilename = nil, profilename = nil, profiletype = nil, remark = nil, ruletype = nil, templateinfo = nil, quickrule = nil, rules = nil) ⇒ ModifyAlarmPolicyRequest

Returns a new instance of ModifyAlarmPolicyRequest.



5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
# File 'lib/v20210527/models.rb', line 5865

def initialize(applytype=nil, enable=nil, instanceids=nil, newprofilelevel=nil, newprofilename=nil, profilename=nil, profiletype=nil, remark=nil, ruletype=nil, templateinfo=nil, quickrule=nil, rules=nil)
  @ApplyType = applytype
  @Enable = enable
  @InstanceIds = instanceids
  @NewProfileLevel = newprofilelevel
  @NewProfileName = newprofilename
  @ProfileName = profilename
  @ProfileType = profiletype
  @Remark = remark
  @RuleType = ruletype
  @TemplateInfo = templateinfo
  @QuickRule = quickrule
  @Rules = rules
end

Instance Attribute Details

#ApplyTypeObject

Instance-关联实例列表的实例warning-告警, information-通知,与Rules互斥

Parameters:

  • ApplyType:

    策略类型,固定值:instance, instance-代表实例类型策略

  • Enable:

    策略是否开启,0-代表开启,1-代表关闭

  • InstanceIds:

    实例id列表,可通过 [DescribeDiagDBInstances](cloud.tencent.com/document/api/1130/57798) 接口获取。

  • NewProfileLevel:

    User-动态关联该用户所有实例

  • NewProfileName:

    新策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileName:

    旧策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileType:

    策略类型,固定值:alarm_policy

  • Remark:

    备注

  • RuleType:

    规则类型 0-快速,1-自定义 若值为0,则QuickRule不能为空,若值为1,则Rules 不能为空

  • TemplateInfo:

    接受模板

  • QuickRule:

    快速规则 支持包括fatal-致命, critical-严重,

  • Rules:

    自定义规则,与QuickRule互斥。



5863
5864
5865
# File 'lib/v20210527/models.rb', line 5863

def ApplyType
  @ApplyType
end

#EnableObject

Instance-关联实例列表的实例warning-告警, information-通知,与Rules互斥

Parameters:

  • ApplyType:

    策略类型,固定值:instance, instance-代表实例类型策略

  • Enable:

    策略是否开启,0-代表开启,1-代表关闭

  • InstanceIds:

    实例id列表,可通过 [DescribeDiagDBInstances](cloud.tencent.com/document/api/1130/57798) 接口获取。

  • NewProfileLevel:

    User-动态关联该用户所有实例

  • NewProfileName:

    新策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileName:

    旧策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileType:

    策略类型,固定值:alarm_policy

  • Remark:

    备注

  • RuleType:

    规则类型 0-快速,1-自定义 若值为0,则QuickRule不能为空,若值为1,则Rules 不能为空

  • TemplateInfo:

    接受模板

  • QuickRule:

    快速规则 支持包括fatal-致命, critical-严重,

  • Rules:

    自定义规则,与QuickRule互斥。



5863
5864
5865
# File 'lib/v20210527/models.rb', line 5863

def Enable
  @Enable
end

#InstanceIdsObject

Instance-关联实例列表的实例warning-告警, information-通知,与Rules互斥

Parameters:

  • ApplyType:

    策略类型,固定值:instance, instance-代表实例类型策略

  • Enable:

    策略是否开启,0-代表开启,1-代表关闭

  • InstanceIds:

    实例id列表,可通过 [DescribeDiagDBInstances](cloud.tencent.com/document/api/1130/57798) 接口获取。

  • NewProfileLevel:

    User-动态关联该用户所有实例

  • NewProfileName:

    新策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileName:

    旧策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileType:

    策略类型,固定值:alarm_policy

  • Remark:

    备注

  • RuleType:

    规则类型 0-快速,1-自定义 若值为0,则QuickRule不能为空,若值为1,则Rules 不能为空

  • TemplateInfo:

    接受模板

  • QuickRule:

    快速规则 支持包括fatal-致命, critical-严重,

  • Rules:

    自定义规则,与QuickRule互斥。



5863
5864
5865
# File 'lib/v20210527/models.rb', line 5863

def InstanceIds
  @InstanceIds
end

#NewProfileLevelObject

Instance-关联实例列表的实例warning-告警, information-通知,与Rules互斥

Parameters:

  • ApplyType:

    策略类型,固定值:instance, instance-代表实例类型策略

  • Enable:

    策略是否开启,0-代表开启,1-代表关闭

  • InstanceIds:

    实例id列表,可通过 [DescribeDiagDBInstances](cloud.tencent.com/document/api/1130/57798) 接口获取。

  • NewProfileLevel:

    User-动态关联该用户所有实例

  • NewProfileName:

    新策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileName:

    旧策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileType:

    策略类型,固定值:alarm_policy

  • Remark:

    备注

  • RuleType:

    规则类型 0-快速,1-自定义 若值为0,则QuickRule不能为空,若值为1,则Rules 不能为空

  • TemplateInfo:

    接受模板

  • QuickRule:

    快速规则 支持包括fatal-致命, critical-严重,

  • Rules:

    自定义规则,与QuickRule互斥。



5863
5864
5865
# File 'lib/v20210527/models.rb', line 5863

def NewProfileLevel
  @NewProfileLevel
end

#NewProfileNameObject

Instance-关联实例列表的实例warning-告警, information-通知,与Rules互斥

Parameters:

  • ApplyType:

    策略类型,固定值:instance, instance-代表实例类型策略

  • Enable:

    策略是否开启,0-代表开启,1-代表关闭

  • InstanceIds:

    实例id列表,可通过 [DescribeDiagDBInstances](cloud.tencent.com/document/api/1130/57798) 接口获取。

  • NewProfileLevel:

    User-动态关联该用户所有实例

  • NewProfileName:

    新策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileName:

    旧策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileType:

    策略类型,固定值:alarm_policy

  • Remark:

    备注

  • RuleType:

    规则类型 0-快速,1-自定义 若值为0,则QuickRule不能为空,若值为1,则Rules 不能为空

  • TemplateInfo:

    接受模板

  • QuickRule:

    快速规则 支持包括fatal-致命, critical-严重,

  • Rules:

    自定义规则,与QuickRule互斥。



5863
5864
5865
# File 'lib/v20210527/models.rb', line 5863

def NewProfileName
  @NewProfileName
end

#ProfileNameObject

Instance-关联实例列表的实例warning-告警, information-通知,与Rules互斥

Parameters:

  • ApplyType:

    策略类型,固定值:instance, instance-代表实例类型策略

  • Enable:

    策略是否开启,0-代表开启,1-代表关闭

  • InstanceIds:

    实例id列表,可通过 [DescribeDiagDBInstances](cloud.tencent.com/document/api/1130/57798) 接口获取。

  • NewProfileLevel:

    User-动态关联该用户所有实例

  • NewProfileName:

    新策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileName:

    旧策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileType:

    策略类型,固定值:alarm_policy

  • Remark:

    备注

  • RuleType:

    规则类型 0-快速,1-自定义 若值为0,则QuickRule不能为空,若值为1,则Rules 不能为空

  • TemplateInfo:

    接受模板

  • QuickRule:

    快速规则 支持包括fatal-致命, critical-严重,

  • Rules:

    自定义规则,与QuickRule互斥。



5863
5864
5865
# File 'lib/v20210527/models.rb', line 5863

def ProfileName
  @ProfileName
end

#ProfileTypeObject

Instance-关联实例列表的实例warning-告警, information-通知,与Rules互斥

Parameters:

  • ApplyType:

    策略类型,固定值:instance, instance-代表实例类型策略

  • Enable:

    策略是否开启,0-代表开启,1-代表关闭

  • InstanceIds:

    实例id列表,可通过 [DescribeDiagDBInstances](cloud.tencent.com/document/api/1130/57798) 接口获取。

  • NewProfileLevel:

    User-动态关联该用户所有实例

  • NewProfileName:

    新策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileName:

    旧策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileType:

    策略类型,固定值:alarm_policy

  • Remark:

    备注

  • RuleType:

    规则类型 0-快速,1-自定义 若值为0,则QuickRule不能为空,若值为1,则Rules 不能为空

  • TemplateInfo:

    接受模板

  • QuickRule:

    快速规则 支持包括fatal-致命, critical-严重,

  • Rules:

    自定义规则,与QuickRule互斥。



5863
5864
5865
# File 'lib/v20210527/models.rb', line 5863

def ProfileType
  @ProfileType
end

#QuickRuleObject

Instance-关联实例列表的实例warning-告警, information-通知,与Rules互斥

Parameters:

  • ApplyType:

    策略类型,固定值:instance, instance-代表实例类型策略

  • Enable:

    策略是否开启,0-代表开启,1-代表关闭

  • InstanceIds:

    实例id列表,可通过 [DescribeDiagDBInstances](cloud.tencent.com/document/api/1130/57798) 接口获取。

  • NewProfileLevel:

    User-动态关联该用户所有实例

  • NewProfileName:

    新策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileName:

    旧策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileType:

    策略类型,固定值:alarm_policy

  • Remark:

    备注

  • RuleType:

    规则类型 0-快速,1-自定义 若值为0,则QuickRule不能为空,若值为1,则Rules 不能为空

  • TemplateInfo:

    接受模板

  • QuickRule:

    快速规则 支持包括fatal-致命, critical-严重,

  • Rules:

    自定义规则,与QuickRule互斥。



5863
5864
5865
# File 'lib/v20210527/models.rb', line 5863

def QuickRule
  @QuickRule
end

#RemarkObject

Instance-关联实例列表的实例warning-告警, information-通知,与Rules互斥

Parameters:

  • ApplyType:

    策略类型,固定值:instance, instance-代表实例类型策略

  • Enable:

    策略是否开启,0-代表开启,1-代表关闭

  • InstanceIds:

    实例id列表,可通过 [DescribeDiagDBInstances](cloud.tencent.com/document/api/1130/57798) 接口获取。

  • NewProfileLevel:

    User-动态关联该用户所有实例

  • NewProfileName:

    新策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileName:

    旧策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileType:

    策略类型,固定值:alarm_policy

  • Remark:

    备注

  • RuleType:

    规则类型 0-快速,1-自定义 若值为0,则QuickRule不能为空,若值为1,则Rules 不能为空

  • TemplateInfo:

    接受模板

  • QuickRule:

    快速规则 支持包括fatal-致命, critical-严重,

  • Rules:

    自定义规则,与QuickRule互斥。



5863
5864
5865
# File 'lib/v20210527/models.rb', line 5863

def Remark
  @Remark
end

#RulesObject

Instance-关联实例列表的实例warning-告警, information-通知,与Rules互斥

Parameters:

  • ApplyType:

    策略类型,固定值:instance, instance-代表实例类型策略

  • Enable:

    策略是否开启,0-代表开启,1-代表关闭

  • InstanceIds:

    实例id列表,可通过 [DescribeDiagDBInstances](cloud.tencent.com/document/api/1130/57798) 接口获取。

  • NewProfileLevel:

    User-动态关联该用户所有实例

  • NewProfileName:

    新策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileName:

    旧策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileType:

    策略类型,固定值:alarm_policy

  • Remark:

    备注

  • RuleType:

    规则类型 0-快速,1-自定义 若值为0,则QuickRule不能为空,若值为1,则Rules 不能为空

  • TemplateInfo:

    接受模板

  • QuickRule:

    快速规则 支持包括fatal-致命, critical-严重,

  • Rules:

    自定义规则,与QuickRule互斥。



5863
5864
5865
# File 'lib/v20210527/models.rb', line 5863

def Rules
  @Rules
end

#RuleTypeObject

Instance-关联实例列表的实例warning-告警, information-通知,与Rules互斥

Parameters:

  • ApplyType:

    策略类型,固定值:instance, instance-代表实例类型策略

  • Enable:

    策略是否开启,0-代表开启,1-代表关闭

  • InstanceIds:

    实例id列表,可通过 [DescribeDiagDBInstances](cloud.tencent.com/document/api/1130/57798) 接口获取。

  • NewProfileLevel:

    User-动态关联该用户所有实例

  • NewProfileName:

    新策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileName:

    旧策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileType:

    策略类型,固定值:alarm_policy

  • Remark:

    备注

  • RuleType:

    规则类型 0-快速,1-自定义 若值为0,则QuickRule不能为空,若值为1,则Rules 不能为空

  • TemplateInfo:

    接受模板

  • QuickRule:

    快速规则 支持包括fatal-致命, critical-严重,

  • Rules:

    自定义规则,与QuickRule互斥。



5863
5864
5865
# File 'lib/v20210527/models.rb', line 5863

def RuleType
  @RuleType
end

#TemplateInfoObject

Instance-关联实例列表的实例warning-告警, information-通知,与Rules互斥

Parameters:

  • ApplyType:

    策略类型,固定值:instance, instance-代表实例类型策略

  • Enable:

    策略是否开启,0-代表开启,1-代表关闭

  • InstanceIds:

    实例id列表,可通过 [DescribeDiagDBInstances](cloud.tencent.com/document/api/1130/57798) 接口获取。

  • NewProfileLevel:

    User-动态关联该用户所有实例

  • NewProfileName:

    新策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileName:

    旧策略名,包含中文英文数字,长度在60个字符以内,不能以“_”开头。

  • ProfileType:

    策略类型,固定值:alarm_policy

  • Remark:

    备注

  • RuleType:

    规则类型 0-快速,1-自定义 若值为0,则QuickRule不能为空,若值为1,则Rules 不能为空

  • TemplateInfo:

    接受模板

  • QuickRule:

    快速规则 支持包括fatal-致命, critical-严重,

  • Rules:

    自定义规则,与QuickRule互斥。



5863
5864
5865
# File 'lib/v20210527/models.rb', line 5863

def TemplateInfo
  @TemplateInfo
end

Instance Method Details

#deserialize(params) ⇒ Object



5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
# File 'lib/v20210527/models.rb', line 5880

def deserialize(params)
  @ApplyType = params['ApplyType']
  @Enable = params['Enable']
  unless params['InstanceIds'].nil?
    @InstanceIds = []
    params['InstanceIds'].each do |i|
      instanceid_tmp = InstanceID.new
      instanceid_tmp.deserialize(i)
      @InstanceIds << instanceid_tmp
    end
  end
  @NewProfileLevel = params['NewProfileLevel']
  @NewProfileName = params['NewProfileName']
  @ProfileName = params['ProfileName']
  @ProfileType = params['ProfileType']
  @Remark = params['Remark']
  @RuleType = params['RuleType']
  unless params['TemplateInfo'].nil?
    @TemplateInfo = []
    params['TemplateInfo'].each do |i|
      templateinfo_tmp = TemplateInfo.new
      templateinfo_tmp.deserialize(i)
      @TemplateInfo << templateinfo_tmp
    end
  end
  @QuickRule = params['QuickRule']
  unless params['Rules'].nil?
    @Rules = []
    params['Rules'].each do |i|
      alarmsrules_tmp = AlarmsRules.new
      alarmsrules_tmp.deserialize(i)
      @Rules << alarmsrules_tmp
    end
  end
end