Class: TencentCloud::Cls::V20201016::Relabeling

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

Overview

标签重新标记配置。 允许动态重写目标、警报、抓取样本和远程写入样本的标签集。

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action = nil, sourcelabels = nil, separator = nil, targetlabel = nil, replacement = nil, regex = nil, modulus = nil) ⇒ Relabeling

Returns a new instance of Relabeling.



16438
16439
16440
16441
16442
16443
16444
16445
16446
# File 'lib/v20201016/models.rb', line 16438

def initialize(action=nil, sourcelabels=nil, separator=nil, targetlabel=nil, replacement=nil, regex=nil, modulus=nil)
  @Action = action
  @SourceLabels = sourcelabels
  @Separator = separator
  @TargetLabel = targetlabel
  @Replacement = replacement
  @Regex = regex
  @Modulus = modulus
end

Instance Attribute Details

#Action ⇒ Object

  • replace: Label替换, 必填: SourceLabels, Separator, Regex, TargetLabel, Replacement
  • labeldrop: 丢弃Label, 必填: Regex
  • labelkeep: 保留Label, 必填: Regex
  • lowercase: 小写化, 必填: SourceLabels, Separator, TargetLabel
  • uppercase: 大写化, 必填: SourceLabels, Separator, TargetLabel
  • dropequal: 丢弃指标-完全匹配, 必填: SourceLabels, Separator, TargetLabel
  • keepequal: 保留指标-完全匹配, 必填: SourceLabels, Separator, TargetLabel
  • drop: 丢弃指标-正则匹配, 必填: SourceLabels, Separator, Regex
  • keep: 保留指标-正则匹配, 必填: SourceLabels, Separator, Regex
  • hashmod:哈希取模, 必填: SourceLabels, Separator, TargetLabel, Modulus
  • labelmap:Label映射, 必填: Regex, Replacement 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。
  • 必填时不能为空串,长度不能超过256
  • 当action为LabelMap时, Replacement 校验格式:^(?:(?:[a-zA-Z_]|\$(?:\{\w+\}|\w+))+\w*)+$ 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Action: —

    基于正则表达式匹配执行的动作。

  • SourceLabels: —

    原始label

  • Separator: —

    原始label连接符。 必填时不能为空串, 长度不能超过256

  • TargetLabel: —

    目标label。必填时不能为空串,校验格式:^[a-zA-Z_][a-zA-Z0-9_]*$ , 长度不能超过256

  • Replacement: —

    替换值。如果正则表达式匹配,则对其执行替换操作。

  • Regex: —

    正则表达式。提取与之匹配值。必填时不能为空串,校验必须是一个合法的 RE2

  • Modulus: —

    获取源标签值的哈希值。必填时不能为空,不能为0



16436
16437
16438
# File 'lib/v20201016/models.rb', line 16436

def Action
  @Action
end

#Modulus ⇒ Object

  • replace: Label替换, 必填: SourceLabels, Separator, Regex, TargetLabel, Replacement
  • labeldrop: 丢弃Label, 必填: Regex
  • labelkeep: 保留Label, 必填: Regex
  • lowercase: 小写化, 必填: SourceLabels, Separator, TargetLabel
  • uppercase: 大写化, 必填: SourceLabels, Separator, TargetLabel
  • dropequal: 丢弃指标-完全匹配, 必填: SourceLabels, Separator, TargetLabel
  • keepequal: 保留指标-完全匹配, 必填: SourceLabels, Separator, TargetLabel
  • drop: 丢弃指标-正则匹配, 必填: SourceLabels, Separator, Regex
  • keep: 保留指标-正则匹配, 必填: SourceLabels, Separator, Regex
  • hashmod:哈希取模, 必填: SourceLabels, Separator, TargetLabel, Modulus
  • labelmap:Label映射, 必填: Regex, Replacement 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。
  • 必填时不能为空串,长度不能超过256
  • 当action为LabelMap时, Replacement 校验格式:^(?:(?:[a-zA-Z_]|\$(?:\{\w+\}|\w+))+\w*)+$ 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Action: —

    基于正则表达式匹配执行的动作。

  • SourceLabels: —

    原始label

  • Separator: —

    原始label连接符。 必填时不能为空串, 长度不能超过256

  • TargetLabel: —

    目标label。必填时不能为空串,校验格式:^[a-zA-Z_][a-zA-Z0-9_]*$ , 长度不能超过256

  • Replacement: —

    替换值。如果正则表达式匹配,则对其执行替换操作。

  • Regex: —

    正则表达式。提取与之匹配值。必填时不能为空串,校验必须是一个合法的 RE2

  • Modulus: —

    获取源标签值的哈希值。必填时不能为空,不能为0



16436
16437
16438
# File 'lib/v20201016/models.rb', line 16436

def Modulus
  @Modulus
end

#Regex ⇒ Object

  • replace: Label替换, 必填: SourceLabels, Separator, Regex, TargetLabel, Replacement
  • labeldrop: 丢弃Label, 必填: Regex
  • labelkeep: 保留Label, 必填: Regex
  • lowercase: 小写化, 必填: SourceLabels, Separator, TargetLabel
  • uppercase: 大写化, 必填: SourceLabels, Separator, TargetLabel
  • dropequal: 丢弃指标-完全匹配, 必填: SourceLabels, Separator, TargetLabel
  • keepequal: 保留指标-完全匹配, 必填: SourceLabels, Separator, TargetLabel
  • drop: 丢弃指标-正则匹配, 必填: SourceLabels, Separator, Regex
  • keep: 保留指标-正则匹配, 必填: SourceLabels, Separator, Regex
  • hashmod:哈希取模, 必填: SourceLabels, Separator, TargetLabel, Modulus
  • labelmap:Label映射, 必填: Regex, Replacement 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。
  • 必填时不能为空串,长度不能超过256
  • 当action为LabelMap时, Replacement 校验格式:^(?:(?:[a-zA-Z_]|\$(?:\{\w+\}|\w+))+\w*)+$ 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Action: —

    基于正则表达式匹配执行的动作。

  • SourceLabels: —

    原始label

  • Separator: —

    原始label连接符。 必填时不能为空串, 长度不能超过256

  • TargetLabel: —

    目标label。必填时不能为空串,校验格式:^[a-zA-Z_][a-zA-Z0-9_]*$ , 长度不能超过256

  • Replacement: —

    替换值。如果正则表达式匹配,则对其执行替换操作。

  • Regex: —

    正则表达式。提取与之匹配值。必填时不能为空串,校验必须是一个合法的 RE2

  • Modulus: —

    获取源标签值的哈希值。必填时不能为空,不能为0



16436
16437
16438
# File 'lib/v20201016/models.rb', line 16436

def Regex
  @Regex
end

#Replacement ⇒ Object

  • replace: Label替换, 必填: SourceLabels, Separator, Regex, TargetLabel, Replacement
  • labeldrop: 丢弃Label, 必填: Regex
  • labelkeep: 保留Label, 必填: Regex
  • lowercase: 小写化, 必填: SourceLabels, Separator, TargetLabel
  • uppercase: 大写化, 必填: SourceLabels, Separator, TargetLabel
  • dropequal: 丢弃指标-完全匹配, 必填: SourceLabels, Separator, TargetLabel
  • keepequal: 保留指标-完全匹配, 必填: SourceLabels, Separator, TargetLabel
  • drop: 丢弃指标-正则匹配, 必填: SourceLabels, Separator, Regex
  • keep: 保留指标-正则匹配, 必填: SourceLabels, Separator, Regex
  • hashmod:哈希取模, 必填: SourceLabels, Separator, TargetLabel, Modulus
  • labelmap:Label映射, 必填: Regex, Replacement 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。
  • 必填时不能为空串,长度不能超过256
  • 当action为LabelMap时, Replacement 校验格式:^(?:(?:[a-zA-Z_]|\$(?:\{\w+\}|\w+))+\w*)+$ 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Action: —

    基于正则表达式匹配执行的动作。

  • SourceLabels: —

    原始label

  • Separator: —

    原始label连接符。 必填时不能为空串, 长度不能超过256

  • TargetLabel: —

    目标label。必填时不能为空串,校验格式:^[a-zA-Z_][a-zA-Z0-9_]*$ , 长度不能超过256

  • Replacement: —

    替换值。如果正则表达式匹配,则对其执行替换操作。

  • Regex: —

    正则表达式。提取与之匹配值。必填时不能为空串,校验必须是一个合法的 RE2

  • Modulus: —

    获取源标签值的哈希值。必填时不能为空,不能为0



16436
16437
16438
# File 'lib/v20201016/models.rb', line 16436

def Replacement
  @Replacement
end

#Separator ⇒ Object

  • replace: Label替换, 必填: SourceLabels, Separator, Regex, TargetLabel, Replacement
  • labeldrop: 丢弃Label, 必填: Regex
  • labelkeep: 保留Label, 必填: Regex
  • lowercase: 小写化, 必填: SourceLabels, Separator, TargetLabel
  • uppercase: 大写化, 必填: SourceLabels, Separator, TargetLabel
  • dropequal: 丢弃指标-完全匹配, 必填: SourceLabels, Separator, TargetLabel
  • keepequal: 保留指标-完全匹配, 必填: SourceLabels, Separator, TargetLabel
  • drop: 丢弃指标-正则匹配, 必填: SourceLabels, Separator, Regex
  • keep: 保留指标-正则匹配, 必填: SourceLabels, Separator, Regex
  • hashmod:哈希取模, 必填: SourceLabels, Separator, TargetLabel, Modulus
  • labelmap:Label映射, 必填: Regex, Replacement 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。
  • 必填时不能为空串,长度不能超过256
  • 当action为LabelMap时, Replacement 校验格式:^(?:(?:[a-zA-Z_]|\$(?:\{\w+\}|\w+))+\w*)+$ 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Action: —

    基于正则表达式匹配执行的动作。

  • SourceLabels: —

    原始label

  • Separator: —

    原始label连接符。 必填时不能为空串, 长度不能超过256

  • TargetLabel: —

    目标label。必填时不能为空串,校验格式:^[a-zA-Z_][a-zA-Z0-9_]*$ , 长度不能超过256

  • Replacement: —

    替换值。如果正则表达式匹配,则对其执行替换操作。

  • Regex: —

    正则表达式。提取与之匹配值。必填时不能为空串,校验必须是一个合法的 RE2

  • Modulus: —

    获取源标签值的哈希值。必填时不能为空,不能为0



16436
16437
16438
# File 'lib/v20201016/models.rb', line 16436

def Separator
  @Separator
end

#SourceLabels ⇒ Object

  • replace: Label替换, 必填: SourceLabels, Separator, Regex, TargetLabel, Replacement
  • labeldrop: 丢弃Label, 必填: Regex
  • labelkeep: 保留Label, 必填: Regex
  • lowercase: 小写化, 必填: SourceLabels, Separator, TargetLabel
  • uppercase: 大写化, 必填: SourceLabels, Separator, TargetLabel
  • dropequal: 丢弃指标-完全匹配, 必填: SourceLabels, Separator, TargetLabel
  • keepequal: 保留指标-完全匹配, 必填: SourceLabels, Separator, TargetLabel
  • drop: 丢弃指标-正则匹配, 必填: SourceLabels, Separator, Regex
  • keep: 保留指标-正则匹配, 必填: SourceLabels, Separator, Regex
  • hashmod:哈希取模, 必填: SourceLabels, Separator, TargetLabel, Modulus
  • labelmap:Label映射, 必填: Regex, Replacement 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。
  • 必填时不能为空串,长度不能超过256
  • 当action为LabelMap时, Replacement 校验格式:^(?:(?:[a-zA-Z_]|\$(?:\{\w+\}|\w+))+\w*)+$ 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Action: —

    基于正则表达式匹配执行的动作。

  • SourceLabels: —

    原始label

  • Separator: —

    原始label连接符。 必填时不能为空串, 长度不能超过256

  • TargetLabel: —

    目标label。必填时不能为空串,校验格式:^[a-zA-Z_][a-zA-Z0-9_]*$ , 长度不能超过256

  • Replacement: —

    替换值。如果正则表达式匹配,则对其执行替换操作。

  • Regex: —

    正则表达式。提取与之匹配值。必填时不能为空串,校验必须是一个合法的 RE2

  • Modulus: —

    获取源标签值的哈希值。必填时不能为空,不能为0



16436
16437
16438
# File 'lib/v20201016/models.rb', line 16436

def SourceLabels
  @SourceLabels
end

#TargetLabel ⇒ Object

  • replace: Label替换, 必填: SourceLabels, Separator, Regex, TargetLabel, Replacement
  • labeldrop: 丢弃Label, 必填: Regex
  • labelkeep: 保留Label, 必填: Regex
  • lowercase: 小写化, 必填: SourceLabels, Separator, TargetLabel
  • uppercase: 大写化, 必填: SourceLabels, Separator, TargetLabel
  • dropequal: 丢弃指标-完全匹配, 必填: SourceLabels, Separator, TargetLabel
  • keepequal: 保留指标-完全匹配, 必填: SourceLabels, Separator, TargetLabel
  • drop: 丢弃指标-正则匹配, 必填: SourceLabels, Separator, Regex
  • keep: 保留指标-正则匹配, 必填: SourceLabels, Separator, Regex
  • hashmod:哈希取模, 必填: SourceLabels, Separator, TargetLabel, Modulus
  • labelmap:Label映射, 必填: Regex, Replacement 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。
  • 必填时不能为空串,长度不能超过256
  • 当action为LabelMap时, Replacement 校验格式:^(?:(?:[a-zA-Z_]|\$(?:\{\w+\}|\w+))+\w*)+$ 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Action: —

    基于正则表达式匹配执行的动作。

  • SourceLabels: —

    原始label

  • Separator: —

    原始label连接符。 必填时不能为空串, 长度不能超过256

  • TargetLabel: —

    目标label。必填时不能为空串,校验格式:^[a-zA-Z_][a-zA-Z0-9_]*$ , 长度不能超过256

  • Replacement: —

    替换值。如果正则表达式匹配,则对其执行替换操作。

  • Regex: —

    正则表达式。提取与之匹配值。必填时不能为空串,校验必须是一个合法的 RE2

  • Modulus: —

    获取源标签值的哈希值。必填时不能为空,不能为0



16436
16437
16438
# File 'lib/v20201016/models.rb', line 16436

def TargetLabel
  @TargetLabel
end

Instance Method Details

#deserialize(params) ⇒ Object



16448
16449
16450
16451
16452
16453
16454
16455
16456
# File 'lib/v20201016/models.rb', line 16448

def deserialize(params)
  @Action = params['Action']
  @SourceLabels = params['SourceLabels']
  @Separator = params['Separator']
  @TargetLabel = params['TargetLabel']
  @Replacement = params['Replacement']
  @Regex = params['Regex']
  @Modulus = params['Modulus']
end