huaweicloudsdkaom 3.1.85__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.

Files changed (69) hide show
  1. huaweicloudsdkaom/v1/region/aom_region.py +9 -0
  2. huaweicloudsdkaom/v2/__init__.py +23 -0
  3. huaweicloudsdkaom/v2/aom_async_client.py +255 -24
  4. huaweicloudsdkaom/v2/aom_client.py +255 -24
  5. huaweicloudsdkaom/v2/model/__init__.py +23 -0
  6. huaweicloudsdkaom/v2/model/add_or_update_alarm_rule_v4_item_result.py +142 -0
  7. huaweicloudsdkaom/v2/model/add_or_update_alarm_rule_v4_request_body.py +304 -0
  8. huaweicloudsdkaom/v2/model/add_or_update_metric_or_event_alarm_rule_request.py +168 -0
  9. huaweicloudsdkaom/v2/model/add_or_update_metric_or_event_alarm_rule_response.py +174 -0
  10. huaweicloudsdkaom/v2/model/alarm_notification.py +315 -0
  11. huaweicloudsdkaom/v2/model/alarm_param_for_v4_db.py +470 -0
  12. huaweicloudsdkaom/v2/model/alarm_tags.py +173 -0
  13. huaweicloudsdkaom/v2/model/cmdb_info.py +144 -0
  14. huaweicloudsdkaom/v2/model/count_events_response.py +32 -3
  15. huaweicloudsdkaom/v2/model/delete_alarm_rule_v4_request_body.py +114 -0
  16. huaweicloudsdkaom/v2/model/delete_metric_or_event_alarm_rule_request.py +111 -0
  17. huaweicloudsdkaom/v2/model/delete_metric_or_event_alarm_rule_response.py +174 -0
  18. huaweicloudsdkaom/v2/model/delete_prom_instance_request.py +31 -3
  19. huaweicloudsdkaom/v2/model/event_alarm_spec.py +260 -0
  20. huaweicloudsdkaom/v2/model/event_trigger_condition.py +260 -0
  21. huaweicloudsdkaom/v2/model/item_result.py +114 -0
  22. huaweicloudsdkaom/v2/model/list_agents_request.py +6 -6
  23. huaweicloudsdkaom/v2/model/list_event_model.py +405 -0
  24. huaweicloudsdkaom/v2/model/list_events_request.py +88 -1
  25. huaweicloudsdkaom/v2/model/list_events_response.py +31 -6
  26. huaweicloudsdkaom/v2/model/list_metric_or_event_alarm_rule_request.py +434 -0
  27. huaweicloudsdkaom/v2/model/list_metric_or_event_alarm_rule_response.py +174 -0
  28. huaweicloudsdkaom/v2/model/list_prom_instance_request.py +31 -3
  29. huaweicloudsdkaom/v2/model/metric_alarm_spec.py +310 -0
  30. huaweicloudsdkaom/v2/model/no_data_condition.py +173 -0
  31. huaweicloudsdkaom/v2/model/node_info.py +144 -0
  32. huaweicloudsdkaom/v2/model/page_info.py +170 -0
  33. huaweicloudsdkaom/v2/model/push_events_request.py +18 -18
  34. huaweicloudsdkaom/v2/model/recovery_condition.py +115 -0
  35. huaweicloudsdkaom/v2/model/smn_info.py +4 -4
  36. huaweicloudsdkaom/v2/model/trigger_condition.py +742 -0
  37. huaweicloudsdkaom/v2/region/aom_region.py +9 -0
  38. huaweicloudsdkaom/v3/aom_async_client.py +19 -19
  39. huaweicloudsdkaom/v3/aom_client.py +19 -19
  40. huaweicloudsdkaom/v3/model/biz_app_param.py +12 -12
  41. huaweicloudsdkaom/v3/model/component_param.py +3 -3
  42. huaweicloudsdkaom/v3/model/env_param.py +6 -6
  43. huaweicloudsdkaom/v3/model/sub_app_create_param.py +15 -15
  44. huaweicloudsdkaom/v3/model/sub_app_update_param.py +9 -9
  45. huaweicloudsdkaom/v3/region/aom_region.py +9 -0
  46. huaweicloudsdkaom/v4/__init__.py +21 -0
  47. huaweicloudsdkaom/v4/aom_async_client.py +279 -0
  48. huaweicloudsdkaom/v4/aom_client.py +276 -0
  49. huaweicloudsdkaom/v4/model/__init__.py +18 -0
  50. huaweicloudsdkaom/v4/model/agent_batch_import_param_new.py +280 -0
  51. huaweicloudsdkaom/v4/model/agent_import_param_new.py +313 -0
  52. huaweicloudsdkaom/v4/model/agent_info_param.py +231 -0
  53. huaweicloudsdkaom/v4/model/agent_info_result.py +463 -0
  54. huaweicloudsdkaom/v4/model/agent_upgrade_param.py +142 -0
  55. huaweicloudsdkaom/v4/model/batch_import_agent_request.py +139 -0
  56. huaweicloudsdkaom/v4/model/batch_import_agent_response.py +116 -0
  57. huaweicloudsdkaom/v4/model/batch_update_agent_request.py +111 -0
  58. huaweicloudsdkaom/v4/model/batch_update_agent_response.py +116 -0
  59. huaweicloudsdkaom/v4/model/plugin_install_basic_param.py +173 -0
  60. huaweicloudsdkaom/v4/model/show_agent_infos_request.py +111 -0
  61. huaweicloudsdkaom/v4/model/show_agent_infos_response.py +203 -0
  62. huaweicloudsdkaom/v4/model/single_agent_param.py +142 -0
  63. huaweicloudsdkaom/v4/region/__init__.py +0 -0
  64. huaweicloudsdkaom/v4/region/aom_region.py +100 -0
  65. {huaweicloudsdkaom-3.1.85.dist-info → huaweicloudsdkaom-3.1.132.dist-info}/METADATA +2 -2
  66. {huaweicloudsdkaom-3.1.85.dist-info → huaweicloudsdkaom-3.1.132.dist-info}/RECORD +69 -27
  67. {huaweicloudsdkaom-3.1.85.dist-info → huaweicloudsdkaom-3.1.132.dist-info}/WHEEL +1 -1
  68. {huaweicloudsdkaom-3.1.85.dist-info → huaweicloudsdkaom-3.1.132.dist-info}/LICENSE +0 -0
  69. {huaweicloudsdkaom-3.1.85.dist-info → huaweicloudsdkaom-3.1.132.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,260 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class EventAlarmSpec:
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
+ 'alarm_source': 'str',
21
+ 'event_source': 'str',
22
+ 'monitor_objects': 'list[dict(str, str)]',
23
+ 'trigger_conditions': 'list[EventTriggerCondition]',
24
+ 'alarm_rule_template_bind_enable': 'bool',
25
+ 'alarm_rule_template_id': 'str'
26
+ }
27
+
28
+ attribute_map = {
29
+ 'alarm_source': 'alarm_source',
30
+ 'event_source': 'event_source',
31
+ 'monitor_objects': 'monitor_objects',
32
+ 'trigger_conditions': 'trigger_conditions',
33
+ 'alarm_rule_template_bind_enable': 'alarm_rule_template_bind_enable',
34
+ 'alarm_rule_template_id': 'alarm_rule_template_id'
35
+ }
36
+
37
+ def __init__(self, alarm_source=None, event_source=None, monitor_objects=None, trigger_conditions=None, alarm_rule_template_bind_enable=None, alarm_rule_template_id=None):
38
+ """EventAlarmSpec
39
+
40
+ The model defined in huaweicloud sdk
41
+
42
+ :param alarm_source: 告警规则来源。 - “systemEvent”:系统事件 - “customEvent”:自定义事件
43
+ :type alarm_source: str
44
+ :param event_source: 告警来源。 - “RDS” - “EVS” - “CCE” - “LTS” - “AOM”
45
+ :type event_source: str
46
+ :param monitor_objects: 监控对象列表。键值对形式,键值为: - “event_type”:通知类型 - “event_severity”:告警级别 - “event_name”:事件名称 - “namespace”:命名空间 - “clusterId”:集群id - “customField”:用户自定义字段
47
+ :type monitor_objects: list[dict(str, str)]
48
+ :param trigger_conditions: 触发条件。
49
+ :type trigger_conditions: list[:class:`huaweicloudsdkaom.v2.EventTriggerCondition`]
50
+ :param alarm_rule_template_bind_enable: 是否绑定告警规则模版(废弃)。
51
+ :type alarm_rule_template_bind_enable: bool
52
+ :param alarm_rule_template_id: 告警规则模版id(废弃)。
53
+ :type alarm_rule_template_id: str
54
+ """
55
+
56
+
57
+
58
+ self._alarm_source = None
59
+ self._event_source = None
60
+ self._monitor_objects = None
61
+ self._trigger_conditions = None
62
+ self._alarm_rule_template_bind_enable = None
63
+ self._alarm_rule_template_id = None
64
+ self.discriminator = None
65
+
66
+ if alarm_source is not None:
67
+ self.alarm_source = alarm_source
68
+ if event_source is not None:
69
+ self.event_source = event_source
70
+ if monitor_objects is not None:
71
+ self.monitor_objects = monitor_objects
72
+ if trigger_conditions is not None:
73
+ self.trigger_conditions = trigger_conditions
74
+ if alarm_rule_template_bind_enable is not None:
75
+ self.alarm_rule_template_bind_enable = alarm_rule_template_bind_enable
76
+ if alarm_rule_template_id is not None:
77
+ self.alarm_rule_template_id = alarm_rule_template_id
78
+
79
+ @property
80
+ def alarm_source(self):
81
+ """Gets the alarm_source of this EventAlarmSpec.
82
+
83
+ 告警规则来源。 - “systemEvent”:系统事件 - “customEvent”:自定义事件
84
+
85
+ :return: The alarm_source of this EventAlarmSpec.
86
+ :rtype: str
87
+ """
88
+ return self._alarm_source
89
+
90
+ @alarm_source.setter
91
+ def alarm_source(self, alarm_source):
92
+ """Sets the alarm_source of this EventAlarmSpec.
93
+
94
+ 告警规则来源。 - “systemEvent”:系统事件 - “customEvent”:自定义事件
95
+
96
+ :param alarm_source: The alarm_source of this EventAlarmSpec.
97
+ :type alarm_source: str
98
+ """
99
+ self._alarm_source = alarm_source
100
+
101
+ @property
102
+ def event_source(self):
103
+ """Gets the event_source of this EventAlarmSpec.
104
+
105
+ 告警来源。 - “RDS” - “EVS” - “CCE” - “LTS” - “AOM”
106
+
107
+ :return: The event_source of this EventAlarmSpec.
108
+ :rtype: str
109
+ """
110
+ return self._event_source
111
+
112
+ @event_source.setter
113
+ def event_source(self, event_source):
114
+ """Sets the event_source of this EventAlarmSpec.
115
+
116
+ 告警来源。 - “RDS” - “EVS” - “CCE” - “LTS” - “AOM”
117
+
118
+ :param event_source: The event_source of this EventAlarmSpec.
119
+ :type event_source: str
120
+ """
121
+ self._event_source = event_source
122
+
123
+ @property
124
+ def monitor_objects(self):
125
+ """Gets the monitor_objects of this EventAlarmSpec.
126
+
127
+ 监控对象列表。键值对形式,键值为: - “event_type”:通知类型 - “event_severity”:告警级别 - “event_name”:事件名称 - “namespace”:命名空间 - “clusterId”:集群id - “customField”:用户自定义字段
128
+
129
+ :return: The monitor_objects of this EventAlarmSpec.
130
+ :rtype: list[dict(str, str)]
131
+ """
132
+ return self._monitor_objects
133
+
134
+ @monitor_objects.setter
135
+ def monitor_objects(self, monitor_objects):
136
+ """Sets the monitor_objects of this EventAlarmSpec.
137
+
138
+ 监控对象列表。键值对形式,键值为: - “event_type”:通知类型 - “event_severity”:告警级别 - “event_name”:事件名称 - “namespace”:命名空间 - “clusterId”:集群id - “customField”:用户自定义字段
139
+
140
+ :param monitor_objects: The monitor_objects of this EventAlarmSpec.
141
+ :type monitor_objects: list[dict(str, str)]
142
+ """
143
+ self._monitor_objects = monitor_objects
144
+
145
+ @property
146
+ def trigger_conditions(self):
147
+ """Gets the trigger_conditions of this EventAlarmSpec.
148
+
149
+ 触发条件。
150
+
151
+ :return: The trigger_conditions of this EventAlarmSpec.
152
+ :rtype: list[:class:`huaweicloudsdkaom.v2.EventTriggerCondition`]
153
+ """
154
+ return self._trigger_conditions
155
+
156
+ @trigger_conditions.setter
157
+ def trigger_conditions(self, trigger_conditions):
158
+ """Sets the trigger_conditions of this EventAlarmSpec.
159
+
160
+ 触发条件。
161
+
162
+ :param trigger_conditions: The trigger_conditions of this EventAlarmSpec.
163
+ :type trigger_conditions: list[:class:`huaweicloudsdkaom.v2.EventTriggerCondition`]
164
+ """
165
+ self._trigger_conditions = trigger_conditions
166
+
167
+ @property
168
+ def alarm_rule_template_bind_enable(self):
169
+ """Gets the alarm_rule_template_bind_enable of this EventAlarmSpec.
170
+
171
+ 是否绑定告警规则模版(废弃)。
172
+
173
+ :return: The alarm_rule_template_bind_enable of this EventAlarmSpec.
174
+ :rtype: bool
175
+ """
176
+ return self._alarm_rule_template_bind_enable
177
+
178
+ @alarm_rule_template_bind_enable.setter
179
+ def alarm_rule_template_bind_enable(self, alarm_rule_template_bind_enable):
180
+ """Sets the alarm_rule_template_bind_enable of this EventAlarmSpec.
181
+
182
+ 是否绑定告警规则模版(废弃)。
183
+
184
+ :param alarm_rule_template_bind_enable: The alarm_rule_template_bind_enable of this EventAlarmSpec.
185
+ :type alarm_rule_template_bind_enable: bool
186
+ """
187
+ self._alarm_rule_template_bind_enable = alarm_rule_template_bind_enable
188
+
189
+ @property
190
+ def alarm_rule_template_id(self):
191
+ """Gets the alarm_rule_template_id of this EventAlarmSpec.
192
+
193
+ 告警规则模版id(废弃)。
194
+
195
+ :return: The alarm_rule_template_id of this EventAlarmSpec.
196
+ :rtype: str
197
+ """
198
+ return self._alarm_rule_template_id
199
+
200
+ @alarm_rule_template_id.setter
201
+ def alarm_rule_template_id(self, alarm_rule_template_id):
202
+ """Sets the alarm_rule_template_id of this EventAlarmSpec.
203
+
204
+ 告警规则模版id(废弃)。
205
+
206
+ :param alarm_rule_template_id: The alarm_rule_template_id of this EventAlarmSpec.
207
+ :type alarm_rule_template_id: str
208
+ """
209
+ self._alarm_rule_template_id = alarm_rule_template_id
210
+
211
+ def to_dict(self):
212
+ """Returns the model properties as a dict"""
213
+ result = {}
214
+
215
+ for attr, _ in six.iteritems(self.openapi_types):
216
+ value = getattr(self, attr)
217
+ if isinstance(value, list):
218
+ result[attr] = list(map(
219
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
220
+ value
221
+ ))
222
+ elif hasattr(value, "to_dict"):
223
+ result[attr] = value.to_dict()
224
+ elif isinstance(value, dict):
225
+ result[attr] = dict(map(
226
+ lambda item: (item[0], item[1].to_dict())
227
+ if hasattr(item[1], "to_dict") else item,
228
+ value.items()
229
+ ))
230
+ else:
231
+ if attr in self.sensitive_list:
232
+ result[attr] = "****"
233
+ else:
234
+ result[attr] = value
235
+
236
+ return result
237
+
238
+ def to_str(self):
239
+ """Returns the string representation of the model"""
240
+ import simplejson as json
241
+ if six.PY2:
242
+ import sys
243
+ reload(sys)
244
+ sys.setdefaultencoding("utf-8")
245
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
246
+
247
+ def __repr__(self):
248
+ """For `print`"""
249
+ return self.to_str()
250
+
251
+ def __eq__(self, other):
252
+ """Returns true if both objects are equal"""
253
+ if not isinstance(other, EventAlarmSpec):
254
+ return False
255
+
256
+ return self.__dict__ == other.__dict__
257
+
258
+ def __ne__(self, other):
259
+ """Returns true if both objects are not equal"""
260
+ return not self == other
@@ -0,0 +1,260 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class EventTriggerCondition:
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
+ 'event_name': 'str',
21
+ 'trigger_type': 'str',
22
+ 'aggregation_window': 'int',
23
+ 'operator': 'str',
24
+ 'thresholds': 'dict(str, int)',
25
+ 'frequency': 'str'
26
+ }
27
+
28
+ attribute_map = {
29
+ 'event_name': 'event_name',
30
+ 'trigger_type': 'trigger_type',
31
+ 'aggregation_window': 'aggregation_window',
32
+ 'operator': 'operator',
33
+ 'thresholds': 'thresholds',
34
+ 'frequency': 'frequency'
35
+ }
36
+
37
+ def __init__(self, event_name=None, trigger_type=None, aggregation_window=None, operator=None, thresholds=None, frequency=None):
38
+ """EventTriggerCondition
39
+
40
+ The model defined in huaweicloud sdk
41
+
42
+ :param event_name: 事件名称。
43
+ :type event_name: str
44
+ :param trigger_type: 触发方式: - “immediately”:立即触发 - “accumulative”:累计触发
45
+ :type trigger_type: str
46
+ :param aggregation_window: 统计周期。单位为秒,例如 1小时 填“3600”,当trigger_type为“immediately”时 不填。
47
+ :type aggregation_window: int
48
+ :param operator: 判断条件:“>”,“<”,“=”,“>=”,“<=”,当trigger_type为“immediately”时 不填。
49
+ :type operator: str
50
+ :param thresholds: 键值对形式,键为告警级别,值为累计次数,当trigger_type为“immediately”时 值为空。
51
+ :type thresholds: dict(str, int)
52
+ :param frequency: 事件类告警频率。当trigger_type为“immediately”时 不填。 - “0”:只告警一次 - “300”:每5分钟 - “600”:每10分钟: - “900”:每15分钟: - “1800”:每30分钟: - “3600”:每1小时: - “10800”:每3小时: - “21600”:每6小时: - “43200”:每12小时: - “86400”:每天:
53
+ :type frequency: str
54
+ """
55
+
56
+
57
+
58
+ self._event_name = None
59
+ self._trigger_type = None
60
+ self._aggregation_window = None
61
+ self._operator = None
62
+ self._thresholds = None
63
+ self._frequency = None
64
+ self.discriminator = None
65
+
66
+ if event_name is not None:
67
+ self.event_name = event_name
68
+ if trigger_type is not None:
69
+ self.trigger_type = trigger_type
70
+ if aggregation_window is not None:
71
+ self.aggregation_window = aggregation_window
72
+ if operator is not None:
73
+ self.operator = operator
74
+ if thresholds is not None:
75
+ self.thresholds = thresholds
76
+ if frequency is not None:
77
+ self.frequency = frequency
78
+
79
+ @property
80
+ def event_name(self):
81
+ """Gets the event_name of this EventTriggerCondition.
82
+
83
+ 事件名称。
84
+
85
+ :return: The event_name of this EventTriggerCondition.
86
+ :rtype: str
87
+ """
88
+ return self._event_name
89
+
90
+ @event_name.setter
91
+ def event_name(self, event_name):
92
+ """Sets the event_name of this EventTriggerCondition.
93
+
94
+ 事件名称。
95
+
96
+ :param event_name: The event_name of this EventTriggerCondition.
97
+ :type event_name: str
98
+ """
99
+ self._event_name = event_name
100
+
101
+ @property
102
+ def trigger_type(self):
103
+ """Gets the trigger_type of this EventTriggerCondition.
104
+
105
+ 触发方式: - “immediately”:立即触发 - “accumulative”:累计触发
106
+
107
+ :return: The trigger_type of this EventTriggerCondition.
108
+ :rtype: str
109
+ """
110
+ return self._trigger_type
111
+
112
+ @trigger_type.setter
113
+ def trigger_type(self, trigger_type):
114
+ """Sets the trigger_type of this EventTriggerCondition.
115
+
116
+ 触发方式: - “immediately”:立即触发 - “accumulative”:累计触发
117
+
118
+ :param trigger_type: The trigger_type of this EventTriggerCondition.
119
+ :type trigger_type: str
120
+ """
121
+ self._trigger_type = trigger_type
122
+
123
+ @property
124
+ def aggregation_window(self):
125
+ """Gets the aggregation_window of this EventTriggerCondition.
126
+
127
+ 统计周期。单位为秒,例如 1小时 填“3600”,当trigger_type为“immediately”时 不填。
128
+
129
+ :return: The aggregation_window of this EventTriggerCondition.
130
+ :rtype: int
131
+ """
132
+ return self._aggregation_window
133
+
134
+ @aggregation_window.setter
135
+ def aggregation_window(self, aggregation_window):
136
+ """Sets the aggregation_window of this EventTriggerCondition.
137
+
138
+ 统计周期。单位为秒,例如 1小时 填“3600”,当trigger_type为“immediately”时 不填。
139
+
140
+ :param aggregation_window: The aggregation_window of this EventTriggerCondition.
141
+ :type aggregation_window: int
142
+ """
143
+ self._aggregation_window = aggregation_window
144
+
145
+ @property
146
+ def operator(self):
147
+ """Gets the operator of this EventTriggerCondition.
148
+
149
+ 判断条件:“>”,“<”,“=”,“>=”,“<=”,当trigger_type为“immediately”时 不填。
150
+
151
+ :return: The operator of this EventTriggerCondition.
152
+ :rtype: str
153
+ """
154
+ return self._operator
155
+
156
+ @operator.setter
157
+ def operator(self, operator):
158
+ """Sets the operator of this EventTriggerCondition.
159
+
160
+ 判断条件:“>”,“<”,“=”,“>=”,“<=”,当trigger_type为“immediately”时 不填。
161
+
162
+ :param operator: The operator of this EventTriggerCondition.
163
+ :type operator: str
164
+ """
165
+ self._operator = operator
166
+
167
+ @property
168
+ def thresholds(self):
169
+ """Gets the thresholds of this EventTriggerCondition.
170
+
171
+ 键值对形式,键为告警级别,值为累计次数,当trigger_type为“immediately”时 值为空。
172
+
173
+ :return: The thresholds of this EventTriggerCondition.
174
+ :rtype: dict(str, int)
175
+ """
176
+ return self._thresholds
177
+
178
+ @thresholds.setter
179
+ def thresholds(self, thresholds):
180
+ """Sets the thresholds of this EventTriggerCondition.
181
+
182
+ 键值对形式,键为告警级别,值为累计次数,当trigger_type为“immediately”时 值为空。
183
+
184
+ :param thresholds: The thresholds of this EventTriggerCondition.
185
+ :type thresholds: dict(str, int)
186
+ """
187
+ self._thresholds = thresholds
188
+
189
+ @property
190
+ def frequency(self):
191
+ """Gets the frequency of this EventTriggerCondition.
192
+
193
+ 事件类告警频率。当trigger_type为“immediately”时 不填。 - “0”:只告警一次 - “300”:每5分钟 - “600”:每10分钟: - “900”:每15分钟: - “1800”:每30分钟: - “3600”:每1小时: - “10800”:每3小时: - “21600”:每6小时: - “43200”:每12小时: - “86400”:每天:
194
+
195
+ :return: The frequency of this EventTriggerCondition.
196
+ :rtype: str
197
+ """
198
+ return self._frequency
199
+
200
+ @frequency.setter
201
+ def frequency(self, frequency):
202
+ """Sets the frequency of this EventTriggerCondition.
203
+
204
+ 事件类告警频率。当trigger_type为“immediately”时 不填。 - “0”:只告警一次 - “300”:每5分钟 - “600”:每10分钟: - “900”:每15分钟: - “1800”:每30分钟: - “3600”:每1小时: - “10800”:每3小时: - “21600”:每6小时: - “43200”:每12小时: - “86400”:每天:
205
+
206
+ :param frequency: The frequency of this EventTriggerCondition.
207
+ :type frequency: str
208
+ """
209
+ self._frequency = frequency
210
+
211
+ def to_dict(self):
212
+ """Returns the model properties as a dict"""
213
+ result = {}
214
+
215
+ for attr, _ in six.iteritems(self.openapi_types):
216
+ value = getattr(self, attr)
217
+ if isinstance(value, list):
218
+ result[attr] = list(map(
219
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
220
+ value
221
+ ))
222
+ elif hasattr(value, "to_dict"):
223
+ result[attr] = value.to_dict()
224
+ elif isinstance(value, dict):
225
+ result[attr] = dict(map(
226
+ lambda item: (item[0], item[1].to_dict())
227
+ if hasattr(item[1], "to_dict") else item,
228
+ value.items()
229
+ ))
230
+ else:
231
+ if attr in self.sensitive_list:
232
+ result[attr] = "****"
233
+ else:
234
+ result[attr] = value
235
+
236
+ return result
237
+
238
+ def to_str(self):
239
+ """Returns the string representation of the model"""
240
+ import simplejson as json
241
+ if six.PY2:
242
+ import sys
243
+ reload(sys)
244
+ sys.setdefaultencoding("utf-8")
245
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
246
+
247
+ def __repr__(self):
248
+ """For `print`"""
249
+ return self.to_str()
250
+
251
+ def __eq__(self, other):
252
+ """Returns true if both objects are equal"""
253
+ if not isinstance(other, EventTriggerCondition):
254
+ return False
255
+
256
+ return self.__dict__ == other.__dict__
257
+
258
+ def __ne__(self, other):
259
+ """Returns true if both objects are not equal"""
260
+ return not self == other
@@ -0,0 +1,114 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class ItemResult:
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
+ 'alarm_rule_name': 'str'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'alarm_rule_name': 'alarm_rule_name'
25
+ }
26
+
27
+ def __init__(self, alarm_rule_name=None):
28
+ """ItemResult
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param alarm_rule_name: 告警规则名称。
33
+ :type alarm_rule_name: str
34
+ """
35
+
36
+
37
+
38
+ self._alarm_rule_name = None
39
+ self.discriminator = None
40
+
41
+ self.alarm_rule_name = alarm_rule_name
42
+
43
+ @property
44
+ def alarm_rule_name(self):
45
+ """Gets the alarm_rule_name of this ItemResult.
46
+
47
+ 告警规则名称。
48
+
49
+ :return: The alarm_rule_name of this ItemResult.
50
+ :rtype: str
51
+ """
52
+ return self._alarm_rule_name
53
+
54
+ @alarm_rule_name.setter
55
+ def alarm_rule_name(self, alarm_rule_name):
56
+ """Sets the alarm_rule_name of this ItemResult.
57
+
58
+ 告警规则名称。
59
+
60
+ :param alarm_rule_name: The alarm_rule_name of this ItemResult.
61
+ :type alarm_rule_name: str
62
+ """
63
+ self._alarm_rule_name = alarm_rule_name
64
+
65
+ def to_dict(self):
66
+ """Returns the model properties as a dict"""
67
+ result = {}
68
+
69
+ for attr, _ in six.iteritems(self.openapi_types):
70
+ value = getattr(self, attr)
71
+ if isinstance(value, list):
72
+ result[attr] = list(map(
73
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
74
+ value
75
+ ))
76
+ elif hasattr(value, "to_dict"):
77
+ result[attr] = value.to_dict()
78
+ elif isinstance(value, dict):
79
+ result[attr] = dict(map(
80
+ lambda item: (item[0], item[1].to_dict())
81
+ if hasattr(item[1], "to_dict") else item,
82
+ value.items()
83
+ ))
84
+ else:
85
+ if attr in self.sensitive_list:
86
+ result[attr] = "****"
87
+ else:
88
+ result[attr] = value
89
+
90
+ return result
91
+
92
+ def to_str(self):
93
+ """Returns the string representation of the model"""
94
+ import simplejson as json
95
+ if six.PY2:
96
+ import sys
97
+ reload(sys)
98
+ sys.setdefaultencoding("utf-8")
99
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
100
+
101
+ def __repr__(self):
102
+ """For `print`"""
103
+ return self.to_str()
104
+
105
+ def __eq__(self, other):
106
+ """Returns true if both objects are equal"""
107
+ if not isinstance(other, ItemResult):
108
+ return False
109
+
110
+ return self.__dict__ == other.__dict__
111
+
112
+ def __ne__(self, other):
113
+ """Returns true if both objects are not equal"""
114
+ return not self == other
@@ -31,9 +31,9 @@ class ListAgentsRequest:
31
31
 
32
32
  The model defined in huaweicloud sdk
33
33
 
34
- :param cluster_id: - 查询集群主机时,填写集群id。 - 查询用户自定义主机时,填写“apm”。
34
+ :param cluster_id: - 查询集群主机时,填写集群id。 - 查询用户自定义主机时,填写“APM”。
35
35
  :type cluster_id: str
36
- :param namespace: - 查询集群主机时,填写命名空间。 - 查询用户自定义主机时,填写“apm”。
36
+ :param namespace: - 查询集群主机时,填写命名空间。 - 查询用户自定义主机时,填写“APM”。
37
37
  :type namespace: str
38
38
  """
39
39
 
@@ -50,7 +50,7 @@ class ListAgentsRequest:
50
50
  def cluster_id(self):
51
51
  """Gets the cluster_id of this ListAgentsRequest.
52
52
 
53
- - 查询集群主机时,填写集群id。 - 查询用户自定义主机时,填写“apm”。
53
+ - 查询集群主机时,填写集群id。 - 查询用户自定义主机时,填写“APM”。
54
54
 
55
55
  :return: The cluster_id of this ListAgentsRequest.
56
56
  :rtype: str
@@ -61,7 +61,7 @@ class ListAgentsRequest:
61
61
  def cluster_id(self, cluster_id):
62
62
  """Sets the cluster_id of this ListAgentsRequest.
63
63
 
64
- - 查询集群主机时,填写集群id。 - 查询用户自定义主机时,填写“apm”。
64
+ - 查询集群主机时,填写集群id。 - 查询用户自定义主机时,填写“APM”。
65
65
 
66
66
  :param cluster_id: The cluster_id of this ListAgentsRequest.
67
67
  :type cluster_id: str
@@ -72,7 +72,7 @@ class ListAgentsRequest:
72
72
  def namespace(self):
73
73
  """Gets the namespace of this ListAgentsRequest.
74
74
 
75
- - 查询集群主机时,填写命名空间。 - 查询用户自定义主机时,填写“apm”。
75
+ - 查询集群主机时,填写命名空间。 - 查询用户自定义主机时,填写“APM”。
76
76
 
77
77
  :return: The namespace of this ListAgentsRequest.
78
78
  :rtype: str
@@ -83,7 +83,7 @@ class ListAgentsRequest:
83
83
  def namespace(self, namespace):
84
84
  """Sets the namespace of this ListAgentsRequest.
85
85
 
86
- - 查询集群主机时,填写命名空间。 - 查询用户自定义主机时,填写“apm”。
86
+ - 查询集群主机时,填写命名空间。 - 查询用户自定义主机时,填写“APM”。
87
87
 
88
88
  :param namespace: The namespace of this ListAgentsRequest.
89
89
  :type namespace: str