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.



5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
# File 'lib/v20210527/models.rb', line 5938

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互斥。



5936
5937
5938
# File 'lib/v20210527/models.rb', line 5936

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互斥。



5936
5937
5938
# File 'lib/v20210527/models.rb', line 5936

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互斥。



5936
5937
5938
# File 'lib/v20210527/models.rb', line 5936

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互斥。



5936
5937
5938
# File 'lib/v20210527/models.rb', line 5936

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互斥。



5936
5937
5938
# File 'lib/v20210527/models.rb', line 5936

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互斥。



5936
5937
5938
# File 'lib/v20210527/models.rb', line 5936

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互斥。



5936
5937
5938
# File 'lib/v20210527/models.rb', line 5936

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互斥。



5936
5937
5938
# File 'lib/v20210527/models.rb', line 5936

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互斥。



5936
5937
5938
# File 'lib/v20210527/models.rb', line 5936

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互斥。



5936
5937
5938
# File 'lib/v20210527/models.rb', line 5936

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互斥。



5936
5937
5938
# File 'lib/v20210527/models.rb', line 5936

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互斥。



5936
5937
5938
# File 'lib/v20210527/models.rb', line 5936

def TemplateInfo
  @TemplateInfo
end

Instance Method Details

#deserialize(params) ⇒ Object



5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
# File 'lib/v20210527/models.rb', line 5953

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