graphscope-flex 0.27.0__py2.py3-none-any.whl → 0.29.0a20250115__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- graphscope/flex/rest/__init__.py +59 -44
- graphscope/flex/rest/api/__init__.py +2 -4
- graphscope/flex/rest/api/alert_api.py +721 -394
- graphscope/flex/rest/api/{legacy_api.py → data_source_api.py} +260 -189
- graphscope/flex/rest/api/deployment_api.py +388 -138
- graphscope/flex/rest/api/graph_api.py +858 -260
- graphscope/flex/rest/api/job_api.py +286 -203
- graphscope/flex/rest/api/service_api.py +320 -39
- graphscope/flex/rest/api/{procedure_api.py → stored_procedure_api.py} +296 -237
- graphscope/flex/rest/api/utils_api.py +18 -13
- graphscope/flex/rest/api_client.py +60 -30
- graphscope/flex/rest/configuration.py +19 -5
- graphscope/flex/rest/exceptions.py +2 -2
- graphscope/flex/rest/models/__init__.py +57 -40
- graphscope/flex/rest/models/{vertex_type.py → base_edge_type.py} +25 -25
- graphscope/flex/rest/models/{edge_type_vertex_type_pair_relations_inner.py → base_edge_type_vertex_type_pair_relations_inner.py} +17 -17
- graphscope/flex/rest/models/{edge_type_vertex_type_pair_relations_inner_x_csr_params.py → base_edge_type_vertex_type_pair_relations_inner_x_csr_params.py} +11 -11
- graphscope/flex/rest/models/{model_property.py → base_property_meta.py} +28 -19
- graphscope/flex/rest/models/base_vertex_type.py +96 -0
- graphscope/flex/rest/models/{procedure_params_inner.py → base_vertex_type_x_csr_params.py} +15 -17
- graphscope/flex/rest/models/column_mapping.py +13 -13
- graphscope/flex/rest/models/{edge_mapping_source_vertex_mappings_inner_column.py → column_mapping_column.py} +12 -12
- graphscope/flex/rest/models/{schema_mapping_loading_config_data_source.py → create_alert_receiver_request.py} +29 -24
- graphscope/flex/rest/models/{alert_rule.py → create_alert_rule_request.py} +19 -25
- graphscope/flex/rest/models/create_dataloading_job_response.py +88 -0
- graphscope/flex/rest/models/create_edge_type.py +114 -0
- graphscope/flex/rest/models/{graph.py → create_graph_request.py} +27 -33
- graphscope/flex/rest/models/create_graph_response.py +88 -0
- graphscope/flex/rest/models/{model_schema.py → create_graph_schema_request.py} +25 -25
- graphscope/flex/rest/models/{groot_vertex_type.py → create_property_meta.py} +32 -25
- graphscope/flex/rest/models/{graph_stored_procedures.py → create_stored_proc_request.py} +26 -23
- graphscope/flex/rest/models/create_stored_proc_response.py +88 -0
- graphscope/flex/rest/models/create_vertex_type.py +108 -0
- graphscope/flex/rest/models/{groot_dataloading_job_config.py → dataloading_job_config.py} +45 -21
- graphscope/flex/rest/models/{groot_dataloading_job_config_edges_inner.py → dataloading_job_config_edges_inner.py} +12 -12
- graphscope/flex/rest/models/{schema_mapping_loading_config.py → dataloading_job_config_loading_config.py} +16 -22
- graphscope/flex/rest/models/{schema_mapping_loading_config_format.py → dataloading_job_config_loading_config_format.py} +12 -12
- graphscope/flex/rest/models/{groot_edge_type_relations_inner.py → dataloading_job_config_vertices_inner.py} +15 -17
- graphscope/flex/rest/models/dataloading_mr_job_config.py +88 -0
- graphscope/flex/rest/models/date_type.py +88 -0
- graphscope/flex/rest/models/edge_mapping.py +23 -25
- graphscope/flex/rest/models/edge_mapping_type_triplet.py +12 -12
- graphscope/flex/rest/models/error.py +90 -0
- graphscope/flex/rest/models/{alert_message.py → get_alert_message_response.py} +23 -32
- graphscope/flex/rest/models/{alert_receiver.py → get_alert_receiver_response.py} +22 -25
- graphscope/flex/rest/models/{connection_status.py → get_alert_rule_response.py} +37 -33
- graphscope/flex/rest/models/{edge_type.py → get_edge_type.py} +33 -27
- graphscope/flex/rest/models/get_graph_response.py +139 -0
- graphscope/flex/rest/models/{groot_schema.py → get_graph_schema_response.py} +32 -32
- graphscope/flex/rest/models/get_pod_log_response.py +88 -0
- graphscope/flex/rest/models/{edge_mapping_destination_vertex_mappings_inner.py → get_property_meta.py} +34 -19
- graphscope/flex/rest/models/get_resource_usage_response.py +105 -0
- graphscope/flex/rest/models/get_storage_usage_response.py +88 -0
- graphscope/flex/rest/models/{procedure.py → get_stored_proc_response.py} +37 -36
- graphscope/flex/rest/models/{groot_edge_type.py → get_vertex_type.py} +33 -31
- graphscope/flex/rest/models/gs_data_type.py +152 -0
- graphscope/flex/rest/models/job_status.py +14 -17
- graphscope/flex/rest/models/{connection.py → long_text.py} +20 -15
- graphscope/flex/rest/models/node_status.py +15 -15
- graphscope/flex/rest/models/parameter.py +96 -0
- graphscope/flex/rest/models/{deployment_info_graphs_info_value.py → pod_status.py} +34 -20
- graphscope/flex/rest/models/{property_property_type.py → primitive_type.py} +16 -19
- graphscope/flex/rest/models/resource_usage.py +92 -0
- graphscope/flex/rest/models/{deployment_info.py → running_deployment_info.py} +42 -45
- graphscope/flex/rest/models/running_deployment_status.py +124 -0
- graphscope/flex/rest/models/schema_mapping.py +18 -26
- graphscope/flex/rest/models/service_status.py +29 -13
- graphscope/flex/rest/models/service_status_sdk_endpoints.py +8 -8
- graphscope/flex/rest/models/start_service_request.py +11 -11
- graphscope/flex/rest/models/{groot_graph.py → stored_procedure_meta.py} +46 -36
- graphscope/flex/rest/models/string_type.py +92 -0
- graphscope/flex/rest/models/string_type_string.py +124 -0
- graphscope/flex/rest/models/temporal_type.py +92 -0
- graphscope/flex/rest/models/temporal_type_temporal.py +138 -0
- graphscope/flex/rest/models/time_stamp_type.py +88 -0
- graphscope/flex/rest/models/update_alert_message_status_request.py +97 -0
- graphscope/flex/rest/models/update_stored_proc_request.py +88 -0
- graphscope/flex/rest/models/upload_file_response.py +90 -0
- graphscope/flex/rest/models/vertex_mapping.py +13 -13
- graphscope/flex/rest/rest.py +4 -2
- graphscope_flex-0.29.0a20250115.dist-info/METADATA +19 -0
- graphscope_flex-0.29.0a20250115.dist-info/RECORD +86 -0
- {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.29.0a20250115.dist-info}/WHEEL +1 -1
- graphscope/flex/rest/api/connection_api.py +0 -550
- graphscope/flex/rest/api/datasource_api.py +0 -2308
- graphscope/flex/rest/models/data_source.py +0 -106
- graphscope/flex/rest/models/deployment_status.py +0 -108
- graphscope/flex/rest/models/edge_data_source.py +0 -112
- graphscope/flex/rest/models/edge_mapping_source_vertex_mappings_inner.py +0 -92
- graphscope/flex/rest/models/groot_graph_gremlin_interface.py +0 -94
- graphscope/flex/rest/models/groot_property.py +0 -104
- graphscope/flex/rest/models/update_alert_messages_request.py +0 -110
- graphscope/flex/rest/models/vertex_data_source.py +0 -104
- graphscope_flex-0.27.0.dist-info/METADATA +0 -17
- graphscope_flex-0.27.0.dist-info/RECORD +0 -71
- {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.29.0a20250115.dist-info}/top_level.txt +0 -0
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
GraphScope FLEX HTTP SERVICE API
|
5
5
|
|
6
|
-
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
|
6
|
+
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/).
|
7
7
|
|
8
|
-
The version of the OpenAPI document: 0.
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Contact: graphscope@alibaba-inc.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -17,13 +17,15 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
17
17
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
18
18
|
from typing_extensions import Annotated
|
19
19
|
|
20
|
-
from pydantic import Field, StrictStr, field_validator
|
21
|
-
from typing import Optional
|
20
|
+
from pydantic import Field, StrictInt, StrictStr, field_validator
|
21
|
+
from typing import List, Optional
|
22
22
|
from typing_extensions import Annotated
|
23
|
-
from graphscope.flex.rest.models.
|
24
|
-
from graphscope.flex.rest.models.
|
25
|
-
from graphscope.flex.rest.models.
|
26
|
-
from graphscope.flex.rest.models.
|
23
|
+
from graphscope.flex.rest.models.create_alert_receiver_request import CreateAlertReceiverRequest
|
24
|
+
from graphscope.flex.rest.models.create_alert_rule_request import CreateAlertRuleRequest
|
25
|
+
from graphscope.flex.rest.models.get_alert_message_response import GetAlertMessageResponse
|
26
|
+
from graphscope.flex.rest.models.get_alert_receiver_response import GetAlertReceiverResponse
|
27
|
+
from graphscope.flex.rest.models.get_alert_rule_response import GetAlertRuleResponse
|
28
|
+
from graphscope.flex.rest.models.update_alert_message_status_request import UpdateAlertMessageStatusRequest
|
27
29
|
|
28
30
|
from graphscope.flex.rest.api_client import ApiClient, RequestSerialized
|
29
31
|
from graphscope.flex.rest.api_response import ApiResponse
|
@@ -44,9 +46,9 @@ class AlertApi:
|
|
44
46
|
|
45
47
|
|
46
48
|
@validate_call
|
47
|
-
def
|
49
|
+
def create_alert_receiver(
|
48
50
|
self,
|
49
|
-
|
51
|
+
create_alert_receiver_request: CreateAlertReceiverRequest,
|
50
52
|
_request_timeout: Union[
|
51
53
|
None,
|
52
54
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -60,11 +62,12 @@ class AlertApi:
|
|
60
62
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
61
63
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
62
64
|
) -> str:
|
63
|
-
"""
|
65
|
+
"""create_alert_receiver
|
64
66
|
|
67
|
+
Create a new alert receiver
|
65
68
|
|
66
|
-
:param
|
67
|
-
:type
|
69
|
+
:param create_alert_receiver_request: (required)
|
70
|
+
:type create_alert_receiver_request: CreateAlertReceiverRequest
|
68
71
|
:param _request_timeout: timeout setting for this request. If one
|
69
72
|
number provided, it will be total request
|
70
73
|
timeout. It can also be a pair (tuple) of
|
@@ -87,8 +90,8 @@ class AlertApi:
|
|
87
90
|
:return: Returns the result object.
|
88
91
|
""" # noqa: E501
|
89
92
|
|
90
|
-
_param = self.
|
91
|
-
|
93
|
+
_param = self._create_alert_receiver_serialize(
|
94
|
+
create_alert_receiver_request=create_alert_receiver_request,
|
92
95
|
_request_auth=_request_auth,
|
93
96
|
_content_type=_content_type,
|
94
97
|
_headers=_headers,
|
@@ -97,6 +100,7 @@ class AlertApi:
|
|
97
100
|
|
98
101
|
_response_types_map: Dict[str, Optional[str]] = {
|
99
102
|
'200': "str",
|
103
|
+
'500': "Error",
|
100
104
|
}
|
101
105
|
response_data = self.api_client.call_api(
|
102
106
|
*_param,
|
@@ -110,9 +114,9 @@ class AlertApi:
|
|
110
114
|
|
111
115
|
|
112
116
|
@validate_call
|
113
|
-
def
|
117
|
+
def create_alert_receiver_with_http_info(
|
114
118
|
self,
|
115
|
-
|
119
|
+
create_alert_receiver_request: CreateAlertReceiverRequest,
|
116
120
|
_request_timeout: Union[
|
117
121
|
None,
|
118
122
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -126,11 +130,12 @@ class AlertApi:
|
|
126
130
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
127
131
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
128
132
|
) -> ApiResponse[str]:
|
129
|
-
"""
|
133
|
+
"""create_alert_receiver
|
130
134
|
|
135
|
+
Create a new alert receiver
|
131
136
|
|
132
|
-
:param
|
133
|
-
:type
|
137
|
+
:param create_alert_receiver_request: (required)
|
138
|
+
:type create_alert_receiver_request: CreateAlertReceiverRequest
|
134
139
|
:param _request_timeout: timeout setting for this request. If one
|
135
140
|
number provided, it will be total request
|
136
141
|
timeout. It can also be a pair (tuple) of
|
@@ -153,8 +158,8 @@ class AlertApi:
|
|
153
158
|
:return: Returns the result object.
|
154
159
|
""" # noqa: E501
|
155
160
|
|
156
|
-
_param = self.
|
157
|
-
|
161
|
+
_param = self._create_alert_receiver_serialize(
|
162
|
+
create_alert_receiver_request=create_alert_receiver_request,
|
158
163
|
_request_auth=_request_auth,
|
159
164
|
_content_type=_content_type,
|
160
165
|
_headers=_headers,
|
@@ -163,6 +168,7 @@ class AlertApi:
|
|
163
168
|
|
164
169
|
_response_types_map: Dict[str, Optional[str]] = {
|
165
170
|
'200': "str",
|
171
|
+
'500': "Error",
|
166
172
|
}
|
167
173
|
response_data = self.api_client.call_api(
|
168
174
|
*_param,
|
@@ -176,9 +182,9 @@ class AlertApi:
|
|
176
182
|
|
177
183
|
|
178
184
|
@validate_call
|
179
|
-
def
|
185
|
+
def create_alert_receiver_without_preload_content(
|
180
186
|
self,
|
181
|
-
|
187
|
+
create_alert_receiver_request: CreateAlertReceiverRequest,
|
182
188
|
_request_timeout: Union[
|
183
189
|
None,
|
184
190
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -192,11 +198,12 @@ class AlertApi:
|
|
192
198
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
193
199
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
194
200
|
) -> RESTResponseType:
|
195
|
-
"""
|
201
|
+
"""create_alert_receiver
|
196
202
|
|
203
|
+
Create a new alert receiver
|
197
204
|
|
198
|
-
:param
|
199
|
-
:type
|
205
|
+
:param create_alert_receiver_request: (required)
|
206
|
+
:type create_alert_receiver_request: CreateAlertReceiverRequest
|
200
207
|
:param _request_timeout: timeout setting for this request. If one
|
201
208
|
number provided, it will be total request
|
202
209
|
timeout. It can also be a pair (tuple) of
|
@@ -219,8 +226,8 @@ class AlertApi:
|
|
219
226
|
:return: Returns the result object.
|
220
227
|
""" # noqa: E501
|
221
228
|
|
222
|
-
_param = self.
|
223
|
-
|
229
|
+
_param = self._create_alert_receiver_serialize(
|
230
|
+
create_alert_receiver_request=create_alert_receiver_request,
|
224
231
|
_request_auth=_request_auth,
|
225
232
|
_content_type=_content_type,
|
226
233
|
_headers=_headers,
|
@@ -229,6 +236,7 @@ class AlertApi:
|
|
229
236
|
|
230
237
|
_response_types_map: Dict[str, Optional[str]] = {
|
231
238
|
'200': "str",
|
239
|
+
'500': "Error",
|
232
240
|
}
|
233
241
|
response_data = self.api_client.call_api(
|
234
242
|
*_param,
|
@@ -237,9 +245,9 @@ class AlertApi:
|
|
237
245
|
return response_data.response
|
238
246
|
|
239
247
|
|
240
|
-
def
|
248
|
+
def _create_alert_receiver_serialize(
|
241
249
|
self,
|
242
|
-
|
250
|
+
create_alert_receiver_request,
|
243
251
|
_request_auth,
|
244
252
|
_content_type,
|
245
253
|
_headers,
|
@@ -255,25 +263,302 @@ class AlertApi:
|
|
255
263
|
_query_params: List[Tuple[str, str]] = []
|
256
264
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
257
265
|
_form_params: List[Tuple[str, str]] = []
|
258
|
-
_files: Dict[str, str] = {}
|
266
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
259
267
|
_body_params: Optional[bytes] = None
|
260
268
|
|
261
269
|
# process the path parameters
|
262
|
-
if rule_name is not None:
|
263
|
-
_path_params['rule_name'] = rule_name
|
264
270
|
# process the query parameters
|
265
271
|
# process the header parameters
|
266
272
|
# process the form parameters
|
267
273
|
# process the body parameter
|
274
|
+
if create_alert_receiver_request is not None:
|
275
|
+
_body_params = create_alert_receiver_request
|
268
276
|
|
269
277
|
|
270
278
|
# set the HTTP header `Accept`
|
271
|
-
|
272
|
-
[
|
273
|
-
|
279
|
+
if 'Accept' not in _header_params:
|
280
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
281
|
+
[
|
282
|
+
'application/json'
|
283
|
+
]
|
284
|
+
)
|
285
|
+
|
286
|
+
# set the HTTP header `Content-Type`
|
287
|
+
if _content_type:
|
288
|
+
_header_params['Content-Type'] = _content_type
|
289
|
+
else:
|
290
|
+
_default_content_type = (
|
291
|
+
self.api_client.select_header_content_type(
|
292
|
+
[
|
293
|
+
'application/json'
|
294
|
+
]
|
295
|
+
)
|
296
|
+
)
|
297
|
+
if _default_content_type is not None:
|
298
|
+
_header_params['Content-Type'] = _default_content_type
|
299
|
+
|
300
|
+
# authentication setting
|
301
|
+
_auth_settings: List[str] = [
|
302
|
+
]
|
303
|
+
|
304
|
+
return self.api_client.param_serialize(
|
305
|
+
method='POST',
|
306
|
+
resource_path='/api/v1/alert/receiver',
|
307
|
+
path_params=_path_params,
|
308
|
+
query_params=_query_params,
|
309
|
+
header_params=_header_params,
|
310
|
+
body=_body_params,
|
311
|
+
post_params=_form_params,
|
312
|
+
files=_files,
|
313
|
+
auth_settings=_auth_settings,
|
314
|
+
collection_formats=_collection_formats,
|
315
|
+
_host=_host,
|
316
|
+
_request_auth=_request_auth
|
317
|
+
)
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
@validate_call
|
323
|
+
def delete_alert_message_in_batch(
|
324
|
+
self,
|
325
|
+
message_ids: Annotated[StrictStr, Field(description="A list of message id separated by comma, e.g. id1,id2,id3")],
|
326
|
+
_request_timeout: Union[
|
327
|
+
None,
|
328
|
+
Annotated[StrictFloat, Field(gt=0)],
|
329
|
+
Tuple[
|
330
|
+
Annotated[StrictFloat, Field(gt=0)],
|
331
|
+
Annotated[StrictFloat, Field(gt=0)]
|
274
332
|
]
|
333
|
+
] = None,
|
334
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
335
|
+
_content_type: Optional[StrictStr] = None,
|
336
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
337
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
338
|
+
) -> str:
|
339
|
+
"""delete_alert_message_in_batch
|
340
|
+
|
341
|
+
Delete alert message in batch
|
342
|
+
|
343
|
+
:param message_ids: A list of message id separated by comma, e.g. id1,id2,id3 (required)
|
344
|
+
:type message_ids: str
|
345
|
+
:param _request_timeout: timeout setting for this request. If one
|
346
|
+
number provided, it will be total request
|
347
|
+
timeout. It can also be a pair (tuple) of
|
348
|
+
(connection, read) timeouts.
|
349
|
+
:type _request_timeout: int, tuple(int, int), optional
|
350
|
+
:param _request_auth: set to override the auth_settings for an a single
|
351
|
+
request; this effectively ignores the
|
352
|
+
authentication in the spec for a single request.
|
353
|
+
:type _request_auth: dict, optional
|
354
|
+
:param _content_type: force content-type for the request.
|
355
|
+
:type _content_type: str, Optional
|
356
|
+
:param _headers: set to override the headers for a single
|
357
|
+
request; this effectively ignores the headers
|
358
|
+
in the spec for a single request.
|
359
|
+
:type _headers: dict, optional
|
360
|
+
:param _host_index: set to override the host_index for a single
|
361
|
+
request; this effectively ignores the host_index
|
362
|
+
in the spec for a single request.
|
363
|
+
:type _host_index: int, optional
|
364
|
+
:return: Returns the result object.
|
365
|
+
""" # noqa: E501
|
366
|
+
|
367
|
+
_param = self._delete_alert_message_in_batch_serialize(
|
368
|
+
message_ids=message_ids,
|
369
|
+
_request_auth=_request_auth,
|
370
|
+
_content_type=_content_type,
|
371
|
+
_headers=_headers,
|
372
|
+
_host_index=_host_index
|
275
373
|
)
|
276
374
|
|
375
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
376
|
+
'200': "str",
|
377
|
+
'500': "Error",
|
378
|
+
}
|
379
|
+
response_data = self.api_client.call_api(
|
380
|
+
*_param,
|
381
|
+
_request_timeout=_request_timeout
|
382
|
+
)
|
383
|
+
response_data.read()
|
384
|
+
return self.api_client.response_deserialize(
|
385
|
+
response_data=response_data,
|
386
|
+
response_types_map=_response_types_map,
|
387
|
+
).data
|
388
|
+
|
389
|
+
|
390
|
+
@validate_call
|
391
|
+
def delete_alert_message_in_batch_with_http_info(
|
392
|
+
self,
|
393
|
+
message_ids: Annotated[StrictStr, Field(description="A list of message id separated by comma, e.g. id1,id2,id3")],
|
394
|
+
_request_timeout: Union[
|
395
|
+
None,
|
396
|
+
Annotated[StrictFloat, Field(gt=0)],
|
397
|
+
Tuple[
|
398
|
+
Annotated[StrictFloat, Field(gt=0)],
|
399
|
+
Annotated[StrictFloat, Field(gt=0)]
|
400
|
+
]
|
401
|
+
] = None,
|
402
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
403
|
+
_content_type: Optional[StrictStr] = None,
|
404
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
405
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
406
|
+
) -> ApiResponse[str]:
|
407
|
+
"""delete_alert_message_in_batch
|
408
|
+
|
409
|
+
Delete alert message in batch
|
410
|
+
|
411
|
+
:param message_ids: A list of message id separated by comma, e.g. id1,id2,id3 (required)
|
412
|
+
:type message_ids: str
|
413
|
+
:param _request_timeout: timeout setting for this request. If one
|
414
|
+
number provided, it will be total request
|
415
|
+
timeout. It can also be a pair (tuple) of
|
416
|
+
(connection, read) timeouts.
|
417
|
+
:type _request_timeout: int, tuple(int, int), optional
|
418
|
+
:param _request_auth: set to override the auth_settings for an a single
|
419
|
+
request; this effectively ignores the
|
420
|
+
authentication in the spec for a single request.
|
421
|
+
:type _request_auth: dict, optional
|
422
|
+
:param _content_type: force content-type for the request.
|
423
|
+
:type _content_type: str, Optional
|
424
|
+
:param _headers: set to override the headers for a single
|
425
|
+
request; this effectively ignores the headers
|
426
|
+
in the spec for a single request.
|
427
|
+
:type _headers: dict, optional
|
428
|
+
:param _host_index: set to override the host_index for a single
|
429
|
+
request; this effectively ignores the host_index
|
430
|
+
in the spec for a single request.
|
431
|
+
:type _host_index: int, optional
|
432
|
+
:return: Returns the result object.
|
433
|
+
""" # noqa: E501
|
434
|
+
|
435
|
+
_param = self._delete_alert_message_in_batch_serialize(
|
436
|
+
message_ids=message_ids,
|
437
|
+
_request_auth=_request_auth,
|
438
|
+
_content_type=_content_type,
|
439
|
+
_headers=_headers,
|
440
|
+
_host_index=_host_index
|
441
|
+
)
|
442
|
+
|
443
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
444
|
+
'200': "str",
|
445
|
+
'500': "Error",
|
446
|
+
}
|
447
|
+
response_data = self.api_client.call_api(
|
448
|
+
*_param,
|
449
|
+
_request_timeout=_request_timeout
|
450
|
+
)
|
451
|
+
response_data.read()
|
452
|
+
return self.api_client.response_deserialize(
|
453
|
+
response_data=response_data,
|
454
|
+
response_types_map=_response_types_map,
|
455
|
+
)
|
456
|
+
|
457
|
+
|
458
|
+
@validate_call
|
459
|
+
def delete_alert_message_in_batch_without_preload_content(
|
460
|
+
self,
|
461
|
+
message_ids: Annotated[StrictStr, Field(description="A list of message id separated by comma, e.g. id1,id2,id3")],
|
462
|
+
_request_timeout: Union[
|
463
|
+
None,
|
464
|
+
Annotated[StrictFloat, Field(gt=0)],
|
465
|
+
Tuple[
|
466
|
+
Annotated[StrictFloat, Field(gt=0)],
|
467
|
+
Annotated[StrictFloat, Field(gt=0)]
|
468
|
+
]
|
469
|
+
] = None,
|
470
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
471
|
+
_content_type: Optional[StrictStr] = None,
|
472
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
473
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
474
|
+
) -> RESTResponseType:
|
475
|
+
"""delete_alert_message_in_batch
|
476
|
+
|
477
|
+
Delete alert message in batch
|
478
|
+
|
479
|
+
:param message_ids: A list of message id separated by comma, e.g. id1,id2,id3 (required)
|
480
|
+
:type message_ids: str
|
481
|
+
:param _request_timeout: timeout setting for this request. If one
|
482
|
+
number provided, it will be total request
|
483
|
+
timeout. It can also be a pair (tuple) of
|
484
|
+
(connection, read) timeouts.
|
485
|
+
:type _request_timeout: int, tuple(int, int), optional
|
486
|
+
:param _request_auth: set to override the auth_settings for an a single
|
487
|
+
request; this effectively ignores the
|
488
|
+
authentication in the spec for a single request.
|
489
|
+
:type _request_auth: dict, optional
|
490
|
+
:param _content_type: force content-type for the request.
|
491
|
+
:type _content_type: str, Optional
|
492
|
+
:param _headers: set to override the headers for a single
|
493
|
+
request; this effectively ignores the headers
|
494
|
+
in the spec for a single request.
|
495
|
+
:type _headers: dict, optional
|
496
|
+
:param _host_index: set to override the host_index for a single
|
497
|
+
request; this effectively ignores the host_index
|
498
|
+
in the spec for a single request.
|
499
|
+
:type _host_index: int, optional
|
500
|
+
:return: Returns the result object.
|
501
|
+
""" # noqa: E501
|
502
|
+
|
503
|
+
_param = self._delete_alert_message_in_batch_serialize(
|
504
|
+
message_ids=message_ids,
|
505
|
+
_request_auth=_request_auth,
|
506
|
+
_content_type=_content_type,
|
507
|
+
_headers=_headers,
|
508
|
+
_host_index=_host_index
|
509
|
+
)
|
510
|
+
|
511
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
512
|
+
'200': "str",
|
513
|
+
'500': "Error",
|
514
|
+
}
|
515
|
+
response_data = self.api_client.call_api(
|
516
|
+
*_param,
|
517
|
+
_request_timeout=_request_timeout
|
518
|
+
)
|
519
|
+
return response_data.response
|
520
|
+
|
521
|
+
|
522
|
+
def _delete_alert_message_in_batch_serialize(
|
523
|
+
self,
|
524
|
+
message_ids,
|
525
|
+
_request_auth,
|
526
|
+
_content_type,
|
527
|
+
_headers,
|
528
|
+
_host_index,
|
529
|
+
) -> RequestSerialized:
|
530
|
+
|
531
|
+
_host = None
|
532
|
+
|
533
|
+
_collection_formats: Dict[str, str] = {
|
534
|
+
}
|
535
|
+
|
536
|
+
_path_params: Dict[str, str] = {}
|
537
|
+
_query_params: List[Tuple[str, str]] = []
|
538
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
539
|
+
_form_params: List[Tuple[str, str]] = []
|
540
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
541
|
+
_body_params: Optional[bytes] = None
|
542
|
+
|
543
|
+
# process the path parameters
|
544
|
+
# process the query parameters
|
545
|
+
if message_ids is not None:
|
546
|
+
|
547
|
+
_query_params.append(('message_ids', message_ids))
|
548
|
+
|
549
|
+
# process the header parameters
|
550
|
+
# process the form parameters
|
551
|
+
# process the body parameter
|
552
|
+
|
553
|
+
|
554
|
+
# set the HTTP header `Accept`
|
555
|
+
if 'Accept' not in _header_params:
|
556
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
557
|
+
[
|
558
|
+
'application/json'
|
559
|
+
]
|
560
|
+
)
|
561
|
+
|
277
562
|
|
278
563
|
# authentication setting
|
279
564
|
_auth_settings: List[str] = [
|
@@ -281,7 +566,7 @@ class AlertApi:
|
|
281
566
|
|
282
567
|
return self.api_client.param_serialize(
|
283
568
|
method='DELETE',
|
284
|
-
resource_path='/api/v1/alert/
|
569
|
+
resource_path='/api/v1/alert/message-collection',
|
285
570
|
path_params=_path_params,
|
286
571
|
query_params=_query_params,
|
287
572
|
header_params=_header_params,
|
@@ -298,7 +583,7 @@ class AlertApi:
|
|
298
583
|
|
299
584
|
|
300
585
|
@validate_call
|
301
|
-
def
|
586
|
+
def delete_alert_receiver_by_id(
|
302
587
|
self,
|
303
588
|
receiver_id: StrictStr,
|
304
589
|
_request_timeout: Union[
|
@@ -314,8 +599,9 @@ class AlertApi:
|
|
314
599
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
315
600
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
316
601
|
) -> str:
|
317
|
-
"""
|
602
|
+
"""delete_alert_receiver_by_id
|
318
603
|
|
604
|
+
Delete the alert receiver by ID
|
319
605
|
|
320
606
|
:param receiver_id: (required)
|
321
607
|
:type receiver_id: str
|
@@ -341,7 +627,7 @@ class AlertApi:
|
|
341
627
|
:return: Returns the result object.
|
342
628
|
""" # noqa: E501
|
343
629
|
|
344
|
-
_param = self.
|
630
|
+
_param = self._delete_alert_receiver_by_id_serialize(
|
345
631
|
receiver_id=receiver_id,
|
346
632
|
_request_auth=_request_auth,
|
347
633
|
_content_type=_content_type,
|
@@ -351,7 +637,7 @@ class AlertApi:
|
|
351
637
|
|
352
638
|
_response_types_map: Dict[str, Optional[str]] = {
|
353
639
|
'200': "str",
|
354
|
-
'
|
640
|
+
'500': "Error",
|
355
641
|
}
|
356
642
|
response_data = self.api_client.call_api(
|
357
643
|
*_param,
|
@@ -365,7 +651,7 @@ class AlertApi:
|
|
365
651
|
|
366
652
|
|
367
653
|
@validate_call
|
368
|
-
def
|
654
|
+
def delete_alert_receiver_by_id_with_http_info(
|
369
655
|
self,
|
370
656
|
receiver_id: StrictStr,
|
371
657
|
_request_timeout: Union[
|
@@ -381,8 +667,9 @@ class AlertApi:
|
|
381
667
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
382
668
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
383
669
|
) -> ApiResponse[str]:
|
384
|
-
"""
|
670
|
+
"""delete_alert_receiver_by_id
|
385
671
|
|
672
|
+
Delete the alert receiver by ID
|
386
673
|
|
387
674
|
:param receiver_id: (required)
|
388
675
|
:type receiver_id: str
|
@@ -408,7 +695,7 @@ class AlertApi:
|
|
408
695
|
:return: Returns the result object.
|
409
696
|
""" # noqa: E501
|
410
697
|
|
411
|
-
_param = self.
|
698
|
+
_param = self._delete_alert_receiver_by_id_serialize(
|
412
699
|
receiver_id=receiver_id,
|
413
700
|
_request_auth=_request_auth,
|
414
701
|
_content_type=_content_type,
|
@@ -418,7 +705,7 @@ class AlertApi:
|
|
418
705
|
|
419
706
|
_response_types_map: Dict[str, Optional[str]] = {
|
420
707
|
'200': "str",
|
421
|
-
'
|
708
|
+
'500': "Error",
|
422
709
|
}
|
423
710
|
response_data = self.api_client.call_api(
|
424
711
|
*_param,
|
@@ -432,7 +719,7 @@ class AlertApi:
|
|
432
719
|
|
433
720
|
|
434
721
|
@validate_call
|
435
|
-
def
|
722
|
+
def delete_alert_receiver_by_id_without_preload_content(
|
436
723
|
self,
|
437
724
|
receiver_id: StrictStr,
|
438
725
|
_request_timeout: Union[
|
@@ -448,8 +735,9 @@ class AlertApi:
|
|
448
735
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
449
736
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
450
737
|
) -> RESTResponseType:
|
451
|
-
"""
|
738
|
+
"""delete_alert_receiver_by_id
|
452
739
|
|
740
|
+
Delete the alert receiver by ID
|
453
741
|
|
454
742
|
:param receiver_id: (required)
|
455
743
|
:type receiver_id: str
|
@@ -475,7 +763,7 @@ class AlertApi:
|
|
475
763
|
:return: Returns the result object.
|
476
764
|
""" # noqa: E501
|
477
765
|
|
478
|
-
_param = self.
|
766
|
+
_param = self._delete_alert_receiver_by_id_serialize(
|
479
767
|
receiver_id=receiver_id,
|
480
768
|
_request_auth=_request_auth,
|
481
769
|
_content_type=_content_type,
|
@@ -485,7 +773,7 @@ class AlertApi:
|
|
485
773
|
|
486
774
|
_response_types_map: Dict[str, Optional[str]] = {
|
487
775
|
'200': "str",
|
488
|
-
'
|
776
|
+
'500': "Error",
|
489
777
|
}
|
490
778
|
response_data = self.api_client.call_api(
|
491
779
|
*_param,
|
@@ -494,7 +782,7 @@ class AlertApi:
|
|
494
782
|
return response_data.response
|
495
783
|
|
496
784
|
|
497
|
-
def
|
785
|
+
def _delete_alert_receiver_by_id_serialize(
|
498
786
|
self,
|
499
787
|
receiver_id,
|
500
788
|
_request_auth,
|
@@ -512,7 +800,7 @@ class AlertApi:
|
|
512
800
|
_query_params: List[Tuple[str, str]] = []
|
513
801
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
514
802
|
_form_params: List[Tuple[str, str]] = []
|
515
|
-
_files: Dict[str, str] = {}
|
803
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
516
804
|
_body_params: Optional[bytes] = None
|
517
805
|
|
518
806
|
# process the path parameters
|
@@ -525,11 +813,12 @@ class AlertApi:
|
|
525
813
|
|
526
814
|
|
527
815
|
# set the HTTP header `Accept`
|
528
|
-
|
529
|
-
[
|
530
|
-
|
531
|
-
|
532
|
-
|
816
|
+
if 'Accept' not in _header_params:
|
817
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
818
|
+
[
|
819
|
+
'application/json'
|
820
|
+
]
|
821
|
+
)
|
533
822
|
|
534
823
|
|
535
824
|
# authentication setting
|
@@ -555,13 +844,9 @@ class AlertApi:
|
|
555
844
|
|
556
845
|
|
557
846
|
@validate_call
|
558
|
-
def
|
847
|
+
def delete_alert_rule_by_id(
|
559
848
|
self,
|
560
|
-
|
561
|
-
status: Optional[StrictStr] = None,
|
562
|
-
severity: Optional[StrictStr] = None,
|
563
|
-
start_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
564
|
-
end_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
849
|
+
rule_id: StrictStr,
|
565
850
|
_request_timeout: Union[
|
566
851
|
None,
|
567
852
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -574,20 +859,12 @@ class AlertApi:
|
|
574
859
|
_content_type: Optional[StrictStr] = None,
|
575
860
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
576
861
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
577
|
-
) ->
|
578
|
-
"""
|
862
|
+
) -> str:
|
863
|
+
"""delete_alert_rule_by_id
|
579
864
|
|
580
865
|
|
581
|
-
:param
|
582
|
-
:type
|
583
|
-
:param status:
|
584
|
-
:type status: str
|
585
|
-
:param severity:
|
586
|
-
:type severity: str
|
587
|
-
:param start_time: format with \"2023-02-21-11-56-30\"
|
588
|
-
:type start_time: str
|
589
|
-
:param end_time: format with \"2023-02-21-11-56-30\"
|
590
|
-
:type end_time: str
|
866
|
+
:param rule_id: (required)
|
867
|
+
:type rule_id: str
|
591
868
|
:param _request_timeout: timeout setting for this request. If one
|
592
869
|
number provided, it will be total request
|
593
870
|
timeout. It can also be a pair (tuple) of
|
@@ -610,12 +887,8 @@ class AlertApi:
|
|
610
887
|
:return: Returns the result object.
|
611
888
|
""" # noqa: E501
|
612
889
|
|
613
|
-
_param = self.
|
614
|
-
|
615
|
-
status=status,
|
616
|
-
severity=severity,
|
617
|
-
start_time=start_time,
|
618
|
-
end_time=end_time,
|
890
|
+
_param = self._delete_alert_rule_by_id_serialize(
|
891
|
+
rule_id=rule_id,
|
619
892
|
_request_auth=_request_auth,
|
620
893
|
_content_type=_content_type,
|
621
894
|
_headers=_headers,
|
@@ -623,7 +896,8 @@ class AlertApi:
|
|
623
896
|
)
|
624
897
|
|
625
898
|
_response_types_map: Dict[str, Optional[str]] = {
|
626
|
-
'200': "
|
899
|
+
'200': "str",
|
900
|
+
'500': "Error",
|
627
901
|
}
|
628
902
|
response_data = self.api_client.call_api(
|
629
903
|
*_param,
|
@@ -637,13 +911,9 @@ class AlertApi:
|
|
637
911
|
|
638
912
|
|
639
913
|
@validate_call
|
640
|
-
def
|
914
|
+
def delete_alert_rule_by_id_with_http_info(
|
641
915
|
self,
|
642
|
-
|
643
|
-
status: Optional[StrictStr] = None,
|
644
|
-
severity: Optional[StrictStr] = None,
|
645
|
-
start_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
646
|
-
end_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
916
|
+
rule_id: StrictStr,
|
647
917
|
_request_timeout: Union[
|
648
918
|
None,
|
649
919
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -656,20 +926,12 @@ class AlertApi:
|
|
656
926
|
_content_type: Optional[StrictStr] = None,
|
657
927
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
658
928
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
659
|
-
) -> ApiResponse[
|
660
|
-
"""
|
929
|
+
) -> ApiResponse[str]:
|
930
|
+
"""delete_alert_rule_by_id
|
661
931
|
|
662
932
|
|
663
|
-
:param
|
664
|
-
:type
|
665
|
-
:param status:
|
666
|
-
:type status: str
|
667
|
-
:param severity:
|
668
|
-
:type severity: str
|
669
|
-
:param start_time: format with \"2023-02-21-11-56-30\"
|
670
|
-
:type start_time: str
|
671
|
-
:param end_time: format with \"2023-02-21-11-56-30\"
|
672
|
-
:type end_time: str
|
933
|
+
:param rule_id: (required)
|
934
|
+
:type rule_id: str
|
673
935
|
:param _request_timeout: timeout setting for this request. If one
|
674
936
|
number provided, it will be total request
|
675
937
|
timeout. It can also be a pair (tuple) of
|
@@ -692,12 +954,8 @@ class AlertApi:
|
|
692
954
|
:return: Returns the result object.
|
693
955
|
""" # noqa: E501
|
694
956
|
|
695
|
-
_param = self.
|
696
|
-
|
697
|
-
status=status,
|
698
|
-
severity=severity,
|
699
|
-
start_time=start_time,
|
700
|
-
end_time=end_time,
|
957
|
+
_param = self._delete_alert_rule_by_id_serialize(
|
958
|
+
rule_id=rule_id,
|
701
959
|
_request_auth=_request_auth,
|
702
960
|
_content_type=_content_type,
|
703
961
|
_headers=_headers,
|
@@ -705,7 +963,8 @@ class AlertApi:
|
|
705
963
|
)
|
706
964
|
|
707
965
|
_response_types_map: Dict[str, Optional[str]] = {
|
708
|
-
'200': "
|
966
|
+
'200': "str",
|
967
|
+
'500': "Error",
|
709
968
|
}
|
710
969
|
response_data = self.api_client.call_api(
|
711
970
|
*_param,
|
@@ -719,13 +978,9 @@ class AlertApi:
|
|
719
978
|
|
720
979
|
|
721
980
|
@validate_call
|
722
|
-
def
|
981
|
+
def delete_alert_rule_by_id_without_preload_content(
|
723
982
|
self,
|
724
|
-
|
725
|
-
status: Optional[StrictStr] = None,
|
726
|
-
severity: Optional[StrictStr] = None,
|
727
|
-
start_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
728
|
-
end_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
983
|
+
rule_id: StrictStr,
|
729
984
|
_request_timeout: Union[
|
730
985
|
None,
|
731
986
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -739,19 +994,11 @@ class AlertApi:
|
|
739
994
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
740
995
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
741
996
|
) -> RESTResponseType:
|
742
|
-
"""
|
997
|
+
"""delete_alert_rule_by_id
|
743
998
|
|
744
999
|
|
745
|
-
:param
|
746
|
-
:type
|
747
|
-
:param status:
|
748
|
-
:type status: str
|
749
|
-
:param severity:
|
750
|
-
:type severity: str
|
751
|
-
:param start_time: format with \"2023-02-21-11-56-30\"
|
752
|
-
:type start_time: str
|
753
|
-
:param end_time: format with \"2023-02-21-11-56-30\"
|
754
|
-
:type end_time: str
|
1000
|
+
:param rule_id: (required)
|
1001
|
+
:type rule_id: str
|
755
1002
|
:param _request_timeout: timeout setting for this request. If one
|
756
1003
|
number provided, it will be total request
|
757
1004
|
timeout. It can also be a pair (tuple) of
|
@@ -774,12 +1021,8 @@ class AlertApi:
|
|
774
1021
|
:return: Returns the result object.
|
775
1022
|
""" # noqa: E501
|
776
1023
|
|
777
|
-
_param = self.
|
778
|
-
|
779
|
-
status=status,
|
780
|
-
severity=severity,
|
781
|
-
start_time=start_time,
|
782
|
-
end_time=end_time,
|
1024
|
+
_param = self._delete_alert_rule_by_id_serialize(
|
1025
|
+
rule_id=rule_id,
|
783
1026
|
_request_auth=_request_auth,
|
784
1027
|
_content_type=_content_type,
|
785
1028
|
_headers=_headers,
|
@@ -787,7 +1030,8 @@ class AlertApi:
|
|
787
1030
|
)
|
788
1031
|
|
789
1032
|
_response_types_map: Dict[str, Optional[str]] = {
|
790
|
-
'200': "
|
1033
|
+
'200': "str",
|
1034
|
+
'500': "Error",
|
791
1035
|
}
|
792
1036
|
response_data = self.api_client.call_api(
|
793
1037
|
*_param,
|
@@ -796,13 +1040,9 @@ class AlertApi:
|
|
796
1040
|
return response_data.response
|
797
1041
|
|
798
1042
|
|
799
|
-
def
|
1043
|
+
def _delete_alert_rule_by_id_serialize(
|
800
1044
|
self,
|
801
|
-
|
802
|
-
status,
|
803
|
-
severity,
|
804
|
-
start_time,
|
805
|
-
end_time,
|
1045
|
+
rule_id,
|
806
1046
|
_request_auth,
|
807
1047
|
_content_type,
|
808
1048
|
_headers,
|
@@ -818,42 +1058,25 @@ class AlertApi:
|
|
818
1058
|
_query_params: List[Tuple[str, str]] = []
|
819
1059
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
820
1060
|
_form_params: List[Tuple[str, str]] = []
|
821
|
-
_files: Dict[str, str] = {}
|
1061
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
822
1062
|
_body_params: Optional[bytes] = None
|
823
1063
|
|
824
1064
|
# process the path parameters
|
1065
|
+
if rule_id is not None:
|
1066
|
+
_path_params['rule_id'] = rule_id
|
825
1067
|
# process the query parameters
|
826
|
-
if type is not None:
|
827
|
-
|
828
|
-
_query_params.append(('type', type))
|
829
|
-
|
830
|
-
if status is not None:
|
831
|
-
|
832
|
-
_query_params.append(('status', status))
|
833
|
-
|
834
|
-
if severity is not None:
|
835
|
-
|
836
|
-
_query_params.append(('severity', severity))
|
837
|
-
|
838
|
-
if start_time is not None:
|
839
|
-
|
840
|
-
_query_params.append(('start_time', start_time))
|
841
|
-
|
842
|
-
if end_time is not None:
|
843
|
-
|
844
|
-
_query_params.append(('end_time', end_time))
|
845
|
-
|
846
1068
|
# process the header parameters
|
847
1069
|
# process the form parameters
|
848
1070
|
# process the body parameter
|
849
1071
|
|
850
1072
|
|
851
1073
|
# set the HTTP header `Accept`
|
852
|
-
|
853
|
-
[
|
854
|
-
|
855
|
-
|
856
|
-
|
1074
|
+
if 'Accept' not in _header_params:
|
1075
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1076
|
+
[
|
1077
|
+
'application/json'
|
1078
|
+
]
|
1079
|
+
)
|
857
1080
|
|
858
1081
|
|
859
1082
|
# authentication setting
|
@@ -861,8 +1084,8 @@ class AlertApi:
|
|
861
1084
|
]
|
862
1085
|
|
863
1086
|
return self.api_client.param_serialize(
|
864
|
-
method='
|
865
|
-
resource_path='/api/v1/alert/
|
1087
|
+
method='DELETE',
|
1088
|
+
resource_path='/api/v1/alert/rule/{rule_id}',
|
866
1089
|
path_params=_path_params,
|
867
1090
|
query_params=_query_params,
|
868
1091
|
header_params=_header_params,
|
@@ -879,8 +1102,14 @@ class AlertApi:
|
|
879
1102
|
|
880
1103
|
|
881
1104
|
@validate_call
|
882
|
-
def
|
1105
|
+
def list_alert_messages(
|
883
1106
|
self,
|
1107
|
+
alert_type: Optional[StrictStr] = None,
|
1108
|
+
status: Optional[StrictStr] = None,
|
1109
|
+
severity: Optional[StrictStr] = None,
|
1110
|
+
start_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
1111
|
+
end_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
1112
|
+
limit: Optional[StrictInt] = None,
|
884
1113
|
_request_timeout: Union[
|
885
1114
|
None,
|
886
1115
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -893,10 +1122,23 @@ class AlertApi:
|
|
893
1122
|
_content_type: Optional[StrictStr] = None,
|
894
1123
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
895
1124
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
896
|
-
) -> List[
|
897
|
-
"""
|
1125
|
+
) -> List[GetAlertMessageResponse]:
|
1126
|
+
"""list_alert_messages
|
898
1127
|
|
1128
|
+
List all alert messages
|
899
1129
|
|
1130
|
+
:param alert_type:
|
1131
|
+
:type alert_type: str
|
1132
|
+
:param status:
|
1133
|
+
:type status: str
|
1134
|
+
:param severity:
|
1135
|
+
:type severity: str
|
1136
|
+
:param start_time: format with \"2023-02-21-11-56-30\"
|
1137
|
+
:type start_time: str
|
1138
|
+
:param end_time: format with \"2023-02-21-11-56-30\"
|
1139
|
+
:type end_time: str
|
1140
|
+
:param limit:
|
1141
|
+
:type limit: int
|
900
1142
|
:param _request_timeout: timeout setting for this request. If one
|
901
1143
|
number provided, it will be total request
|
902
1144
|
timeout. It can also be a pair (tuple) of
|
@@ -919,7 +1161,13 @@ class AlertApi:
|
|
919
1161
|
:return: Returns the result object.
|
920
1162
|
""" # noqa: E501
|
921
1163
|
|
922
|
-
_param = self.
|
1164
|
+
_param = self._list_alert_messages_serialize(
|
1165
|
+
alert_type=alert_type,
|
1166
|
+
status=status,
|
1167
|
+
severity=severity,
|
1168
|
+
start_time=start_time,
|
1169
|
+
end_time=end_time,
|
1170
|
+
limit=limit,
|
923
1171
|
_request_auth=_request_auth,
|
924
1172
|
_content_type=_content_type,
|
925
1173
|
_headers=_headers,
|
@@ -927,7 +1175,8 @@ class AlertApi:
|
|
927
1175
|
)
|
928
1176
|
|
929
1177
|
_response_types_map: Dict[str, Optional[str]] = {
|
930
|
-
'200': "List[
|
1178
|
+
'200': "List[GetAlertMessageResponse]",
|
1179
|
+
'500': "Error",
|
931
1180
|
}
|
932
1181
|
response_data = self.api_client.call_api(
|
933
1182
|
*_param,
|
@@ -941,8 +1190,14 @@ class AlertApi:
|
|
941
1190
|
|
942
1191
|
|
943
1192
|
@validate_call
|
944
|
-
def
|
1193
|
+
def list_alert_messages_with_http_info(
|
945
1194
|
self,
|
1195
|
+
alert_type: Optional[StrictStr] = None,
|
1196
|
+
status: Optional[StrictStr] = None,
|
1197
|
+
severity: Optional[StrictStr] = None,
|
1198
|
+
start_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
1199
|
+
end_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
1200
|
+
limit: Optional[StrictInt] = None,
|
946
1201
|
_request_timeout: Union[
|
947
1202
|
None,
|
948
1203
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -955,10 +1210,23 @@ class AlertApi:
|
|
955
1210
|
_content_type: Optional[StrictStr] = None,
|
956
1211
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
957
1212
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
958
|
-
) -> ApiResponse[List[
|
959
|
-
"""
|
1213
|
+
) -> ApiResponse[List[GetAlertMessageResponse]]:
|
1214
|
+
"""list_alert_messages
|
960
1215
|
|
1216
|
+
List all alert messages
|
961
1217
|
|
1218
|
+
:param alert_type:
|
1219
|
+
:type alert_type: str
|
1220
|
+
:param status:
|
1221
|
+
:type status: str
|
1222
|
+
:param severity:
|
1223
|
+
:type severity: str
|
1224
|
+
:param start_time: format with \"2023-02-21-11-56-30\"
|
1225
|
+
:type start_time: str
|
1226
|
+
:param end_time: format with \"2023-02-21-11-56-30\"
|
1227
|
+
:type end_time: str
|
1228
|
+
:param limit:
|
1229
|
+
:type limit: int
|
962
1230
|
:param _request_timeout: timeout setting for this request. If one
|
963
1231
|
number provided, it will be total request
|
964
1232
|
timeout. It can also be a pair (tuple) of
|
@@ -981,7 +1249,13 @@ class AlertApi:
|
|
981
1249
|
:return: Returns the result object.
|
982
1250
|
""" # noqa: E501
|
983
1251
|
|
984
|
-
_param = self.
|
1252
|
+
_param = self._list_alert_messages_serialize(
|
1253
|
+
alert_type=alert_type,
|
1254
|
+
status=status,
|
1255
|
+
severity=severity,
|
1256
|
+
start_time=start_time,
|
1257
|
+
end_time=end_time,
|
1258
|
+
limit=limit,
|
985
1259
|
_request_auth=_request_auth,
|
986
1260
|
_content_type=_content_type,
|
987
1261
|
_headers=_headers,
|
@@ -989,7 +1263,8 @@ class AlertApi:
|
|
989
1263
|
)
|
990
1264
|
|
991
1265
|
_response_types_map: Dict[str, Optional[str]] = {
|
992
|
-
'200': "List[
|
1266
|
+
'200': "List[GetAlertMessageResponse]",
|
1267
|
+
'500': "Error",
|
993
1268
|
}
|
994
1269
|
response_data = self.api_client.call_api(
|
995
1270
|
*_param,
|
@@ -1003,8 +1278,14 @@ class AlertApi:
|
|
1003
1278
|
|
1004
1279
|
|
1005
1280
|
@validate_call
|
1006
|
-
def
|
1281
|
+
def list_alert_messages_without_preload_content(
|
1007
1282
|
self,
|
1283
|
+
alert_type: Optional[StrictStr] = None,
|
1284
|
+
status: Optional[StrictStr] = None,
|
1285
|
+
severity: Optional[StrictStr] = None,
|
1286
|
+
start_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
1287
|
+
end_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
1288
|
+
limit: Optional[StrictInt] = None,
|
1008
1289
|
_request_timeout: Union[
|
1009
1290
|
None,
|
1010
1291
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1018,9 +1299,22 @@ class AlertApi:
|
|
1018
1299
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1019
1300
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1020
1301
|
) -> RESTResponseType:
|
1021
|
-
"""
|
1302
|
+
"""list_alert_messages
|
1022
1303
|
|
1304
|
+
List all alert messages
|
1023
1305
|
|
1306
|
+
:param alert_type:
|
1307
|
+
:type alert_type: str
|
1308
|
+
:param status:
|
1309
|
+
:type status: str
|
1310
|
+
:param severity:
|
1311
|
+
:type severity: str
|
1312
|
+
:param start_time: format with \"2023-02-21-11-56-30\"
|
1313
|
+
:type start_time: str
|
1314
|
+
:param end_time: format with \"2023-02-21-11-56-30\"
|
1315
|
+
:type end_time: str
|
1316
|
+
:param limit:
|
1317
|
+
:type limit: int
|
1024
1318
|
:param _request_timeout: timeout setting for this request. If one
|
1025
1319
|
number provided, it will be total request
|
1026
1320
|
timeout. It can also be a pair (tuple) of
|
@@ -1043,7 +1337,13 @@ class AlertApi:
|
|
1043
1337
|
:return: Returns the result object.
|
1044
1338
|
""" # noqa: E501
|
1045
1339
|
|
1046
|
-
_param = self.
|
1340
|
+
_param = self._list_alert_messages_serialize(
|
1341
|
+
alert_type=alert_type,
|
1342
|
+
status=status,
|
1343
|
+
severity=severity,
|
1344
|
+
start_time=start_time,
|
1345
|
+
end_time=end_time,
|
1346
|
+
limit=limit,
|
1047
1347
|
_request_auth=_request_auth,
|
1048
1348
|
_content_type=_content_type,
|
1049
1349
|
_headers=_headers,
|
@@ -1051,7 +1351,8 @@ class AlertApi:
|
|
1051
1351
|
)
|
1052
1352
|
|
1053
1353
|
_response_types_map: Dict[str, Optional[str]] = {
|
1054
|
-
'200': "List[
|
1354
|
+
'200': "List[GetAlertMessageResponse]",
|
1355
|
+
'500': "Error",
|
1055
1356
|
}
|
1056
1357
|
response_data = self.api_client.call_api(
|
1057
1358
|
*_param,
|
@@ -1060,8 +1361,14 @@ class AlertApi:
|
|
1060
1361
|
return response_data.response
|
1061
1362
|
|
1062
1363
|
|
1063
|
-
def
|
1364
|
+
def _list_alert_messages_serialize(
|
1064
1365
|
self,
|
1366
|
+
alert_type,
|
1367
|
+
status,
|
1368
|
+
severity,
|
1369
|
+
start_time,
|
1370
|
+
end_time,
|
1371
|
+
limit,
|
1065
1372
|
_request_auth,
|
1066
1373
|
_content_type,
|
1067
1374
|
_headers,
|
@@ -1077,22 +1384,47 @@ class AlertApi:
|
|
1077
1384
|
_query_params: List[Tuple[str, str]] = []
|
1078
1385
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1079
1386
|
_form_params: List[Tuple[str, str]] = []
|
1080
|
-
_files: Dict[str, str] = {}
|
1387
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1081
1388
|
_body_params: Optional[bytes] = None
|
1082
1389
|
|
1083
1390
|
# process the path parameters
|
1084
1391
|
# process the query parameters
|
1392
|
+
if alert_type is not None:
|
1393
|
+
|
1394
|
+
_query_params.append(('alert_type', alert_type))
|
1395
|
+
|
1396
|
+
if status is not None:
|
1397
|
+
|
1398
|
+
_query_params.append(('status', status))
|
1399
|
+
|
1400
|
+
if severity is not None:
|
1401
|
+
|
1402
|
+
_query_params.append(('severity', severity))
|
1403
|
+
|
1404
|
+
if start_time is not None:
|
1405
|
+
|
1406
|
+
_query_params.append(('start_time', start_time))
|
1407
|
+
|
1408
|
+
if end_time is not None:
|
1409
|
+
|
1410
|
+
_query_params.append(('end_time', end_time))
|
1411
|
+
|
1412
|
+
if limit is not None:
|
1413
|
+
|
1414
|
+
_query_params.append(('limit', limit))
|
1415
|
+
|
1085
1416
|
# process the header parameters
|
1086
1417
|
# process the form parameters
|
1087
1418
|
# process the body parameter
|
1088
1419
|
|
1089
1420
|
|
1090
1421
|
# set the HTTP header `Accept`
|
1091
|
-
|
1092
|
-
[
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1422
|
+
if 'Accept' not in _header_params:
|
1423
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1424
|
+
[
|
1425
|
+
'application/json'
|
1426
|
+
]
|
1427
|
+
)
|
1096
1428
|
|
1097
1429
|
|
1098
1430
|
# authentication setting
|
@@ -1101,7 +1433,7 @@ class AlertApi:
|
|
1101
1433
|
|
1102
1434
|
return self.api_client.param_serialize(
|
1103
1435
|
method='GET',
|
1104
|
-
resource_path='/api/v1/alert/
|
1436
|
+
resource_path='/api/v1/alert/message',
|
1105
1437
|
path_params=_path_params,
|
1106
1438
|
query_params=_query_params,
|
1107
1439
|
header_params=_header_params,
|
@@ -1118,7 +1450,7 @@ class AlertApi:
|
|
1118
1450
|
|
1119
1451
|
|
1120
1452
|
@validate_call
|
1121
|
-
def
|
1453
|
+
def list_alert_receivers(
|
1122
1454
|
self,
|
1123
1455
|
_request_timeout: Union[
|
1124
1456
|
None,
|
@@ -1132,9 +1464,10 @@ class AlertApi:
|
|
1132
1464
|
_content_type: Optional[StrictStr] = None,
|
1133
1465
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1134
1466
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1135
|
-
) -> List[
|
1136
|
-
"""
|
1467
|
+
) -> List[GetAlertReceiverResponse]:
|
1468
|
+
"""list_alert_receivers
|
1137
1469
|
|
1470
|
+
List all alert receivers
|
1138
1471
|
|
1139
1472
|
:param _request_timeout: timeout setting for this request. If one
|
1140
1473
|
number provided, it will be total request
|
@@ -1158,7 +1491,7 @@ class AlertApi:
|
|
1158
1491
|
:return: Returns the result object.
|
1159
1492
|
""" # noqa: E501
|
1160
1493
|
|
1161
|
-
_param = self.
|
1494
|
+
_param = self._list_alert_receivers_serialize(
|
1162
1495
|
_request_auth=_request_auth,
|
1163
1496
|
_content_type=_content_type,
|
1164
1497
|
_headers=_headers,
|
@@ -1166,7 +1499,8 @@ class AlertApi:
|
|
1166
1499
|
)
|
1167
1500
|
|
1168
1501
|
_response_types_map: Dict[str, Optional[str]] = {
|
1169
|
-
'200': "List[
|
1502
|
+
'200': "List[GetAlertReceiverResponse]",
|
1503
|
+
'500': "Error",
|
1170
1504
|
}
|
1171
1505
|
response_data = self.api_client.call_api(
|
1172
1506
|
*_param,
|
@@ -1180,7 +1514,7 @@ class AlertApi:
|
|
1180
1514
|
|
1181
1515
|
|
1182
1516
|
@validate_call
|
1183
|
-
def
|
1517
|
+
def list_alert_receivers_with_http_info(
|
1184
1518
|
self,
|
1185
1519
|
_request_timeout: Union[
|
1186
1520
|
None,
|
@@ -1194,9 +1528,10 @@ class AlertApi:
|
|
1194
1528
|
_content_type: Optional[StrictStr] = None,
|
1195
1529
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1196
1530
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1197
|
-
) -> ApiResponse[List[
|
1198
|
-
"""
|
1531
|
+
) -> ApiResponse[List[GetAlertReceiverResponse]]:
|
1532
|
+
"""list_alert_receivers
|
1199
1533
|
|
1534
|
+
List all alert receivers
|
1200
1535
|
|
1201
1536
|
:param _request_timeout: timeout setting for this request. If one
|
1202
1537
|
number provided, it will be total request
|
@@ -1220,7 +1555,7 @@ class AlertApi:
|
|
1220
1555
|
:return: Returns the result object.
|
1221
1556
|
""" # noqa: E501
|
1222
1557
|
|
1223
|
-
_param = self.
|
1558
|
+
_param = self._list_alert_receivers_serialize(
|
1224
1559
|
_request_auth=_request_auth,
|
1225
1560
|
_content_type=_content_type,
|
1226
1561
|
_headers=_headers,
|
@@ -1228,7 +1563,8 @@ class AlertApi:
|
|
1228
1563
|
)
|
1229
1564
|
|
1230
1565
|
_response_types_map: Dict[str, Optional[str]] = {
|
1231
|
-
'200': "List[
|
1566
|
+
'200': "List[GetAlertReceiverResponse]",
|
1567
|
+
'500': "Error",
|
1232
1568
|
}
|
1233
1569
|
response_data = self.api_client.call_api(
|
1234
1570
|
*_param,
|
@@ -1242,7 +1578,7 @@ class AlertApi:
|
|
1242
1578
|
|
1243
1579
|
|
1244
1580
|
@validate_call
|
1245
|
-
def
|
1581
|
+
def list_alert_receivers_without_preload_content(
|
1246
1582
|
self,
|
1247
1583
|
_request_timeout: Union[
|
1248
1584
|
None,
|
@@ -1257,8 +1593,9 @@ class AlertApi:
|
|
1257
1593
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1258
1594
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1259
1595
|
) -> RESTResponseType:
|
1260
|
-
"""
|
1596
|
+
"""list_alert_receivers
|
1261
1597
|
|
1598
|
+
List all alert receivers
|
1262
1599
|
|
1263
1600
|
:param _request_timeout: timeout setting for this request. If one
|
1264
1601
|
number provided, it will be total request
|
@@ -1282,7 +1619,7 @@ class AlertApi:
|
|
1282
1619
|
:return: Returns the result object.
|
1283
1620
|
""" # noqa: E501
|
1284
1621
|
|
1285
|
-
_param = self.
|
1622
|
+
_param = self._list_alert_receivers_serialize(
|
1286
1623
|
_request_auth=_request_auth,
|
1287
1624
|
_content_type=_content_type,
|
1288
1625
|
_headers=_headers,
|
@@ -1290,7 +1627,8 @@ class AlertApi:
|
|
1290
1627
|
)
|
1291
1628
|
|
1292
1629
|
_response_types_map: Dict[str, Optional[str]] = {
|
1293
|
-
'200': "List[
|
1630
|
+
'200': "List[GetAlertReceiverResponse]",
|
1631
|
+
'500': "Error",
|
1294
1632
|
}
|
1295
1633
|
response_data = self.api_client.call_api(
|
1296
1634
|
*_param,
|
@@ -1299,7 +1637,7 @@ class AlertApi:
|
|
1299
1637
|
return response_data.response
|
1300
1638
|
|
1301
1639
|
|
1302
|
-
def
|
1640
|
+
def _list_alert_receivers_serialize(
|
1303
1641
|
self,
|
1304
1642
|
_request_auth,
|
1305
1643
|
_content_type,
|
@@ -1316,7 +1654,7 @@ class AlertApi:
|
|
1316
1654
|
_query_params: List[Tuple[str, str]] = []
|
1317
1655
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1318
1656
|
_form_params: List[Tuple[str, str]] = []
|
1319
|
-
_files: Dict[str, str] = {}
|
1657
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1320
1658
|
_body_params: Optional[bytes] = None
|
1321
1659
|
|
1322
1660
|
# process the path parameters
|
@@ -1327,11 +1665,12 @@ class AlertApi:
|
|
1327
1665
|
|
1328
1666
|
|
1329
1667
|
# set the HTTP header `Accept`
|
1330
|
-
|
1331
|
-
[
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1668
|
+
if 'Accept' not in _header_params:
|
1669
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1670
|
+
[
|
1671
|
+
'application/json'
|
1672
|
+
]
|
1673
|
+
)
|
1335
1674
|
|
1336
1675
|
|
1337
1676
|
# authentication setting
|
@@ -1357,9 +1696,8 @@ class AlertApi:
|
|
1357
1696
|
|
1358
1697
|
|
1359
1698
|
@validate_call
|
1360
|
-
def
|
1699
|
+
def list_alert_rules(
|
1361
1700
|
self,
|
1362
|
-
alert_receiver: AlertReceiver,
|
1363
1701
|
_request_timeout: Union[
|
1364
1702
|
None,
|
1365
1703
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1372,12 +1710,11 @@ class AlertApi:
|
|
1372
1710
|
_content_type: Optional[StrictStr] = None,
|
1373
1711
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1374
1712
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1375
|
-
) ->
|
1376
|
-
"""
|
1713
|
+
) -> List[GetAlertRuleResponse]:
|
1714
|
+
"""list_alert_rules
|
1377
1715
|
|
1716
|
+
List all alert rules
|
1378
1717
|
|
1379
|
-
:param alert_receiver: (required)
|
1380
|
-
:type alert_receiver: AlertReceiver
|
1381
1718
|
:param _request_timeout: timeout setting for this request. If one
|
1382
1719
|
number provided, it will be total request
|
1383
1720
|
timeout. It can also be a pair (tuple) of
|
@@ -1400,8 +1737,7 @@ class AlertApi:
|
|
1400
1737
|
:return: Returns the result object.
|
1401
1738
|
""" # noqa: E501
|
1402
1739
|
|
1403
|
-
_param = self.
|
1404
|
-
alert_receiver=alert_receiver,
|
1740
|
+
_param = self._list_alert_rules_serialize(
|
1405
1741
|
_request_auth=_request_auth,
|
1406
1742
|
_content_type=_content_type,
|
1407
1743
|
_headers=_headers,
|
@@ -1409,7 +1745,8 @@ class AlertApi:
|
|
1409
1745
|
)
|
1410
1746
|
|
1411
1747
|
_response_types_map: Dict[str, Optional[str]] = {
|
1412
|
-
'200': "
|
1748
|
+
'200': "List[GetAlertRuleResponse]",
|
1749
|
+
'500': "Error",
|
1413
1750
|
}
|
1414
1751
|
response_data = self.api_client.call_api(
|
1415
1752
|
*_param,
|
@@ -1423,9 +1760,8 @@ class AlertApi:
|
|
1423
1760
|
|
1424
1761
|
|
1425
1762
|
@validate_call
|
1426
|
-
def
|
1763
|
+
def list_alert_rules_with_http_info(
|
1427
1764
|
self,
|
1428
|
-
alert_receiver: AlertReceiver,
|
1429
1765
|
_request_timeout: Union[
|
1430
1766
|
None,
|
1431
1767
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1438,12 +1774,11 @@ class AlertApi:
|
|
1438
1774
|
_content_type: Optional[StrictStr] = None,
|
1439
1775
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1440
1776
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1441
|
-
) -> ApiResponse[
|
1442
|
-
"""
|
1777
|
+
) -> ApiResponse[List[GetAlertRuleResponse]]:
|
1778
|
+
"""list_alert_rules
|
1443
1779
|
|
1780
|
+
List all alert rules
|
1444
1781
|
|
1445
|
-
:param alert_receiver: (required)
|
1446
|
-
:type alert_receiver: AlertReceiver
|
1447
1782
|
:param _request_timeout: timeout setting for this request. If one
|
1448
1783
|
number provided, it will be total request
|
1449
1784
|
timeout. It can also be a pair (tuple) of
|
@@ -1466,8 +1801,7 @@ class AlertApi:
|
|
1466
1801
|
:return: Returns the result object.
|
1467
1802
|
""" # noqa: E501
|
1468
1803
|
|
1469
|
-
_param = self.
|
1470
|
-
alert_receiver=alert_receiver,
|
1804
|
+
_param = self._list_alert_rules_serialize(
|
1471
1805
|
_request_auth=_request_auth,
|
1472
1806
|
_content_type=_content_type,
|
1473
1807
|
_headers=_headers,
|
@@ -1475,7 +1809,8 @@ class AlertApi:
|
|
1475
1809
|
)
|
1476
1810
|
|
1477
1811
|
_response_types_map: Dict[str, Optional[str]] = {
|
1478
|
-
'200': "
|
1812
|
+
'200': "List[GetAlertRuleResponse]",
|
1813
|
+
'500': "Error",
|
1479
1814
|
}
|
1480
1815
|
response_data = self.api_client.call_api(
|
1481
1816
|
*_param,
|
@@ -1489,9 +1824,8 @@ class AlertApi:
|
|
1489
1824
|
|
1490
1825
|
|
1491
1826
|
@validate_call
|
1492
|
-
def
|
1827
|
+
def list_alert_rules_without_preload_content(
|
1493
1828
|
self,
|
1494
|
-
alert_receiver: AlertReceiver,
|
1495
1829
|
_request_timeout: Union[
|
1496
1830
|
None,
|
1497
1831
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1505,11 +1839,10 @@ class AlertApi:
|
|
1505
1839
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1506
1840
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1507
1841
|
) -> RESTResponseType:
|
1508
|
-
"""
|
1842
|
+
"""list_alert_rules
|
1509
1843
|
|
1844
|
+
List all alert rules
|
1510
1845
|
|
1511
|
-
:param alert_receiver: (required)
|
1512
|
-
:type alert_receiver: AlertReceiver
|
1513
1846
|
:param _request_timeout: timeout setting for this request. If one
|
1514
1847
|
number provided, it will be total request
|
1515
1848
|
timeout. It can also be a pair (tuple) of
|
@@ -1532,8 +1865,7 @@ class AlertApi:
|
|
1532
1865
|
:return: Returns the result object.
|
1533
1866
|
""" # noqa: E501
|
1534
1867
|
|
1535
|
-
_param = self.
|
1536
|
-
alert_receiver=alert_receiver,
|
1868
|
+
_param = self._list_alert_rules_serialize(
|
1537
1869
|
_request_auth=_request_auth,
|
1538
1870
|
_content_type=_content_type,
|
1539
1871
|
_headers=_headers,
|
@@ -1541,7 +1873,8 @@ class AlertApi:
|
|
1541
1873
|
)
|
1542
1874
|
|
1543
1875
|
_response_types_map: Dict[str, Optional[str]] = {
|
1544
|
-
'200': "
|
1876
|
+
'200': "List[GetAlertRuleResponse]",
|
1877
|
+
'500': "Error",
|
1545
1878
|
}
|
1546
1879
|
response_data = self.api_client.call_api(
|
1547
1880
|
*_param,
|
@@ -1550,9 +1883,8 @@ class AlertApi:
|
|
1550
1883
|
return response_data.response
|
1551
1884
|
|
1552
1885
|
|
1553
|
-
def
|
1886
|
+
def _list_alert_rules_serialize(
|
1554
1887
|
self,
|
1555
|
-
alert_receiver,
|
1556
1888
|
_request_auth,
|
1557
1889
|
_content_type,
|
1558
1890
|
_headers,
|
@@ -1568,7 +1900,7 @@ class AlertApi:
|
|
1568
1900
|
_query_params: List[Tuple[str, str]] = []
|
1569
1901
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1570
1902
|
_form_params: List[Tuple[str, str]] = []
|
1571
|
-
_files: Dict[str, str] = {}
|
1903
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1572
1904
|
_body_params: Optional[bytes] = None
|
1573
1905
|
|
1574
1906
|
# process the path parameters
|
@@ -1576,38 +1908,24 @@ class AlertApi:
|
|
1576
1908
|
# process the header parameters
|
1577
1909
|
# process the form parameters
|
1578
1910
|
# process the body parameter
|
1579
|
-
if alert_receiver is not None:
|
1580
|
-
_body_params = alert_receiver
|
1581
1911
|
|
1582
1912
|
|
1583
1913
|
# set the HTTP header `Accept`
|
1584
|
-
|
1585
|
-
[
|
1586
|
-
|
1587
|
-
|
1588
|
-
|
1589
|
-
|
1590
|
-
# set the HTTP header `Content-Type`
|
1591
|
-
if _content_type:
|
1592
|
-
_header_params['Content-Type'] = _content_type
|
1593
|
-
else:
|
1594
|
-
_default_content_type = (
|
1595
|
-
self.api_client.select_header_content_type(
|
1596
|
-
[
|
1597
|
-
'application/json'
|
1598
|
-
]
|
1599
|
-
)
|
1914
|
+
if 'Accept' not in _header_params:
|
1915
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1916
|
+
[
|
1917
|
+
'application/json'
|
1918
|
+
]
|
1600
1919
|
)
|
1601
|
-
|
1602
|
-
_header_params['Content-Type'] = _default_content_type
|
1920
|
+
|
1603
1921
|
|
1604
1922
|
# authentication setting
|
1605
1923
|
_auth_settings: List[str] = [
|
1606
1924
|
]
|
1607
1925
|
|
1608
1926
|
return self.api_client.param_serialize(
|
1609
|
-
method='
|
1610
|
-
resource_path='/api/v1/alert/
|
1927
|
+
method='GET',
|
1928
|
+
resource_path='/api/v1/alert/rule',
|
1611
1929
|
path_params=_path_params,
|
1612
1930
|
query_params=_query_params,
|
1613
1931
|
header_params=_header_params,
|
@@ -1624,9 +1942,9 @@ class AlertApi:
|
|
1624
1942
|
|
1625
1943
|
|
1626
1944
|
@validate_call
|
1627
|
-
def
|
1945
|
+
def update_alert_message_in_batch(
|
1628
1946
|
self,
|
1629
|
-
|
1947
|
+
update_alert_message_status_request: Optional[UpdateAlertMessageStatusRequest] = None,
|
1630
1948
|
_request_timeout: Union[
|
1631
1949
|
None,
|
1632
1950
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1640,12 +1958,12 @@ class AlertApi:
|
|
1640
1958
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1641
1959
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1642
1960
|
) -> str:
|
1643
|
-
"""
|
1961
|
+
"""update_alert_message_in_batch
|
1644
1962
|
|
1645
|
-
Update
|
1963
|
+
Update the message status in batch
|
1646
1964
|
|
1647
|
-
:param
|
1648
|
-
:type
|
1965
|
+
:param update_alert_message_status_request:
|
1966
|
+
:type update_alert_message_status_request: UpdateAlertMessageStatusRequest
|
1649
1967
|
:param _request_timeout: timeout setting for this request. If one
|
1650
1968
|
number provided, it will be total request
|
1651
1969
|
timeout. It can also be a pair (tuple) of
|
@@ -1668,8 +1986,8 @@ class AlertApi:
|
|
1668
1986
|
:return: Returns the result object.
|
1669
1987
|
""" # noqa: E501
|
1670
1988
|
|
1671
|
-
_param = self.
|
1672
|
-
|
1989
|
+
_param = self._update_alert_message_in_batch_serialize(
|
1990
|
+
update_alert_message_status_request=update_alert_message_status_request,
|
1673
1991
|
_request_auth=_request_auth,
|
1674
1992
|
_content_type=_content_type,
|
1675
1993
|
_headers=_headers,
|
@@ -1678,7 +1996,7 @@ class AlertApi:
|
|
1678
1996
|
|
1679
1997
|
_response_types_map: Dict[str, Optional[str]] = {
|
1680
1998
|
'200': "str",
|
1681
|
-
'
|
1999
|
+
'500': "Error",
|
1682
2000
|
}
|
1683
2001
|
response_data = self.api_client.call_api(
|
1684
2002
|
*_param,
|
@@ -1692,9 +2010,9 @@ class AlertApi:
|
|
1692
2010
|
|
1693
2011
|
|
1694
2012
|
@validate_call
|
1695
|
-
def
|
2013
|
+
def update_alert_message_in_batch_with_http_info(
|
1696
2014
|
self,
|
1697
|
-
|
2015
|
+
update_alert_message_status_request: Optional[UpdateAlertMessageStatusRequest] = None,
|
1698
2016
|
_request_timeout: Union[
|
1699
2017
|
None,
|
1700
2018
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1708,12 +2026,12 @@ class AlertApi:
|
|
1708
2026
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1709
2027
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1710
2028
|
) -> ApiResponse[str]:
|
1711
|
-
"""
|
2029
|
+
"""update_alert_message_in_batch
|
1712
2030
|
|
1713
|
-
Update
|
2031
|
+
Update the message status in batch
|
1714
2032
|
|
1715
|
-
:param
|
1716
|
-
:type
|
2033
|
+
:param update_alert_message_status_request:
|
2034
|
+
:type update_alert_message_status_request: UpdateAlertMessageStatusRequest
|
1717
2035
|
:param _request_timeout: timeout setting for this request. If one
|
1718
2036
|
number provided, it will be total request
|
1719
2037
|
timeout. It can also be a pair (tuple) of
|
@@ -1736,8 +2054,8 @@ class AlertApi:
|
|
1736
2054
|
:return: Returns the result object.
|
1737
2055
|
""" # noqa: E501
|
1738
2056
|
|
1739
|
-
_param = self.
|
1740
|
-
|
2057
|
+
_param = self._update_alert_message_in_batch_serialize(
|
2058
|
+
update_alert_message_status_request=update_alert_message_status_request,
|
1741
2059
|
_request_auth=_request_auth,
|
1742
2060
|
_content_type=_content_type,
|
1743
2061
|
_headers=_headers,
|
@@ -1746,7 +2064,7 @@ class AlertApi:
|
|
1746
2064
|
|
1747
2065
|
_response_types_map: Dict[str, Optional[str]] = {
|
1748
2066
|
'200': "str",
|
1749
|
-
'
|
2067
|
+
'500': "Error",
|
1750
2068
|
}
|
1751
2069
|
response_data = self.api_client.call_api(
|
1752
2070
|
*_param,
|
@@ -1760,9 +2078,9 @@ class AlertApi:
|
|
1760
2078
|
|
1761
2079
|
|
1762
2080
|
@validate_call
|
1763
|
-
def
|
2081
|
+
def update_alert_message_in_batch_without_preload_content(
|
1764
2082
|
self,
|
1765
|
-
|
2083
|
+
update_alert_message_status_request: Optional[UpdateAlertMessageStatusRequest] = None,
|
1766
2084
|
_request_timeout: Union[
|
1767
2085
|
None,
|
1768
2086
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1776,12 +2094,12 @@ class AlertApi:
|
|
1776
2094
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1777
2095
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1778
2096
|
) -> RESTResponseType:
|
1779
|
-
"""
|
2097
|
+
"""update_alert_message_in_batch
|
1780
2098
|
|
1781
|
-
Update
|
2099
|
+
Update the message status in batch
|
1782
2100
|
|
1783
|
-
:param
|
1784
|
-
:type
|
2101
|
+
:param update_alert_message_status_request:
|
2102
|
+
:type update_alert_message_status_request: UpdateAlertMessageStatusRequest
|
1785
2103
|
:param _request_timeout: timeout setting for this request. If one
|
1786
2104
|
number provided, it will be total request
|
1787
2105
|
timeout. It can also be a pair (tuple) of
|
@@ -1804,8 +2122,8 @@ class AlertApi:
|
|
1804
2122
|
:return: Returns the result object.
|
1805
2123
|
""" # noqa: E501
|
1806
2124
|
|
1807
|
-
_param = self.
|
1808
|
-
|
2125
|
+
_param = self._update_alert_message_in_batch_serialize(
|
2126
|
+
update_alert_message_status_request=update_alert_message_status_request,
|
1809
2127
|
_request_auth=_request_auth,
|
1810
2128
|
_content_type=_content_type,
|
1811
2129
|
_headers=_headers,
|
@@ -1814,7 +2132,7 @@ class AlertApi:
|
|
1814
2132
|
|
1815
2133
|
_response_types_map: Dict[str, Optional[str]] = {
|
1816
2134
|
'200': "str",
|
1817
|
-
'
|
2135
|
+
'500': "Error",
|
1818
2136
|
}
|
1819
2137
|
response_data = self.api_client.call_api(
|
1820
2138
|
*_param,
|
@@ -1823,9 +2141,9 @@ class AlertApi:
|
|
1823
2141
|
return response_data.response
|
1824
2142
|
|
1825
2143
|
|
1826
|
-
def
|
2144
|
+
def _update_alert_message_in_batch_serialize(
|
1827
2145
|
self,
|
1828
|
-
|
2146
|
+
update_alert_message_status_request,
|
1829
2147
|
_request_auth,
|
1830
2148
|
_content_type,
|
1831
2149
|
_headers,
|
@@ -1841,7 +2159,7 @@ class AlertApi:
|
|
1841
2159
|
_query_params: List[Tuple[str, str]] = []
|
1842
2160
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1843
2161
|
_form_params: List[Tuple[str, str]] = []
|
1844
|
-
_files: Dict[str, str] = {}
|
2162
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1845
2163
|
_body_params: Optional[bytes] = None
|
1846
2164
|
|
1847
2165
|
# process the path parameters
|
@@ -1849,16 +2167,17 @@ class AlertApi:
|
|
1849
2167
|
# process the header parameters
|
1850
2168
|
# process the form parameters
|
1851
2169
|
# process the body parameter
|
1852
|
-
if
|
1853
|
-
_body_params =
|
2170
|
+
if update_alert_message_status_request is not None:
|
2171
|
+
_body_params = update_alert_message_status_request
|
1854
2172
|
|
1855
2173
|
|
1856
2174
|
# set the HTTP header `Accept`
|
1857
|
-
|
1858
|
-
[
|
1859
|
-
|
1860
|
-
|
1861
|
-
|
2175
|
+
if 'Accept' not in _header_params:
|
2176
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2177
|
+
[
|
2178
|
+
'application/json'
|
2179
|
+
]
|
2180
|
+
)
|
1862
2181
|
|
1863
2182
|
# set the HTTP header `Content-Type`
|
1864
2183
|
if _content_type:
|
@@ -1880,7 +2199,7 @@ class AlertApi:
|
|
1880
2199
|
|
1881
2200
|
return self.api_client.param_serialize(
|
1882
2201
|
method='PUT',
|
1883
|
-
resource_path='/api/v1/alert/message',
|
2202
|
+
resource_path='/api/v1/alert/message-collection/status',
|
1884
2203
|
path_params=_path_params,
|
1885
2204
|
query_params=_query_params,
|
1886
2205
|
header_params=_header_params,
|
@@ -1897,10 +2216,10 @@ class AlertApi:
|
|
1897
2216
|
|
1898
2217
|
|
1899
2218
|
@validate_call
|
1900
|
-
def
|
2219
|
+
def update_alert_receiver_by_id(
|
1901
2220
|
self,
|
1902
|
-
|
1903
|
-
|
2221
|
+
receiver_id: StrictStr,
|
2222
|
+
create_alert_receiver_request: Optional[CreateAlertReceiverRequest] = None,
|
1904
2223
|
_request_timeout: Union[
|
1905
2224
|
None,
|
1906
2225
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1914,13 +2233,14 @@ class AlertApi:
|
|
1914
2233
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1915
2234
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1916
2235
|
) -> str:
|
1917
|
-
"""
|
2236
|
+
"""update_alert_receiver_by_id
|
1918
2237
|
|
2238
|
+
Update alert receiver by ID
|
1919
2239
|
|
1920
|
-
:param
|
1921
|
-
:type
|
1922
|
-
:param
|
1923
|
-
:type
|
2240
|
+
:param receiver_id: (required)
|
2241
|
+
:type receiver_id: str
|
2242
|
+
:param create_alert_receiver_request:
|
2243
|
+
:type create_alert_receiver_request: CreateAlertReceiverRequest
|
1924
2244
|
:param _request_timeout: timeout setting for this request. If one
|
1925
2245
|
number provided, it will be total request
|
1926
2246
|
timeout. It can also be a pair (tuple) of
|
@@ -1943,9 +2263,9 @@ class AlertApi:
|
|
1943
2263
|
:return: Returns the result object.
|
1944
2264
|
""" # noqa: E501
|
1945
2265
|
|
1946
|
-
_param = self.
|
1947
|
-
|
1948
|
-
|
2266
|
+
_param = self._update_alert_receiver_by_id_serialize(
|
2267
|
+
receiver_id=receiver_id,
|
2268
|
+
create_alert_receiver_request=create_alert_receiver_request,
|
1949
2269
|
_request_auth=_request_auth,
|
1950
2270
|
_content_type=_content_type,
|
1951
2271
|
_headers=_headers,
|
@@ -1954,6 +2274,7 @@ class AlertApi:
|
|
1954
2274
|
|
1955
2275
|
_response_types_map: Dict[str, Optional[str]] = {
|
1956
2276
|
'200': "str",
|
2277
|
+
'500': "Error",
|
1957
2278
|
}
|
1958
2279
|
response_data = self.api_client.call_api(
|
1959
2280
|
*_param,
|
@@ -1967,10 +2288,10 @@ class AlertApi:
|
|
1967
2288
|
|
1968
2289
|
|
1969
2290
|
@validate_call
|
1970
|
-
def
|
2291
|
+
def update_alert_receiver_by_id_with_http_info(
|
1971
2292
|
self,
|
1972
|
-
|
1973
|
-
|
2293
|
+
receiver_id: StrictStr,
|
2294
|
+
create_alert_receiver_request: Optional[CreateAlertReceiverRequest] = None,
|
1974
2295
|
_request_timeout: Union[
|
1975
2296
|
None,
|
1976
2297
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1984,13 +2305,14 @@ class AlertApi:
|
|
1984
2305
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1985
2306
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1986
2307
|
) -> ApiResponse[str]:
|
1987
|
-
"""
|
2308
|
+
"""update_alert_receiver_by_id
|
1988
2309
|
|
2310
|
+
Update alert receiver by ID
|
1989
2311
|
|
1990
|
-
:param
|
1991
|
-
:type
|
1992
|
-
:param
|
1993
|
-
:type
|
2312
|
+
:param receiver_id: (required)
|
2313
|
+
:type receiver_id: str
|
2314
|
+
:param create_alert_receiver_request:
|
2315
|
+
:type create_alert_receiver_request: CreateAlertReceiverRequest
|
1994
2316
|
:param _request_timeout: timeout setting for this request. If one
|
1995
2317
|
number provided, it will be total request
|
1996
2318
|
timeout. It can also be a pair (tuple) of
|
@@ -2013,9 +2335,9 @@ class AlertApi:
|
|
2013
2335
|
:return: Returns the result object.
|
2014
2336
|
""" # noqa: E501
|
2015
2337
|
|
2016
|
-
_param = self.
|
2017
|
-
|
2018
|
-
|
2338
|
+
_param = self._update_alert_receiver_by_id_serialize(
|
2339
|
+
receiver_id=receiver_id,
|
2340
|
+
create_alert_receiver_request=create_alert_receiver_request,
|
2019
2341
|
_request_auth=_request_auth,
|
2020
2342
|
_content_type=_content_type,
|
2021
2343
|
_headers=_headers,
|
@@ -2024,6 +2346,7 @@ class AlertApi:
|
|
2024
2346
|
|
2025
2347
|
_response_types_map: Dict[str, Optional[str]] = {
|
2026
2348
|
'200': "str",
|
2349
|
+
'500': "Error",
|
2027
2350
|
}
|
2028
2351
|
response_data = self.api_client.call_api(
|
2029
2352
|
*_param,
|
@@ -2037,10 +2360,10 @@ class AlertApi:
|
|
2037
2360
|
|
2038
2361
|
|
2039
2362
|
@validate_call
|
2040
|
-
def
|
2363
|
+
def update_alert_receiver_by_id_without_preload_content(
|
2041
2364
|
self,
|
2042
|
-
|
2043
|
-
|
2365
|
+
receiver_id: StrictStr,
|
2366
|
+
create_alert_receiver_request: Optional[CreateAlertReceiverRequest] = None,
|
2044
2367
|
_request_timeout: Union[
|
2045
2368
|
None,
|
2046
2369
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -2054,13 +2377,14 @@ class AlertApi:
|
|
2054
2377
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2055
2378
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2056
2379
|
) -> RESTResponseType:
|
2057
|
-
"""
|
2380
|
+
"""update_alert_receiver_by_id
|
2058
2381
|
|
2382
|
+
Update alert receiver by ID
|
2059
2383
|
|
2060
|
-
:param
|
2061
|
-
:type
|
2062
|
-
:param
|
2063
|
-
:type
|
2384
|
+
:param receiver_id: (required)
|
2385
|
+
:type receiver_id: str
|
2386
|
+
:param create_alert_receiver_request:
|
2387
|
+
:type create_alert_receiver_request: CreateAlertReceiverRequest
|
2064
2388
|
:param _request_timeout: timeout setting for this request. If one
|
2065
2389
|
number provided, it will be total request
|
2066
2390
|
timeout. It can also be a pair (tuple) of
|
@@ -2083,9 +2407,9 @@ class AlertApi:
|
|
2083
2407
|
:return: Returns the result object.
|
2084
2408
|
""" # noqa: E501
|
2085
2409
|
|
2086
|
-
_param = self.
|
2087
|
-
|
2088
|
-
|
2410
|
+
_param = self._update_alert_receiver_by_id_serialize(
|
2411
|
+
receiver_id=receiver_id,
|
2412
|
+
create_alert_receiver_request=create_alert_receiver_request,
|
2089
2413
|
_request_auth=_request_auth,
|
2090
2414
|
_content_type=_content_type,
|
2091
2415
|
_headers=_headers,
|
@@ -2094,6 +2418,7 @@ class AlertApi:
|
|
2094
2418
|
|
2095
2419
|
_response_types_map: Dict[str, Optional[str]] = {
|
2096
2420
|
'200': "str",
|
2421
|
+
'500': "Error",
|
2097
2422
|
}
|
2098
2423
|
response_data = self.api_client.call_api(
|
2099
2424
|
*_param,
|
@@ -2102,10 +2427,10 @@ class AlertApi:
|
|
2102
2427
|
return response_data.response
|
2103
2428
|
|
2104
2429
|
|
2105
|
-
def
|
2430
|
+
def _update_alert_receiver_by_id_serialize(
|
2106
2431
|
self,
|
2107
|
-
|
2108
|
-
|
2432
|
+
receiver_id,
|
2433
|
+
create_alert_receiver_request,
|
2109
2434
|
_request_auth,
|
2110
2435
|
_content_type,
|
2111
2436
|
_headers,
|
@@ -2121,26 +2446,27 @@ class AlertApi:
|
|
2121
2446
|
_query_params: List[Tuple[str, str]] = []
|
2122
2447
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2123
2448
|
_form_params: List[Tuple[str, str]] = []
|
2124
|
-
_files: Dict[str, str] = {}
|
2449
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
2125
2450
|
_body_params: Optional[bytes] = None
|
2126
2451
|
|
2127
2452
|
# process the path parameters
|
2128
|
-
if
|
2129
|
-
_path_params['
|
2453
|
+
if receiver_id is not None:
|
2454
|
+
_path_params['receiver_id'] = receiver_id
|
2130
2455
|
# process the query parameters
|
2131
2456
|
# process the header parameters
|
2132
2457
|
# process the form parameters
|
2133
2458
|
# process the body parameter
|
2134
|
-
if
|
2135
|
-
_body_params =
|
2459
|
+
if create_alert_receiver_request is not None:
|
2460
|
+
_body_params = create_alert_receiver_request
|
2136
2461
|
|
2137
2462
|
|
2138
2463
|
# set the HTTP header `Accept`
|
2139
|
-
|
2140
|
-
[
|
2141
|
-
|
2142
|
-
|
2143
|
-
|
2464
|
+
if 'Accept' not in _header_params:
|
2465
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2466
|
+
[
|
2467
|
+
'application/json'
|
2468
|
+
]
|
2469
|
+
)
|
2144
2470
|
|
2145
2471
|
# set the HTTP header `Content-Type`
|
2146
2472
|
if _content_type:
|
@@ -2162,7 +2488,7 @@ class AlertApi:
|
|
2162
2488
|
|
2163
2489
|
return self.api_client.param_serialize(
|
2164
2490
|
method='PUT',
|
2165
|
-
resource_path='/api/v1/alert/
|
2491
|
+
resource_path='/api/v1/alert/receiver/{receiver_id}',
|
2166
2492
|
path_params=_path_params,
|
2167
2493
|
query_params=_query_params,
|
2168
2494
|
header_params=_header_params,
|
@@ -2179,10 +2505,10 @@ class AlertApi:
|
|
2179
2505
|
|
2180
2506
|
|
2181
2507
|
@validate_call
|
2182
|
-
def
|
2508
|
+
def update_alert_rule_by_id(
|
2183
2509
|
self,
|
2184
|
-
|
2185
|
-
|
2510
|
+
rule_id: StrictStr,
|
2511
|
+
create_alert_rule_request: Optional[CreateAlertRuleRequest] = None,
|
2186
2512
|
_request_timeout: Union[
|
2187
2513
|
None,
|
2188
2514
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -2196,13 +2522,13 @@ class AlertApi:
|
|
2196
2522
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2197
2523
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2198
2524
|
) -> str:
|
2199
|
-
"""
|
2525
|
+
"""update_alert_rule_by_id
|
2200
2526
|
|
2201
2527
|
|
2202
|
-
:param
|
2203
|
-
:type
|
2204
|
-
:param
|
2205
|
-
:type
|
2528
|
+
:param rule_id: (required)
|
2529
|
+
:type rule_id: str
|
2530
|
+
:param create_alert_rule_request:
|
2531
|
+
:type create_alert_rule_request: CreateAlertRuleRequest
|
2206
2532
|
:param _request_timeout: timeout setting for this request. If one
|
2207
2533
|
number provided, it will be total request
|
2208
2534
|
timeout. It can also be a pair (tuple) of
|
@@ -2225,9 +2551,9 @@ class AlertApi:
|
|
2225
2551
|
:return: Returns the result object.
|
2226
2552
|
""" # noqa: E501
|
2227
2553
|
|
2228
|
-
_param = self.
|
2229
|
-
|
2230
|
-
|
2554
|
+
_param = self._update_alert_rule_by_id_serialize(
|
2555
|
+
rule_id=rule_id,
|
2556
|
+
create_alert_rule_request=create_alert_rule_request,
|
2231
2557
|
_request_auth=_request_auth,
|
2232
2558
|
_content_type=_content_type,
|
2233
2559
|
_headers=_headers,
|
@@ -2236,7 +2562,7 @@ class AlertApi:
|
|
2236
2562
|
|
2237
2563
|
_response_types_map: Dict[str, Optional[str]] = {
|
2238
2564
|
'200': "str",
|
2239
|
-
'
|
2565
|
+
'500': "Error",
|
2240
2566
|
}
|
2241
2567
|
response_data = self.api_client.call_api(
|
2242
2568
|
*_param,
|
@@ -2250,10 +2576,10 @@ class AlertApi:
|
|
2250
2576
|
|
2251
2577
|
|
2252
2578
|
@validate_call
|
2253
|
-
def
|
2579
|
+
def update_alert_rule_by_id_with_http_info(
|
2254
2580
|
self,
|
2255
|
-
|
2256
|
-
|
2581
|
+
rule_id: StrictStr,
|
2582
|
+
create_alert_rule_request: Optional[CreateAlertRuleRequest] = None,
|
2257
2583
|
_request_timeout: Union[
|
2258
2584
|
None,
|
2259
2585
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -2267,13 +2593,13 @@ class AlertApi:
|
|
2267
2593
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2268
2594
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2269
2595
|
) -> ApiResponse[str]:
|
2270
|
-
"""
|
2596
|
+
"""update_alert_rule_by_id
|
2271
2597
|
|
2272
2598
|
|
2273
|
-
:param
|
2274
|
-
:type
|
2275
|
-
:param
|
2276
|
-
:type
|
2599
|
+
:param rule_id: (required)
|
2600
|
+
:type rule_id: str
|
2601
|
+
:param create_alert_rule_request:
|
2602
|
+
:type create_alert_rule_request: CreateAlertRuleRequest
|
2277
2603
|
:param _request_timeout: timeout setting for this request. If one
|
2278
2604
|
number provided, it will be total request
|
2279
2605
|
timeout. It can also be a pair (tuple) of
|
@@ -2296,9 +2622,9 @@ class AlertApi:
|
|
2296
2622
|
:return: Returns the result object.
|
2297
2623
|
""" # noqa: E501
|
2298
2624
|
|
2299
|
-
_param = self.
|
2300
|
-
|
2301
|
-
|
2625
|
+
_param = self._update_alert_rule_by_id_serialize(
|
2626
|
+
rule_id=rule_id,
|
2627
|
+
create_alert_rule_request=create_alert_rule_request,
|
2302
2628
|
_request_auth=_request_auth,
|
2303
2629
|
_content_type=_content_type,
|
2304
2630
|
_headers=_headers,
|
@@ -2307,7 +2633,7 @@ class AlertApi:
|
|
2307
2633
|
|
2308
2634
|
_response_types_map: Dict[str, Optional[str]] = {
|
2309
2635
|
'200': "str",
|
2310
|
-
'
|
2636
|
+
'500': "Error",
|
2311
2637
|
}
|
2312
2638
|
response_data = self.api_client.call_api(
|
2313
2639
|
*_param,
|
@@ -2321,10 +2647,10 @@ class AlertApi:
|
|
2321
2647
|
|
2322
2648
|
|
2323
2649
|
@validate_call
|
2324
|
-
def
|
2650
|
+
def update_alert_rule_by_id_without_preload_content(
|
2325
2651
|
self,
|
2326
|
-
|
2327
|
-
|
2652
|
+
rule_id: StrictStr,
|
2653
|
+
create_alert_rule_request: Optional[CreateAlertRuleRequest] = None,
|
2328
2654
|
_request_timeout: Union[
|
2329
2655
|
None,
|
2330
2656
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -2338,13 +2664,13 @@ class AlertApi:
|
|
2338
2664
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2339
2665
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2340
2666
|
) -> RESTResponseType:
|
2341
|
-
"""
|
2667
|
+
"""update_alert_rule_by_id
|
2342
2668
|
|
2343
2669
|
|
2344
|
-
:param
|
2345
|
-
:type
|
2346
|
-
:param
|
2347
|
-
:type
|
2670
|
+
:param rule_id: (required)
|
2671
|
+
:type rule_id: str
|
2672
|
+
:param create_alert_rule_request:
|
2673
|
+
:type create_alert_rule_request: CreateAlertRuleRequest
|
2348
2674
|
:param _request_timeout: timeout setting for this request. If one
|
2349
2675
|
number provided, it will be total request
|
2350
2676
|
timeout. It can also be a pair (tuple) of
|
@@ -2367,9 +2693,9 @@ class AlertApi:
|
|
2367
2693
|
:return: Returns the result object.
|
2368
2694
|
""" # noqa: E501
|
2369
2695
|
|
2370
|
-
_param = self.
|
2371
|
-
|
2372
|
-
|
2696
|
+
_param = self._update_alert_rule_by_id_serialize(
|
2697
|
+
rule_id=rule_id,
|
2698
|
+
create_alert_rule_request=create_alert_rule_request,
|
2373
2699
|
_request_auth=_request_auth,
|
2374
2700
|
_content_type=_content_type,
|
2375
2701
|
_headers=_headers,
|
@@ -2378,7 +2704,7 @@ class AlertApi:
|
|
2378
2704
|
|
2379
2705
|
_response_types_map: Dict[str, Optional[str]] = {
|
2380
2706
|
'200': "str",
|
2381
|
-
'
|
2707
|
+
'500': "Error",
|
2382
2708
|
}
|
2383
2709
|
response_data = self.api_client.call_api(
|
2384
2710
|
*_param,
|
@@ -2387,10 +2713,10 @@ class AlertApi:
|
|
2387
2713
|
return response_data.response
|
2388
2714
|
|
2389
2715
|
|
2390
|
-
def
|
2716
|
+
def _update_alert_rule_by_id_serialize(
|
2391
2717
|
self,
|
2392
|
-
|
2393
|
-
|
2718
|
+
rule_id,
|
2719
|
+
create_alert_rule_request,
|
2394
2720
|
_request_auth,
|
2395
2721
|
_content_type,
|
2396
2722
|
_headers,
|
@@ -2406,26 +2732,27 @@ class AlertApi:
|
|
2406
2732
|
_query_params: List[Tuple[str, str]] = []
|
2407
2733
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2408
2734
|
_form_params: List[Tuple[str, str]] = []
|
2409
|
-
_files: Dict[str, str] = {}
|
2735
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
2410
2736
|
_body_params: Optional[bytes] = None
|
2411
2737
|
|
2412
2738
|
# process the path parameters
|
2413
|
-
if
|
2414
|
-
_path_params['
|
2739
|
+
if rule_id is not None:
|
2740
|
+
_path_params['rule_id'] = rule_id
|
2415
2741
|
# process the query parameters
|
2416
2742
|
# process the header parameters
|
2417
2743
|
# process the form parameters
|
2418
2744
|
# process the body parameter
|
2419
|
-
if
|
2420
|
-
_body_params =
|
2745
|
+
if create_alert_rule_request is not None:
|
2746
|
+
_body_params = create_alert_rule_request
|
2421
2747
|
|
2422
2748
|
|
2423
2749
|
# set the HTTP header `Accept`
|
2424
|
-
|
2425
|
-
[
|
2426
|
-
|
2427
|
-
|
2428
|
-
|
2750
|
+
if 'Accept' not in _header_params:
|
2751
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2752
|
+
[
|
2753
|
+
'application/json'
|
2754
|
+
]
|
2755
|
+
)
|
2429
2756
|
|
2430
2757
|
# set the HTTP header `Content-Type`
|
2431
2758
|
if _content_type:
|
@@ -2447,7 +2774,7 @@ class AlertApi:
|
|
2447
2774
|
|
2448
2775
|
return self.api_client.param_serialize(
|
2449
2776
|
method='PUT',
|
2450
|
-
resource_path='/api/v1/alert/
|
2777
|
+
resource_path='/api/v1/alert/rule/{rule_id}',
|
2451
2778
|
path_params=_path_params,
|
2452
2779
|
query_params=_query_params,
|
2453
2780
|
header_params=_header_params,
|