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,142 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class AddOrUpdateAlarmRuleV4ItemResult:
|
|
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
|
+
'result': 'str'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'alarm_rule_name': 'alarm_rule_name',
|
|
26
|
+
'result': 'result'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def __init__(self, alarm_rule_name=None, result=None):
|
|
30
|
+
"""AddOrUpdateAlarmRuleV4ItemResult
|
|
31
|
+
|
|
32
|
+
The model defined in huaweicloud sdk
|
|
33
|
+
|
|
34
|
+
:param alarm_rule_name: 告警规则名称。
|
|
35
|
+
:type alarm_rule_name: str
|
|
36
|
+
:param result: 告警规则新增或修改结果。
|
|
37
|
+
:type result: str
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
self._alarm_rule_name = None
|
|
43
|
+
self._result = None
|
|
44
|
+
self.discriminator = None
|
|
45
|
+
|
|
46
|
+
self.alarm_rule_name = alarm_rule_name
|
|
47
|
+
self.result = result
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def alarm_rule_name(self):
|
|
51
|
+
"""Gets the alarm_rule_name of this AddOrUpdateAlarmRuleV4ItemResult.
|
|
52
|
+
|
|
53
|
+
告警规则名称。
|
|
54
|
+
|
|
55
|
+
:return: The alarm_rule_name of this AddOrUpdateAlarmRuleV4ItemResult.
|
|
56
|
+
:rtype: str
|
|
57
|
+
"""
|
|
58
|
+
return self._alarm_rule_name
|
|
59
|
+
|
|
60
|
+
@alarm_rule_name.setter
|
|
61
|
+
def alarm_rule_name(self, alarm_rule_name):
|
|
62
|
+
"""Sets the alarm_rule_name of this AddOrUpdateAlarmRuleV4ItemResult.
|
|
63
|
+
|
|
64
|
+
告警规则名称。
|
|
65
|
+
|
|
66
|
+
:param alarm_rule_name: The alarm_rule_name of this AddOrUpdateAlarmRuleV4ItemResult.
|
|
67
|
+
:type alarm_rule_name: str
|
|
68
|
+
"""
|
|
69
|
+
self._alarm_rule_name = alarm_rule_name
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def result(self):
|
|
73
|
+
"""Gets the result of this AddOrUpdateAlarmRuleV4ItemResult.
|
|
74
|
+
|
|
75
|
+
告警规则新增或修改结果。
|
|
76
|
+
|
|
77
|
+
:return: The result of this AddOrUpdateAlarmRuleV4ItemResult.
|
|
78
|
+
:rtype: str
|
|
79
|
+
"""
|
|
80
|
+
return self._result
|
|
81
|
+
|
|
82
|
+
@result.setter
|
|
83
|
+
def result(self, result):
|
|
84
|
+
"""Sets the result of this AddOrUpdateAlarmRuleV4ItemResult.
|
|
85
|
+
|
|
86
|
+
告警规则新增或修改结果。
|
|
87
|
+
|
|
88
|
+
:param result: The result of this AddOrUpdateAlarmRuleV4ItemResult.
|
|
89
|
+
:type result: str
|
|
90
|
+
"""
|
|
91
|
+
self._result = result
|
|
92
|
+
|
|
93
|
+
def to_dict(self):
|
|
94
|
+
"""Returns the model properties as a dict"""
|
|
95
|
+
result = {}
|
|
96
|
+
|
|
97
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
98
|
+
value = getattr(self, attr)
|
|
99
|
+
if isinstance(value, list):
|
|
100
|
+
result[attr] = list(map(
|
|
101
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
102
|
+
value
|
|
103
|
+
))
|
|
104
|
+
elif hasattr(value, "to_dict"):
|
|
105
|
+
result[attr] = value.to_dict()
|
|
106
|
+
elif isinstance(value, dict):
|
|
107
|
+
result[attr] = dict(map(
|
|
108
|
+
lambda item: (item[0], item[1].to_dict())
|
|
109
|
+
if hasattr(item[1], "to_dict") else item,
|
|
110
|
+
value.items()
|
|
111
|
+
))
|
|
112
|
+
else:
|
|
113
|
+
if attr in self.sensitive_list:
|
|
114
|
+
result[attr] = "****"
|
|
115
|
+
else:
|
|
116
|
+
result[attr] = value
|
|
117
|
+
|
|
118
|
+
return result
|
|
119
|
+
|
|
120
|
+
def to_str(self):
|
|
121
|
+
"""Returns the string representation of the model"""
|
|
122
|
+
import simplejson as json
|
|
123
|
+
if six.PY2:
|
|
124
|
+
import sys
|
|
125
|
+
reload(sys)
|
|
126
|
+
sys.setdefaultencoding("utf-8")
|
|
127
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
128
|
+
|
|
129
|
+
def __repr__(self):
|
|
130
|
+
"""For `print`"""
|
|
131
|
+
return self.to_str()
|
|
132
|
+
|
|
133
|
+
def __eq__(self, other):
|
|
134
|
+
"""Returns true if both objects are equal"""
|
|
135
|
+
if not isinstance(other, AddOrUpdateAlarmRuleV4ItemResult):
|
|
136
|
+
return False
|
|
137
|
+
|
|
138
|
+
return self.__dict__ == other.__dict__
|
|
139
|
+
|
|
140
|
+
def __ne__(self, other):
|
|
141
|
+
"""Returns true if both objects are not equal"""
|
|
142
|
+
return not self == other
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class AddOrUpdateAlarmRuleV4RequestBody:
|
|
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_notifications': 'AlarmNotification',
|
|
21
|
+
'alarm_rule_description': 'str',
|
|
22
|
+
'alarm_rule_enable': 'bool',
|
|
23
|
+
'alarm_rule_name': 'str',
|
|
24
|
+
'alarm_rule_type': 'str',
|
|
25
|
+
'event_alarm_spec': 'EventAlarmSpec',
|
|
26
|
+
'metric_alarm_spec': 'MetricAlarmSpec',
|
|
27
|
+
'prom_instance_id': 'str'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
attribute_map = {
|
|
31
|
+
'alarm_notifications': 'alarm_notifications',
|
|
32
|
+
'alarm_rule_description': 'alarm_rule_description',
|
|
33
|
+
'alarm_rule_enable': 'alarm_rule_enable',
|
|
34
|
+
'alarm_rule_name': 'alarm_rule_name',
|
|
35
|
+
'alarm_rule_type': 'alarm_rule_type',
|
|
36
|
+
'event_alarm_spec': 'event_alarm_spec',
|
|
37
|
+
'metric_alarm_spec': 'metric_alarm_spec',
|
|
38
|
+
'prom_instance_id': 'prom_instance_id'
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
def __init__(self, alarm_notifications=None, alarm_rule_description=None, alarm_rule_enable=None, alarm_rule_name=None, alarm_rule_type=None, event_alarm_spec=None, metric_alarm_spec=None, prom_instance_id=None):
|
|
42
|
+
"""AddOrUpdateAlarmRuleV4RequestBody
|
|
43
|
+
|
|
44
|
+
The model defined in huaweicloud sdk
|
|
45
|
+
|
|
46
|
+
:param alarm_notifications:
|
|
47
|
+
:type alarm_notifications: :class:`huaweicloudsdkaom.v2.AlarmNotification`
|
|
48
|
+
:param alarm_rule_description: 告警规则描述。
|
|
49
|
+
:type alarm_rule_description: str
|
|
50
|
+
:param alarm_rule_enable: 是否启用。
|
|
51
|
+
:type alarm_rule_enable: bool
|
|
52
|
+
:param alarm_rule_name: 告警规则名称。
|
|
53
|
+
:type alarm_rule_name: str
|
|
54
|
+
:param alarm_rule_type: 告警规则类型。 - “metric”:指标告警规则 - “event”:事件告警规则
|
|
55
|
+
:type alarm_rule_type: str
|
|
56
|
+
:param event_alarm_spec:
|
|
57
|
+
:type event_alarm_spec: :class:`huaweicloudsdkaom.v2.EventAlarmSpec`
|
|
58
|
+
:param metric_alarm_spec:
|
|
59
|
+
:type metric_alarm_spec: :class:`huaweicloudsdkaom.v2.MetricAlarmSpec`
|
|
60
|
+
:param prom_instance_id: Prometheus实例id。
|
|
61
|
+
:type prom_instance_id: str
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
self._alarm_notifications = None
|
|
67
|
+
self._alarm_rule_description = None
|
|
68
|
+
self._alarm_rule_enable = None
|
|
69
|
+
self._alarm_rule_name = None
|
|
70
|
+
self._alarm_rule_type = None
|
|
71
|
+
self._event_alarm_spec = None
|
|
72
|
+
self._metric_alarm_spec = None
|
|
73
|
+
self._prom_instance_id = None
|
|
74
|
+
self.discriminator = None
|
|
75
|
+
|
|
76
|
+
if alarm_notifications is not None:
|
|
77
|
+
self.alarm_notifications = alarm_notifications
|
|
78
|
+
if alarm_rule_description is not None:
|
|
79
|
+
self.alarm_rule_description = alarm_rule_description
|
|
80
|
+
if alarm_rule_enable is not None:
|
|
81
|
+
self.alarm_rule_enable = alarm_rule_enable
|
|
82
|
+
self.alarm_rule_name = alarm_rule_name
|
|
83
|
+
self.alarm_rule_type = alarm_rule_type
|
|
84
|
+
if event_alarm_spec is not None:
|
|
85
|
+
self.event_alarm_spec = event_alarm_spec
|
|
86
|
+
if metric_alarm_spec is not None:
|
|
87
|
+
self.metric_alarm_spec = metric_alarm_spec
|
|
88
|
+
if prom_instance_id is not None:
|
|
89
|
+
self.prom_instance_id = prom_instance_id
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def alarm_notifications(self):
|
|
93
|
+
"""Gets the alarm_notifications of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
94
|
+
|
|
95
|
+
:return: The alarm_notifications of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
96
|
+
:rtype: :class:`huaweicloudsdkaom.v2.AlarmNotification`
|
|
97
|
+
"""
|
|
98
|
+
return self._alarm_notifications
|
|
99
|
+
|
|
100
|
+
@alarm_notifications.setter
|
|
101
|
+
def alarm_notifications(self, alarm_notifications):
|
|
102
|
+
"""Sets the alarm_notifications of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
103
|
+
|
|
104
|
+
:param alarm_notifications: The alarm_notifications of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
105
|
+
:type alarm_notifications: :class:`huaweicloudsdkaom.v2.AlarmNotification`
|
|
106
|
+
"""
|
|
107
|
+
self._alarm_notifications = alarm_notifications
|
|
108
|
+
|
|
109
|
+
@property
|
|
110
|
+
def alarm_rule_description(self):
|
|
111
|
+
"""Gets the alarm_rule_description of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
112
|
+
|
|
113
|
+
告警规则描述。
|
|
114
|
+
|
|
115
|
+
:return: The alarm_rule_description of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
116
|
+
:rtype: str
|
|
117
|
+
"""
|
|
118
|
+
return self._alarm_rule_description
|
|
119
|
+
|
|
120
|
+
@alarm_rule_description.setter
|
|
121
|
+
def alarm_rule_description(self, alarm_rule_description):
|
|
122
|
+
"""Sets the alarm_rule_description of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
123
|
+
|
|
124
|
+
告警规则描述。
|
|
125
|
+
|
|
126
|
+
:param alarm_rule_description: The alarm_rule_description of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
127
|
+
:type alarm_rule_description: str
|
|
128
|
+
"""
|
|
129
|
+
self._alarm_rule_description = alarm_rule_description
|
|
130
|
+
|
|
131
|
+
@property
|
|
132
|
+
def alarm_rule_enable(self):
|
|
133
|
+
"""Gets the alarm_rule_enable of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
134
|
+
|
|
135
|
+
是否启用。
|
|
136
|
+
|
|
137
|
+
:return: The alarm_rule_enable of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
138
|
+
:rtype: bool
|
|
139
|
+
"""
|
|
140
|
+
return self._alarm_rule_enable
|
|
141
|
+
|
|
142
|
+
@alarm_rule_enable.setter
|
|
143
|
+
def alarm_rule_enable(self, alarm_rule_enable):
|
|
144
|
+
"""Sets the alarm_rule_enable of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
145
|
+
|
|
146
|
+
是否启用。
|
|
147
|
+
|
|
148
|
+
:param alarm_rule_enable: The alarm_rule_enable of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
149
|
+
:type alarm_rule_enable: bool
|
|
150
|
+
"""
|
|
151
|
+
self._alarm_rule_enable = alarm_rule_enable
|
|
152
|
+
|
|
153
|
+
@property
|
|
154
|
+
def alarm_rule_name(self):
|
|
155
|
+
"""Gets the alarm_rule_name of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
156
|
+
|
|
157
|
+
告警规则名称。
|
|
158
|
+
|
|
159
|
+
:return: The alarm_rule_name of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
160
|
+
:rtype: str
|
|
161
|
+
"""
|
|
162
|
+
return self._alarm_rule_name
|
|
163
|
+
|
|
164
|
+
@alarm_rule_name.setter
|
|
165
|
+
def alarm_rule_name(self, alarm_rule_name):
|
|
166
|
+
"""Sets the alarm_rule_name of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
167
|
+
|
|
168
|
+
告警规则名称。
|
|
169
|
+
|
|
170
|
+
:param alarm_rule_name: The alarm_rule_name of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
171
|
+
:type alarm_rule_name: str
|
|
172
|
+
"""
|
|
173
|
+
self._alarm_rule_name = alarm_rule_name
|
|
174
|
+
|
|
175
|
+
@property
|
|
176
|
+
def alarm_rule_type(self):
|
|
177
|
+
"""Gets the alarm_rule_type of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
178
|
+
|
|
179
|
+
告警规则类型。 - “metric”:指标告警规则 - “event”:事件告警规则
|
|
180
|
+
|
|
181
|
+
:return: The alarm_rule_type of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
182
|
+
:rtype: str
|
|
183
|
+
"""
|
|
184
|
+
return self._alarm_rule_type
|
|
185
|
+
|
|
186
|
+
@alarm_rule_type.setter
|
|
187
|
+
def alarm_rule_type(self, alarm_rule_type):
|
|
188
|
+
"""Sets the alarm_rule_type of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
189
|
+
|
|
190
|
+
告警规则类型。 - “metric”:指标告警规则 - “event”:事件告警规则
|
|
191
|
+
|
|
192
|
+
:param alarm_rule_type: The alarm_rule_type of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
193
|
+
:type alarm_rule_type: str
|
|
194
|
+
"""
|
|
195
|
+
self._alarm_rule_type = alarm_rule_type
|
|
196
|
+
|
|
197
|
+
@property
|
|
198
|
+
def event_alarm_spec(self):
|
|
199
|
+
"""Gets the event_alarm_spec of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
200
|
+
|
|
201
|
+
:return: The event_alarm_spec of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
202
|
+
:rtype: :class:`huaweicloudsdkaom.v2.EventAlarmSpec`
|
|
203
|
+
"""
|
|
204
|
+
return self._event_alarm_spec
|
|
205
|
+
|
|
206
|
+
@event_alarm_spec.setter
|
|
207
|
+
def event_alarm_spec(self, event_alarm_spec):
|
|
208
|
+
"""Sets the event_alarm_spec of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
209
|
+
|
|
210
|
+
:param event_alarm_spec: The event_alarm_spec of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
211
|
+
:type event_alarm_spec: :class:`huaweicloudsdkaom.v2.EventAlarmSpec`
|
|
212
|
+
"""
|
|
213
|
+
self._event_alarm_spec = event_alarm_spec
|
|
214
|
+
|
|
215
|
+
@property
|
|
216
|
+
def metric_alarm_spec(self):
|
|
217
|
+
"""Gets the metric_alarm_spec of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
218
|
+
|
|
219
|
+
:return: The metric_alarm_spec of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
220
|
+
:rtype: :class:`huaweicloudsdkaom.v2.MetricAlarmSpec`
|
|
221
|
+
"""
|
|
222
|
+
return self._metric_alarm_spec
|
|
223
|
+
|
|
224
|
+
@metric_alarm_spec.setter
|
|
225
|
+
def metric_alarm_spec(self, metric_alarm_spec):
|
|
226
|
+
"""Sets the metric_alarm_spec of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
227
|
+
|
|
228
|
+
:param metric_alarm_spec: The metric_alarm_spec of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
229
|
+
:type metric_alarm_spec: :class:`huaweicloudsdkaom.v2.MetricAlarmSpec`
|
|
230
|
+
"""
|
|
231
|
+
self._metric_alarm_spec = metric_alarm_spec
|
|
232
|
+
|
|
233
|
+
@property
|
|
234
|
+
def prom_instance_id(self):
|
|
235
|
+
"""Gets the prom_instance_id of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
236
|
+
|
|
237
|
+
Prometheus实例id。
|
|
238
|
+
|
|
239
|
+
:return: The prom_instance_id of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
240
|
+
:rtype: str
|
|
241
|
+
"""
|
|
242
|
+
return self._prom_instance_id
|
|
243
|
+
|
|
244
|
+
@prom_instance_id.setter
|
|
245
|
+
def prom_instance_id(self, prom_instance_id):
|
|
246
|
+
"""Sets the prom_instance_id of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
247
|
+
|
|
248
|
+
Prometheus实例id。
|
|
249
|
+
|
|
250
|
+
:param prom_instance_id: The prom_instance_id of this AddOrUpdateAlarmRuleV4RequestBody.
|
|
251
|
+
:type prom_instance_id: str
|
|
252
|
+
"""
|
|
253
|
+
self._prom_instance_id = prom_instance_id
|
|
254
|
+
|
|
255
|
+
def to_dict(self):
|
|
256
|
+
"""Returns the model properties as a dict"""
|
|
257
|
+
result = {}
|
|
258
|
+
|
|
259
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
260
|
+
value = getattr(self, attr)
|
|
261
|
+
if isinstance(value, list):
|
|
262
|
+
result[attr] = list(map(
|
|
263
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
264
|
+
value
|
|
265
|
+
))
|
|
266
|
+
elif hasattr(value, "to_dict"):
|
|
267
|
+
result[attr] = value.to_dict()
|
|
268
|
+
elif isinstance(value, dict):
|
|
269
|
+
result[attr] = dict(map(
|
|
270
|
+
lambda item: (item[0], item[1].to_dict())
|
|
271
|
+
if hasattr(item[1], "to_dict") else item,
|
|
272
|
+
value.items()
|
|
273
|
+
))
|
|
274
|
+
else:
|
|
275
|
+
if attr in self.sensitive_list:
|
|
276
|
+
result[attr] = "****"
|
|
277
|
+
else:
|
|
278
|
+
result[attr] = value
|
|
279
|
+
|
|
280
|
+
return result
|
|
281
|
+
|
|
282
|
+
def to_str(self):
|
|
283
|
+
"""Returns the string representation of the model"""
|
|
284
|
+
import simplejson as json
|
|
285
|
+
if six.PY2:
|
|
286
|
+
import sys
|
|
287
|
+
reload(sys)
|
|
288
|
+
sys.setdefaultencoding("utf-8")
|
|
289
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
290
|
+
|
|
291
|
+
def __repr__(self):
|
|
292
|
+
"""For `print`"""
|
|
293
|
+
return self.to_str()
|
|
294
|
+
|
|
295
|
+
def __eq__(self, other):
|
|
296
|
+
"""Returns true if both objects are equal"""
|
|
297
|
+
if not isinstance(other, AddOrUpdateAlarmRuleV4RequestBody):
|
|
298
|
+
return False
|
|
299
|
+
|
|
300
|
+
return self.__dict__ == other.__dict__
|
|
301
|
+
|
|
302
|
+
def __ne__(self, other):
|
|
303
|
+
"""Returns true if both objects are not equal"""
|
|
304
|
+
return not self == other
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class AddOrUpdateMetricOrEventAlarmRuleRequest:
|
|
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
|
+
'action_id': 'str',
|
|
21
|
+
'enterprise_project_id': 'str',
|
|
22
|
+
'body': 'AddOrUpdateAlarmRuleV4RequestBody'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
attribute_map = {
|
|
26
|
+
'action_id': 'action_id',
|
|
27
|
+
'enterprise_project_id': 'Enterprise-Project-Id',
|
|
28
|
+
'body': 'body'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
def __init__(self, action_id=None, enterprise_project_id=None, body=None):
|
|
32
|
+
"""AddOrUpdateMetricOrEventAlarmRuleRequest
|
|
33
|
+
|
|
34
|
+
The model defined in huaweicloud sdk
|
|
35
|
+
|
|
36
|
+
:param action_id: 告警规则id。 - 新增告警时,填写\"add-alarm-action\" - 更新告警时,填写“update-alarm-action”
|
|
37
|
+
:type action_id: str
|
|
38
|
+
:param enterprise_project_id: 企业项目id。 - 查询单个企业项目下实例,填写企业项目id。 - 查询所有企业项目下实例,填写“all_granted_eps”。
|
|
39
|
+
:type enterprise_project_id: str
|
|
40
|
+
:param body: Body of the AddOrUpdateMetricOrEventAlarmRuleRequest
|
|
41
|
+
:type body: :class:`huaweicloudsdkaom.v2.AddOrUpdateAlarmRuleV4RequestBody`
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
self._action_id = None
|
|
47
|
+
self._enterprise_project_id = None
|
|
48
|
+
self._body = None
|
|
49
|
+
self.discriminator = None
|
|
50
|
+
|
|
51
|
+
self.action_id = action_id
|
|
52
|
+
if enterprise_project_id is not None:
|
|
53
|
+
self.enterprise_project_id = enterprise_project_id
|
|
54
|
+
if body is not None:
|
|
55
|
+
self.body = body
|
|
56
|
+
|
|
57
|
+
@property
|
|
58
|
+
def action_id(self):
|
|
59
|
+
"""Gets the action_id of this AddOrUpdateMetricOrEventAlarmRuleRequest.
|
|
60
|
+
|
|
61
|
+
告警规则id。 - 新增告警时,填写\"add-alarm-action\" - 更新告警时,填写“update-alarm-action”
|
|
62
|
+
|
|
63
|
+
:return: The action_id of this AddOrUpdateMetricOrEventAlarmRuleRequest.
|
|
64
|
+
:rtype: str
|
|
65
|
+
"""
|
|
66
|
+
return self._action_id
|
|
67
|
+
|
|
68
|
+
@action_id.setter
|
|
69
|
+
def action_id(self, action_id):
|
|
70
|
+
"""Sets the action_id of this AddOrUpdateMetricOrEventAlarmRuleRequest.
|
|
71
|
+
|
|
72
|
+
告警规则id。 - 新增告警时,填写\"add-alarm-action\" - 更新告警时,填写“update-alarm-action”
|
|
73
|
+
|
|
74
|
+
:param action_id: The action_id of this AddOrUpdateMetricOrEventAlarmRuleRequest.
|
|
75
|
+
:type action_id: str
|
|
76
|
+
"""
|
|
77
|
+
self._action_id = action_id
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def enterprise_project_id(self):
|
|
81
|
+
"""Gets the enterprise_project_id of this AddOrUpdateMetricOrEventAlarmRuleRequest.
|
|
82
|
+
|
|
83
|
+
企业项目id。 - 查询单个企业项目下实例,填写企业项目id。 - 查询所有企业项目下实例,填写“all_granted_eps”。
|
|
84
|
+
|
|
85
|
+
:return: The enterprise_project_id of this AddOrUpdateMetricOrEventAlarmRuleRequest.
|
|
86
|
+
:rtype: str
|
|
87
|
+
"""
|
|
88
|
+
return self._enterprise_project_id
|
|
89
|
+
|
|
90
|
+
@enterprise_project_id.setter
|
|
91
|
+
def enterprise_project_id(self, enterprise_project_id):
|
|
92
|
+
"""Sets the enterprise_project_id of this AddOrUpdateMetricOrEventAlarmRuleRequest.
|
|
93
|
+
|
|
94
|
+
企业项目id。 - 查询单个企业项目下实例,填写企业项目id。 - 查询所有企业项目下实例,填写“all_granted_eps”。
|
|
95
|
+
|
|
96
|
+
:param enterprise_project_id: The enterprise_project_id of this AddOrUpdateMetricOrEventAlarmRuleRequest.
|
|
97
|
+
:type enterprise_project_id: str
|
|
98
|
+
"""
|
|
99
|
+
self._enterprise_project_id = enterprise_project_id
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def body(self):
|
|
103
|
+
"""Gets the body of this AddOrUpdateMetricOrEventAlarmRuleRequest.
|
|
104
|
+
|
|
105
|
+
:return: The body of this AddOrUpdateMetricOrEventAlarmRuleRequest.
|
|
106
|
+
:rtype: :class:`huaweicloudsdkaom.v2.AddOrUpdateAlarmRuleV4RequestBody`
|
|
107
|
+
"""
|
|
108
|
+
return self._body
|
|
109
|
+
|
|
110
|
+
@body.setter
|
|
111
|
+
def body(self, body):
|
|
112
|
+
"""Sets the body of this AddOrUpdateMetricOrEventAlarmRuleRequest.
|
|
113
|
+
|
|
114
|
+
:param body: The body of this AddOrUpdateMetricOrEventAlarmRuleRequest.
|
|
115
|
+
:type body: :class:`huaweicloudsdkaom.v2.AddOrUpdateAlarmRuleV4RequestBody`
|
|
116
|
+
"""
|
|
117
|
+
self._body = body
|
|
118
|
+
|
|
119
|
+
def to_dict(self):
|
|
120
|
+
"""Returns the model properties as a dict"""
|
|
121
|
+
result = {}
|
|
122
|
+
|
|
123
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
124
|
+
value = getattr(self, attr)
|
|
125
|
+
if isinstance(value, list):
|
|
126
|
+
result[attr] = list(map(
|
|
127
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
128
|
+
value
|
|
129
|
+
))
|
|
130
|
+
elif hasattr(value, "to_dict"):
|
|
131
|
+
result[attr] = value.to_dict()
|
|
132
|
+
elif isinstance(value, dict):
|
|
133
|
+
result[attr] = dict(map(
|
|
134
|
+
lambda item: (item[0], item[1].to_dict())
|
|
135
|
+
if hasattr(item[1], "to_dict") else item,
|
|
136
|
+
value.items()
|
|
137
|
+
))
|
|
138
|
+
else:
|
|
139
|
+
if attr in self.sensitive_list:
|
|
140
|
+
result[attr] = "****"
|
|
141
|
+
else:
|
|
142
|
+
result[attr] = value
|
|
143
|
+
|
|
144
|
+
return result
|
|
145
|
+
|
|
146
|
+
def to_str(self):
|
|
147
|
+
"""Returns the string representation of the model"""
|
|
148
|
+
import simplejson as json
|
|
149
|
+
if six.PY2:
|
|
150
|
+
import sys
|
|
151
|
+
reload(sys)
|
|
152
|
+
sys.setdefaultencoding("utf-8")
|
|
153
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
154
|
+
|
|
155
|
+
def __repr__(self):
|
|
156
|
+
"""For `print`"""
|
|
157
|
+
return self.to_str()
|
|
158
|
+
|
|
159
|
+
def __eq__(self, other):
|
|
160
|
+
"""Returns true if both objects are equal"""
|
|
161
|
+
if not isinstance(other, AddOrUpdateMetricOrEventAlarmRuleRequest):
|
|
162
|
+
return False
|
|
163
|
+
|
|
164
|
+
return self.__dict__ == other.__dict__
|
|
165
|
+
|
|
166
|
+
def __ne__(self, other):
|
|
167
|
+
"""Returns true if both objects are not equal"""
|
|
168
|
+
return not self == other
|