huaweicloudsdkaom 3.1.86__py2.py3-none-any.whl → 3.1.132__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of huaweicloudsdkaom might be problematic. Click here for more details.
- huaweicloudsdkaom/v1/region/aom_region.py +9 -0
- huaweicloudsdkaom/v2/__init__.py +23 -0
- huaweicloudsdkaom/v2/aom_async_client.py +255 -24
- huaweicloudsdkaom/v2/aom_client.py +255 -24
- huaweicloudsdkaom/v2/model/__init__.py +23 -0
- huaweicloudsdkaom/v2/model/add_or_update_alarm_rule_v4_item_result.py +142 -0
- huaweicloudsdkaom/v2/model/add_or_update_alarm_rule_v4_request_body.py +304 -0
- huaweicloudsdkaom/v2/model/add_or_update_metric_or_event_alarm_rule_request.py +168 -0
- huaweicloudsdkaom/v2/model/add_or_update_metric_or_event_alarm_rule_response.py +174 -0
- huaweicloudsdkaom/v2/model/alarm_notification.py +315 -0
- huaweicloudsdkaom/v2/model/alarm_param_for_v4_db.py +470 -0
- huaweicloudsdkaom/v2/model/alarm_tags.py +173 -0
- huaweicloudsdkaom/v2/model/cmdb_info.py +144 -0
- huaweicloudsdkaom/v2/model/count_events_response.py +32 -3
- huaweicloudsdkaom/v2/model/delete_alarm_rule_v4_request_body.py +114 -0
- huaweicloudsdkaom/v2/model/delete_metric_or_event_alarm_rule_request.py +111 -0
- huaweicloudsdkaom/v2/model/delete_metric_or_event_alarm_rule_response.py +174 -0
- huaweicloudsdkaom/v2/model/delete_prom_instance_request.py +31 -3
- huaweicloudsdkaom/v2/model/event_alarm_spec.py +260 -0
- huaweicloudsdkaom/v2/model/event_trigger_condition.py +260 -0
- huaweicloudsdkaom/v2/model/item_result.py +114 -0
- huaweicloudsdkaom/v2/model/list_agents_request.py +6 -6
- huaweicloudsdkaom/v2/model/list_event_model.py +405 -0
- huaweicloudsdkaom/v2/model/list_events_request.py +88 -1
- huaweicloudsdkaom/v2/model/list_events_response.py +31 -6
- huaweicloudsdkaom/v2/model/list_metric_or_event_alarm_rule_request.py +434 -0
- huaweicloudsdkaom/v2/model/list_metric_or_event_alarm_rule_response.py +174 -0
- huaweicloudsdkaom/v2/model/list_prom_instance_request.py +31 -3
- huaweicloudsdkaom/v2/model/metric_alarm_spec.py +310 -0
- huaweicloudsdkaom/v2/model/no_data_condition.py +173 -0
- huaweicloudsdkaom/v2/model/node_info.py +144 -0
- huaweicloudsdkaom/v2/model/page_info.py +170 -0
- huaweicloudsdkaom/v2/model/push_events_request.py +18 -18
- huaweicloudsdkaom/v2/model/recovery_condition.py +115 -0
- huaweicloudsdkaom/v2/model/smn_info.py +4 -4
- huaweicloudsdkaom/v2/model/trigger_condition.py +742 -0
- huaweicloudsdkaom/v2/region/aom_region.py +9 -0
- huaweicloudsdkaom/v3/aom_async_client.py +19 -19
- huaweicloudsdkaom/v3/aom_client.py +19 -19
- huaweicloudsdkaom/v3/model/biz_app_param.py +12 -12
- huaweicloudsdkaom/v3/model/component_param.py +3 -3
- huaweicloudsdkaom/v3/model/env_param.py +6 -6
- huaweicloudsdkaom/v3/model/sub_app_create_param.py +15 -15
- huaweicloudsdkaom/v3/model/sub_app_update_param.py +9 -9
- huaweicloudsdkaom/v3/region/aom_region.py +9 -0
- huaweicloudsdkaom/v4/__init__.py +21 -0
- huaweicloudsdkaom/v4/aom_async_client.py +279 -0
- huaweicloudsdkaom/v4/aom_client.py +276 -0
- huaweicloudsdkaom/v4/model/__init__.py +18 -0
- huaweicloudsdkaom/v4/model/agent_batch_import_param_new.py +280 -0
- huaweicloudsdkaom/v4/model/agent_import_param_new.py +313 -0
- huaweicloudsdkaom/v4/model/agent_info_param.py +231 -0
- huaweicloudsdkaom/v4/model/agent_info_result.py +463 -0
- huaweicloudsdkaom/v4/model/agent_upgrade_param.py +142 -0
- huaweicloudsdkaom/v4/model/batch_import_agent_request.py +139 -0
- huaweicloudsdkaom/v4/model/batch_import_agent_response.py +116 -0
- huaweicloudsdkaom/v4/model/batch_update_agent_request.py +111 -0
- huaweicloudsdkaom/v4/model/batch_update_agent_response.py +116 -0
- huaweicloudsdkaom/v4/model/plugin_install_basic_param.py +173 -0
- huaweicloudsdkaom/v4/model/show_agent_infos_request.py +111 -0
- huaweicloudsdkaom/v4/model/show_agent_infos_response.py +203 -0
- huaweicloudsdkaom/v4/model/single_agent_param.py +142 -0
- huaweicloudsdkaom/v4/region/__init__.py +0 -0
- huaweicloudsdkaom/v4/region/aom_region.py +100 -0
- {huaweicloudsdkaom-3.1.86.dist-info → huaweicloudsdkaom-3.1.132.dist-info}/METADATA +2 -2
- {huaweicloudsdkaom-3.1.86.dist-info → huaweicloudsdkaom-3.1.132.dist-info}/RECORD +69 -27
- {huaweicloudsdkaom-3.1.86.dist-info → huaweicloudsdkaom-3.1.132.dist-info}/WHEEL +1 -1
- {huaweicloudsdkaom-3.1.86.dist-info → huaweicloudsdkaom-3.1.132.dist-info}/LICENSE +0 -0
- {huaweicloudsdkaom-3.1.86.dist-info → huaweicloudsdkaom-3.1.132.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class MetricAlarmSpec:
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
openapi_types (dict): The key is attribute name
|
|
13
|
+
and the value is attribute type.
|
|
14
|
+
attribute_map (dict): The key is attribute name
|
|
15
|
+
and the value is json key in definition.
|
|
16
|
+
"""
|
|
17
|
+
sensitive_list = []
|
|
18
|
+
|
|
19
|
+
openapi_types = {
|
|
20
|
+
'monitor_type': 'str',
|
|
21
|
+
'no_data_conditions': 'list[NoDataCondition]',
|
|
22
|
+
'alarm_tags': 'list[AlarmTags]',
|
|
23
|
+
'monitor_objects': 'list[dict(str, str)]',
|
|
24
|
+
'recovery_conditions': 'RecoveryCondition',
|
|
25
|
+
'trigger_conditions': 'list[TriggerCondition]',
|
|
26
|
+
'alarm_rule_template_bind_enable': 'bool',
|
|
27
|
+
'alarm_rule_template_id': 'str'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
attribute_map = {
|
|
31
|
+
'monitor_type': 'monitor_type',
|
|
32
|
+
'no_data_conditions': 'no_data_conditions',
|
|
33
|
+
'alarm_tags': 'alarm_tags',
|
|
34
|
+
'monitor_objects': 'monitor_objects',
|
|
35
|
+
'recovery_conditions': 'recovery_conditions',
|
|
36
|
+
'trigger_conditions': 'trigger_conditions',
|
|
37
|
+
'alarm_rule_template_bind_enable': 'alarm_rule_template_bind_enable',
|
|
38
|
+
'alarm_rule_template_id': 'alarm_rule_template_id'
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
def __init__(self, monitor_type=None, no_data_conditions=None, alarm_tags=None, monitor_objects=None, recovery_conditions=None, trigger_conditions=None, alarm_rule_template_bind_enable=None, alarm_rule_template_id=None):
|
|
42
|
+
"""MetricAlarmSpec
|
|
43
|
+
|
|
44
|
+
The model defined in huaweicloud sdk
|
|
45
|
+
|
|
46
|
+
:param monitor_type: 监控类型。 - “all_metric”:全量指标 - “promql”:PromQL - “resource”:(日落)资源类型
|
|
47
|
+
:type monitor_type: str
|
|
48
|
+
:param no_data_conditions: 无数据处理。
|
|
49
|
+
:type no_data_conditions: list[:class:`huaweicloudsdkaom.v2.NoDataCondition`]
|
|
50
|
+
:param alarm_tags: 告警标签。
|
|
51
|
+
:type alarm_tags: list[:class:`huaweicloudsdkaom.v2.AlarmTags`]
|
|
52
|
+
:param monitor_objects: 监控对象列表。
|
|
53
|
+
:type monitor_objects: list[dict(str, str)]
|
|
54
|
+
:param recovery_conditions:
|
|
55
|
+
:type recovery_conditions: :class:`huaweicloudsdkaom.v2.RecoveryCondition`
|
|
56
|
+
:param trigger_conditions: 触发条件。
|
|
57
|
+
:type trigger_conditions: list[:class:`huaweicloudsdkaom.v2.TriggerCondition`]
|
|
58
|
+
:param alarm_rule_template_bind_enable: 是否绑定告警规则模版(废弃)。
|
|
59
|
+
:type alarm_rule_template_bind_enable: bool
|
|
60
|
+
:param alarm_rule_template_id: 告警规则模版id(废弃)。
|
|
61
|
+
:type alarm_rule_template_id: str
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
self._monitor_type = None
|
|
67
|
+
self._no_data_conditions = None
|
|
68
|
+
self._alarm_tags = None
|
|
69
|
+
self._monitor_objects = None
|
|
70
|
+
self._recovery_conditions = None
|
|
71
|
+
self._trigger_conditions = None
|
|
72
|
+
self._alarm_rule_template_bind_enable = None
|
|
73
|
+
self._alarm_rule_template_id = None
|
|
74
|
+
self.discriminator = None
|
|
75
|
+
|
|
76
|
+
self.monitor_type = monitor_type
|
|
77
|
+
if no_data_conditions is not None:
|
|
78
|
+
self.no_data_conditions = no_data_conditions
|
|
79
|
+
self.alarm_tags = alarm_tags
|
|
80
|
+
if monitor_objects is not None:
|
|
81
|
+
self.monitor_objects = monitor_objects
|
|
82
|
+
self.recovery_conditions = recovery_conditions
|
|
83
|
+
self.trigger_conditions = trigger_conditions
|
|
84
|
+
if alarm_rule_template_bind_enable is not None:
|
|
85
|
+
self.alarm_rule_template_bind_enable = alarm_rule_template_bind_enable
|
|
86
|
+
if alarm_rule_template_id is not None:
|
|
87
|
+
self.alarm_rule_template_id = alarm_rule_template_id
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def monitor_type(self):
|
|
91
|
+
"""Gets the monitor_type of this MetricAlarmSpec.
|
|
92
|
+
|
|
93
|
+
监控类型。 - “all_metric”:全量指标 - “promql”:PromQL - “resource”:(日落)资源类型
|
|
94
|
+
|
|
95
|
+
:return: The monitor_type of this MetricAlarmSpec.
|
|
96
|
+
:rtype: str
|
|
97
|
+
"""
|
|
98
|
+
return self._monitor_type
|
|
99
|
+
|
|
100
|
+
@monitor_type.setter
|
|
101
|
+
def monitor_type(self, monitor_type):
|
|
102
|
+
"""Sets the monitor_type of this MetricAlarmSpec.
|
|
103
|
+
|
|
104
|
+
监控类型。 - “all_metric”:全量指标 - “promql”:PromQL - “resource”:(日落)资源类型
|
|
105
|
+
|
|
106
|
+
:param monitor_type: The monitor_type of this MetricAlarmSpec.
|
|
107
|
+
:type monitor_type: str
|
|
108
|
+
"""
|
|
109
|
+
self._monitor_type = monitor_type
|
|
110
|
+
|
|
111
|
+
@property
|
|
112
|
+
def no_data_conditions(self):
|
|
113
|
+
"""Gets the no_data_conditions of this MetricAlarmSpec.
|
|
114
|
+
|
|
115
|
+
无数据处理。
|
|
116
|
+
|
|
117
|
+
:return: The no_data_conditions of this MetricAlarmSpec.
|
|
118
|
+
:rtype: list[:class:`huaweicloudsdkaom.v2.NoDataCondition`]
|
|
119
|
+
"""
|
|
120
|
+
return self._no_data_conditions
|
|
121
|
+
|
|
122
|
+
@no_data_conditions.setter
|
|
123
|
+
def no_data_conditions(self, no_data_conditions):
|
|
124
|
+
"""Sets the no_data_conditions of this MetricAlarmSpec.
|
|
125
|
+
|
|
126
|
+
无数据处理。
|
|
127
|
+
|
|
128
|
+
:param no_data_conditions: The no_data_conditions of this MetricAlarmSpec.
|
|
129
|
+
:type no_data_conditions: list[:class:`huaweicloudsdkaom.v2.NoDataCondition`]
|
|
130
|
+
"""
|
|
131
|
+
self._no_data_conditions = no_data_conditions
|
|
132
|
+
|
|
133
|
+
@property
|
|
134
|
+
def alarm_tags(self):
|
|
135
|
+
"""Gets the alarm_tags of this MetricAlarmSpec.
|
|
136
|
+
|
|
137
|
+
告警标签。
|
|
138
|
+
|
|
139
|
+
:return: The alarm_tags of this MetricAlarmSpec.
|
|
140
|
+
:rtype: list[:class:`huaweicloudsdkaom.v2.AlarmTags`]
|
|
141
|
+
"""
|
|
142
|
+
return self._alarm_tags
|
|
143
|
+
|
|
144
|
+
@alarm_tags.setter
|
|
145
|
+
def alarm_tags(self, alarm_tags):
|
|
146
|
+
"""Sets the alarm_tags of this MetricAlarmSpec.
|
|
147
|
+
|
|
148
|
+
告警标签。
|
|
149
|
+
|
|
150
|
+
:param alarm_tags: The alarm_tags of this MetricAlarmSpec.
|
|
151
|
+
:type alarm_tags: list[:class:`huaweicloudsdkaom.v2.AlarmTags`]
|
|
152
|
+
"""
|
|
153
|
+
self._alarm_tags = alarm_tags
|
|
154
|
+
|
|
155
|
+
@property
|
|
156
|
+
def monitor_objects(self):
|
|
157
|
+
"""Gets the monitor_objects of this MetricAlarmSpec.
|
|
158
|
+
|
|
159
|
+
监控对象列表。
|
|
160
|
+
|
|
161
|
+
:return: The monitor_objects of this MetricAlarmSpec.
|
|
162
|
+
:rtype: list[dict(str, str)]
|
|
163
|
+
"""
|
|
164
|
+
return self._monitor_objects
|
|
165
|
+
|
|
166
|
+
@monitor_objects.setter
|
|
167
|
+
def monitor_objects(self, monitor_objects):
|
|
168
|
+
"""Sets the monitor_objects of this MetricAlarmSpec.
|
|
169
|
+
|
|
170
|
+
监控对象列表。
|
|
171
|
+
|
|
172
|
+
:param monitor_objects: The monitor_objects of this MetricAlarmSpec.
|
|
173
|
+
:type monitor_objects: list[dict(str, str)]
|
|
174
|
+
"""
|
|
175
|
+
self._monitor_objects = monitor_objects
|
|
176
|
+
|
|
177
|
+
@property
|
|
178
|
+
def recovery_conditions(self):
|
|
179
|
+
"""Gets the recovery_conditions of this MetricAlarmSpec.
|
|
180
|
+
|
|
181
|
+
:return: The recovery_conditions of this MetricAlarmSpec.
|
|
182
|
+
:rtype: :class:`huaweicloudsdkaom.v2.RecoveryCondition`
|
|
183
|
+
"""
|
|
184
|
+
return self._recovery_conditions
|
|
185
|
+
|
|
186
|
+
@recovery_conditions.setter
|
|
187
|
+
def recovery_conditions(self, recovery_conditions):
|
|
188
|
+
"""Sets the recovery_conditions of this MetricAlarmSpec.
|
|
189
|
+
|
|
190
|
+
:param recovery_conditions: The recovery_conditions of this MetricAlarmSpec.
|
|
191
|
+
:type recovery_conditions: :class:`huaweicloudsdkaom.v2.RecoveryCondition`
|
|
192
|
+
"""
|
|
193
|
+
self._recovery_conditions = recovery_conditions
|
|
194
|
+
|
|
195
|
+
@property
|
|
196
|
+
def trigger_conditions(self):
|
|
197
|
+
"""Gets the trigger_conditions of this MetricAlarmSpec.
|
|
198
|
+
|
|
199
|
+
触发条件。
|
|
200
|
+
|
|
201
|
+
:return: The trigger_conditions of this MetricAlarmSpec.
|
|
202
|
+
:rtype: list[:class:`huaweicloudsdkaom.v2.TriggerCondition`]
|
|
203
|
+
"""
|
|
204
|
+
return self._trigger_conditions
|
|
205
|
+
|
|
206
|
+
@trigger_conditions.setter
|
|
207
|
+
def trigger_conditions(self, trigger_conditions):
|
|
208
|
+
"""Sets the trigger_conditions of this MetricAlarmSpec.
|
|
209
|
+
|
|
210
|
+
触发条件。
|
|
211
|
+
|
|
212
|
+
:param trigger_conditions: The trigger_conditions of this MetricAlarmSpec.
|
|
213
|
+
:type trigger_conditions: list[:class:`huaweicloudsdkaom.v2.TriggerCondition`]
|
|
214
|
+
"""
|
|
215
|
+
self._trigger_conditions = trigger_conditions
|
|
216
|
+
|
|
217
|
+
@property
|
|
218
|
+
def alarm_rule_template_bind_enable(self):
|
|
219
|
+
"""Gets the alarm_rule_template_bind_enable of this MetricAlarmSpec.
|
|
220
|
+
|
|
221
|
+
是否绑定告警规则模版(废弃)。
|
|
222
|
+
|
|
223
|
+
:return: The alarm_rule_template_bind_enable of this MetricAlarmSpec.
|
|
224
|
+
:rtype: bool
|
|
225
|
+
"""
|
|
226
|
+
return self._alarm_rule_template_bind_enable
|
|
227
|
+
|
|
228
|
+
@alarm_rule_template_bind_enable.setter
|
|
229
|
+
def alarm_rule_template_bind_enable(self, alarm_rule_template_bind_enable):
|
|
230
|
+
"""Sets the alarm_rule_template_bind_enable of this MetricAlarmSpec.
|
|
231
|
+
|
|
232
|
+
是否绑定告警规则模版(废弃)。
|
|
233
|
+
|
|
234
|
+
:param alarm_rule_template_bind_enable: The alarm_rule_template_bind_enable of this MetricAlarmSpec.
|
|
235
|
+
:type alarm_rule_template_bind_enable: bool
|
|
236
|
+
"""
|
|
237
|
+
self._alarm_rule_template_bind_enable = alarm_rule_template_bind_enable
|
|
238
|
+
|
|
239
|
+
@property
|
|
240
|
+
def alarm_rule_template_id(self):
|
|
241
|
+
"""Gets the alarm_rule_template_id of this MetricAlarmSpec.
|
|
242
|
+
|
|
243
|
+
告警规则模版id(废弃)。
|
|
244
|
+
|
|
245
|
+
:return: The alarm_rule_template_id of this MetricAlarmSpec.
|
|
246
|
+
:rtype: str
|
|
247
|
+
"""
|
|
248
|
+
return self._alarm_rule_template_id
|
|
249
|
+
|
|
250
|
+
@alarm_rule_template_id.setter
|
|
251
|
+
def alarm_rule_template_id(self, alarm_rule_template_id):
|
|
252
|
+
"""Sets the alarm_rule_template_id of this MetricAlarmSpec.
|
|
253
|
+
|
|
254
|
+
告警规则模版id(废弃)。
|
|
255
|
+
|
|
256
|
+
:param alarm_rule_template_id: The alarm_rule_template_id of this MetricAlarmSpec.
|
|
257
|
+
:type alarm_rule_template_id: str
|
|
258
|
+
"""
|
|
259
|
+
self._alarm_rule_template_id = alarm_rule_template_id
|
|
260
|
+
|
|
261
|
+
def to_dict(self):
|
|
262
|
+
"""Returns the model properties as a dict"""
|
|
263
|
+
result = {}
|
|
264
|
+
|
|
265
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
266
|
+
value = getattr(self, attr)
|
|
267
|
+
if isinstance(value, list):
|
|
268
|
+
result[attr] = list(map(
|
|
269
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
270
|
+
value
|
|
271
|
+
))
|
|
272
|
+
elif hasattr(value, "to_dict"):
|
|
273
|
+
result[attr] = value.to_dict()
|
|
274
|
+
elif isinstance(value, dict):
|
|
275
|
+
result[attr] = dict(map(
|
|
276
|
+
lambda item: (item[0], item[1].to_dict())
|
|
277
|
+
if hasattr(item[1], "to_dict") else item,
|
|
278
|
+
value.items()
|
|
279
|
+
))
|
|
280
|
+
else:
|
|
281
|
+
if attr in self.sensitive_list:
|
|
282
|
+
result[attr] = "****"
|
|
283
|
+
else:
|
|
284
|
+
result[attr] = value
|
|
285
|
+
|
|
286
|
+
return result
|
|
287
|
+
|
|
288
|
+
def to_str(self):
|
|
289
|
+
"""Returns the string representation of the model"""
|
|
290
|
+
import simplejson as json
|
|
291
|
+
if six.PY2:
|
|
292
|
+
import sys
|
|
293
|
+
reload(sys)
|
|
294
|
+
sys.setdefaultencoding("utf-8")
|
|
295
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
296
|
+
|
|
297
|
+
def __repr__(self):
|
|
298
|
+
"""For `print`"""
|
|
299
|
+
return self.to_str()
|
|
300
|
+
|
|
301
|
+
def __eq__(self, other):
|
|
302
|
+
"""Returns true if both objects are equal"""
|
|
303
|
+
if not isinstance(other, MetricAlarmSpec):
|
|
304
|
+
return False
|
|
305
|
+
|
|
306
|
+
return self.__dict__ == other.__dict__
|
|
307
|
+
|
|
308
|
+
def __ne__(self, other):
|
|
309
|
+
"""Returns true if both objects are not equal"""
|
|
310
|
+
return not self == other
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class NoDataCondition:
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
openapi_types (dict): The key is attribute name
|
|
13
|
+
and the value is attribute type.
|
|
14
|
+
attribute_map (dict): The key is attribute name
|
|
15
|
+
and the value is json key in definition.
|
|
16
|
+
"""
|
|
17
|
+
sensitive_list = []
|
|
18
|
+
|
|
19
|
+
openapi_types = {
|
|
20
|
+
'no_data_timeframe': 'int',
|
|
21
|
+
'no_data_alert_state': 'str',
|
|
22
|
+
'notify_no_data': 'bool'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
attribute_map = {
|
|
26
|
+
'no_data_timeframe': 'no_data_timeframe',
|
|
27
|
+
'no_data_alert_state': 'no_data_alert_state',
|
|
28
|
+
'notify_no_data': 'notify_no_data'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
def __init__(self, no_data_timeframe=None, no_data_alert_state=None, notify_no_data=None):
|
|
32
|
+
"""NoDataCondition
|
|
33
|
+
|
|
34
|
+
The model defined in huaweicloud sdk
|
|
35
|
+
|
|
36
|
+
:param no_data_timeframe: 无数据周期的个数。
|
|
37
|
+
:type no_data_timeframe: int
|
|
38
|
+
:param no_data_alert_state: 数据不足时,阈值规则的状态。 - “no_data”:数据不足并发送通知 - “alerting”:告警 - “ok”:正常 - “pre_state”:保持上一个状态
|
|
39
|
+
:type no_data_alert_state: str
|
|
40
|
+
:param notify_no_data: 数据不足是否通知。
|
|
41
|
+
:type notify_no_data: bool
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
self._no_data_timeframe = None
|
|
47
|
+
self._no_data_alert_state = None
|
|
48
|
+
self._notify_no_data = None
|
|
49
|
+
self.discriminator = None
|
|
50
|
+
|
|
51
|
+
if no_data_timeframe is not None:
|
|
52
|
+
self.no_data_timeframe = no_data_timeframe
|
|
53
|
+
if no_data_alert_state is not None:
|
|
54
|
+
self.no_data_alert_state = no_data_alert_state
|
|
55
|
+
if notify_no_data is not None:
|
|
56
|
+
self.notify_no_data = notify_no_data
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def no_data_timeframe(self):
|
|
60
|
+
"""Gets the no_data_timeframe of this NoDataCondition.
|
|
61
|
+
|
|
62
|
+
无数据周期的个数。
|
|
63
|
+
|
|
64
|
+
:return: The no_data_timeframe of this NoDataCondition.
|
|
65
|
+
:rtype: int
|
|
66
|
+
"""
|
|
67
|
+
return self._no_data_timeframe
|
|
68
|
+
|
|
69
|
+
@no_data_timeframe.setter
|
|
70
|
+
def no_data_timeframe(self, no_data_timeframe):
|
|
71
|
+
"""Sets the no_data_timeframe of this NoDataCondition.
|
|
72
|
+
|
|
73
|
+
无数据周期的个数。
|
|
74
|
+
|
|
75
|
+
:param no_data_timeframe: The no_data_timeframe of this NoDataCondition.
|
|
76
|
+
:type no_data_timeframe: int
|
|
77
|
+
"""
|
|
78
|
+
self._no_data_timeframe = no_data_timeframe
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def no_data_alert_state(self):
|
|
82
|
+
"""Gets the no_data_alert_state of this NoDataCondition.
|
|
83
|
+
|
|
84
|
+
数据不足时,阈值规则的状态。 - “no_data”:数据不足并发送通知 - “alerting”:告警 - “ok”:正常 - “pre_state”:保持上一个状态
|
|
85
|
+
|
|
86
|
+
:return: The no_data_alert_state of this NoDataCondition.
|
|
87
|
+
:rtype: str
|
|
88
|
+
"""
|
|
89
|
+
return self._no_data_alert_state
|
|
90
|
+
|
|
91
|
+
@no_data_alert_state.setter
|
|
92
|
+
def no_data_alert_state(self, no_data_alert_state):
|
|
93
|
+
"""Sets the no_data_alert_state of this NoDataCondition.
|
|
94
|
+
|
|
95
|
+
数据不足时,阈值规则的状态。 - “no_data”:数据不足并发送通知 - “alerting”:告警 - “ok”:正常 - “pre_state”:保持上一个状态
|
|
96
|
+
|
|
97
|
+
:param no_data_alert_state: The no_data_alert_state of this NoDataCondition.
|
|
98
|
+
:type no_data_alert_state: str
|
|
99
|
+
"""
|
|
100
|
+
self._no_data_alert_state = no_data_alert_state
|
|
101
|
+
|
|
102
|
+
@property
|
|
103
|
+
def notify_no_data(self):
|
|
104
|
+
"""Gets the notify_no_data of this NoDataCondition.
|
|
105
|
+
|
|
106
|
+
数据不足是否通知。
|
|
107
|
+
|
|
108
|
+
:return: The notify_no_data of this NoDataCondition.
|
|
109
|
+
:rtype: bool
|
|
110
|
+
"""
|
|
111
|
+
return self._notify_no_data
|
|
112
|
+
|
|
113
|
+
@notify_no_data.setter
|
|
114
|
+
def notify_no_data(self, notify_no_data):
|
|
115
|
+
"""Sets the notify_no_data of this NoDataCondition.
|
|
116
|
+
|
|
117
|
+
数据不足是否通知。
|
|
118
|
+
|
|
119
|
+
:param notify_no_data: The notify_no_data of this NoDataCondition.
|
|
120
|
+
:type notify_no_data: bool
|
|
121
|
+
"""
|
|
122
|
+
self._notify_no_data = notify_no_data
|
|
123
|
+
|
|
124
|
+
def to_dict(self):
|
|
125
|
+
"""Returns the model properties as a dict"""
|
|
126
|
+
result = {}
|
|
127
|
+
|
|
128
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
129
|
+
value = getattr(self, attr)
|
|
130
|
+
if isinstance(value, list):
|
|
131
|
+
result[attr] = list(map(
|
|
132
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
133
|
+
value
|
|
134
|
+
))
|
|
135
|
+
elif hasattr(value, "to_dict"):
|
|
136
|
+
result[attr] = value.to_dict()
|
|
137
|
+
elif isinstance(value, dict):
|
|
138
|
+
result[attr] = dict(map(
|
|
139
|
+
lambda item: (item[0], item[1].to_dict())
|
|
140
|
+
if hasattr(item[1], "to_dict") else item,
|
|
141
|
+
value.items()
|
|
142
|
+
))
|
|
143
|
+
else:
|
|
144
|
+
if attr in self.sensitive_list:
|
|
145
|
+
result[attr] = "****"
|
|
146
|
+
else:
|
|
147
|
+
result[attr] = value
|
|
148
|
+
|
|
149
|
+
return result
|
|
150
|
+
|
|
151
|
+
def to_str(self):
|
|
152
|
+
"""Returns the string representation of the model"""
|
|
153
|
+
import simplejson as json
|
|
154
|
+
if six.PY2:
|
|
155
|
+
import sys
|
|
156
|
+
reload(sys)
|
|
157
|
+
sys.setdefaultencoding("utf-8")
|
|
158
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
159
|
+
|
|
160
|
+
def __repr__(self):
|
|
161
|
+
"""For `print`"""
|
|
162
|
+
return self.to_str()
|
|
163
|
+
|
|
164
|
+
def __eq__(self, other):
|
|
165
|
+
"""Returns true if both objects are equal"""
|
|
166
|
+
if not isinstance(other, NoDataCondition):
|
|
167
|
+
return False
|
|
168
|
+
|
|
169
|
+
return self.__dict__ == other.__dict__
|
|
170
|
+
|
|
171
|
+
def __ne__(self, other):
|
|
172
|
+
"""Returns true if both objects are not equal"""
|
|
173
|
+
return not self == other
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class NodeInfo:
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
openapi_types (dict): The key is attribute name
|
|
13
|
+
and the value is attribute type.
|
|
14
|
+
attribute_map (dict): The key is attribute name
|
|
15
|
+
and the value is json key in definition.
|
|
16
|
+
"""
|
|
17
|
+
sensitive_list = []
|
|
18
|
+
|
|
19
|
+
openapi_types = {
|
|
20
|
+
'node_type': 'str',
|
|
21
|
+
'node_id': 'str'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'node_type': 'node_type',
|
|
26
|
+
'node_id': 'node_id'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def __init__(self, node_type=None, node_id=None):
|
|
30
|
+
"""NodeInfo
|
|
31
|
+
|
|
32
|
+
The model defined in huaweicloud sdk
|
|
33
|
+
|
|
34
|
+
:param node_type: 节点类型。
|
|
35
|
+
:type node_type: str
|
|
36
|
+
:param node_id: 节点id。
|
|
37
|
+
:type node_id: str
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
self._node_type = None
|
|
43
|
+
self._node_id = None
|
|
44
|
+
self.discriminator = None
|
|
45
|
+
|
|
46
|
+
if node_type is not None:
|
|
47
|
+
self.node_type = node_type
|
|
48
|
+
if node_id is not None:
|
|
49
|
+
self.node_id = node_id
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def node_type(self):
|
|
53
|
+
"""Gets the node_type of this NodeInfo.
|
|
54
|
+
|
|
55
|
+
节点类型。
|
|
56
|
+
|
|
57
|
+
:return: The node_type of this NodeInfo.
|
|
58
|
+
:rtype: str
|
|
59
|
+
"""
|
|
60
|
+
return self._node_type
|
|
61
|
+
|
|
62
|
+
@node_type.setter
|
|
63
|
+
def node_type(self, node_type):
|
|
64
|
+
"""Sets the node_type of this NodeInfo.
|
|
65
|
+
|
|
66
|
+
节点类型。
|
|
67
|
+
|
|
68
|
+
:param node_type: The node_type of this NodeInfo.
|
|
69
|
+
:type node_type: str
|
|
70
|
+
"""
|
|
71
|
+
self._node_type = node_type
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def node_id(self):
|
|
75
|
+
"""Gets the node_id of this NodeInfo.
|
|
76
|
+
|
|
77
|
+
节点id。
|
|
78
|
+
|
|
79
|
+
:return: The node_id of this NodeInfo.
|
|
80
|
+
:rtype: str
|
|
81
|
+
"""
|
|
82
|
+
return self._node_id
|
|
83
|
+
|
|
84
|
+
@node_id.setter
|
|
85
|
+
def node_id(self, node_id):
|
|
86
|
+
"""Sets the node_id of this NodeInfo.
|
|
87
|
+
|
|
88
|
+
节点id。
|
|
89
|
+
|
|
90
|
+
:param node_id: The node_id of this NodeInfo.
|
|
91
|
+
:type node_id: str
|
|
92
|
+
"""
|
|
93
|
+
self._node_id = node_id
|
|
94
|
+
|
|
95
|
+
def to_dict(self):
|
|
96
|
+
"""Returns the model properties as a dict"""
|
|
97
|
+
result = {}
|
|
98
|
+
|
|
99
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
100
|
+
value = getattr(self, attr)
|
|
101
|
+
if isinstance(value, list):
|
|
102
|
+
result[attr] = list(map(
|
|
103
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
104
|
+
value
|
|
105
|
+
))
|
|
106
|
+
elif hasattr(value, "to_dict"):
|
|
107
|
+
result[attr] = value.to_dict()
|
|
108
|
+
elif isinstance(value, dict):
|
|
109
|
+
result[attr] = dict(map(
|
|
110
|
+
lambda item: (item[0], item[1].to_dict())
|
|
111
|
+
if hasattr(item[1], "to_dict") else item,
|
|
112
|
+
value.items()
|
|
113
|
+
))
|
|
114
|
+
else:
|
|
115
|
+
if attr in self.sensitive_list:
|
|
116
|
+
result[attr] = "****"
|
|
117
|
+
else:
|
|
118
|
+
result[attr] = value
|
|
119
|
+
|
|
120
|
+
return result
|
|
121
|
+
|
|
122
|
+
def to_str(self):
|
|
123
|
+
"""Returns the string representation of the model"""
|
|
124
|
+
import simplejson as json
|
|
125
|
+
if six.PY2:
|
|
126
|
+
import sys
|
|
127
|
+
reload(sys)
|
|
128
|
+
sys.setdefaultencoding("utf-8")
|
|
129
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
130
|
+
|
|
131
|
+
def __repr__(self):
|
|
132
|
+
"""For `print`"""
|
|
133
|
+
return self.to_str()
|
|
134
|
+
|
|
135
|
+
def __eq__(self, other):
|
|
136
|
+
"""Returns true if both objects are equal"""
|
|
137
|
+
if not isinstance(other, NodeInfo):
|
|
138
|
+
return False
|
|
139
|
+
|
|
140
|
+
return self.__dict__ == other.__dict__
|
|
141
|
+
|
|
142
|
+
def __ne__(self, other):
|
|
143
|
+
"""Returns true if both objects are not equal"""
|
|
144
|
+
return not self == other
|