Class: TencentCloud::Monitor::V20180724::CreateAlertRuleRequest
- Inherits:
-
Common::AbstractModel
- Object
- Common::AbstractModel
- TencentCloud::Monitor::V20180724::CreateAlertRuleRequest
- Defined in:
- lib/v20180724/models.rb
Overview
CreateAlertRule请求参数结构体
Instance Attribute Summary collapse
-
#Annotations ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。.
-
#Duration ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。.
-
#Expr ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。.
-
#InstanceId ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。.
-
#Labels ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。.
-
#Receivers ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。.
-
#RuleName ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。.
-
#RuleState ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。.
-
#Type ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。.
Instance Method Summary collapse
- #deserialize(params) ⇒ Object
-
#initialize(instanceid = nil, rulename = nil, expr = nil, receivers = nil, rulestate = nil, duration = nil, labels = nil, annotations = nil, type = nil) ⇒ CreateAlertRuleRequest
constructor
A new instance of CreateAlertRuleRequest.
Constructor Details
#initialize(instanceid = nil, rulename = nil, expr = nil, receivers = nil, rulestate = nil, duration = nil, labels = nil, annotations = nil, type = nil) ⇒ CreateAlertRuleRequest
Returns a new instance of CreateAlertRuleRequest.
1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 |
# File 'lib/v20180724/models.rb', line 1936 def initialize(instanceid=nil, rulename=nil, expr=nil, receivers=nil, rulestate=nil, duration=nil, labels=nil, annotations=nil, type=nil) @InstanceId = instanceid @RuleName = rulename @Expr = expr @Receivers = receivers @RuleState = rulestate @Duration = duration @Labels = labels @Annotations = annotations @Type = type end |
Instance Attribute Details
#Annotations ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。
1934 1935 1936 |
# File 'lib/v20180724/models.rb', line 1934 def Annotations @Annotations end |
#Duration ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。
1934 1935 1936 |
# File 'lib/v20180724/models.rb', line 1934 def Duration @Duration end |
#Expr ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。
1934 1935 1936 |
# File 'lib/v20180724/models.rb', line 1934 def Expr @Expr end |
#InstanceId ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。
1934 1935 1936 |
# File 'lib/v20180724/models.rb', line 1934 def InstanceId @InstanceId end |
#Labels ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。
1934 1935 1936 |
# File 'lib/v20180724/models.rb', line 1934 def Labels @Labels end |
#Receivers ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。
1934 1935 1936 |
# File 'lib/v20180724/models.rb', line 1934 def Receivers @Receivers end |
#RuleName ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。
1934 1935 1936 |
# File 'lib/v20180724/models.rb', line 1934 def RuleName @RuleName end |
#RuleState ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。
1934 1935 1936 |
# File 'lib/v20180724/models.rb', line 1934 def RuleState @RuleState end |
#Type ⇒ Object
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。
1934 1935 1936 |
# File 'lib/v20180724/models.rb', line 1934 def Type @Type end |
Instance Method Details
#deserialize(params) ⇒ Object
1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 |
# File 'lib/v20180724/models.rb', line 1948 def deserialize(params) @InstanceId = params['InstanceId'] @RuleName = params['RuleName'] @Expr = params['Expr'] @Receivers = params['Receivers'] @RuleState = params['RuleState'] @Duration = params['Duration'] unless params['Labels'].nil? @Labels = [] params['Labels'].each do |i| prometheusrulekv_tmp = PrometheusRuleKV.new prometheusrulekv_tmp.deserialize(i) @Labels << prometheusrulekv_tmp end end unless params['Annotations'].nil? @Annotations = [] params['Annotations'].each do |i| prometheusrulekv_tmp = PrometheusRuleKV.new prometheusrulekv_tmp.deserialize(i) @Annotations << prometheusrulekv_tmp end end @Type = params['Type'] end |