graphscope-flex 0.27.0__3-py2.py3-none-any.whl → 0.28.0__3-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.
- {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.28.0.dist-info}/METADATA +6 -4
- graphscope_flex-0.28.0.dist-info/RECORD +11 -0
- {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.28.0.dist-info}/WHEEL +1 -1
- graphscope/flex/rest/api/__init__.py +0 -12
- graphscope/flex/rest/api/alert_api.py +0 -2780
- graphscope/flex/rest/api/data_source_api.py +0 -1173
- graphscope/flex/rest/api/deployment_api.py +0 -528
- graphscope/flex/rest/api/graph_api.py +0 -2803
- graphscope/flex/rest/api/job_api.py +0 -1356
- graphscope/flex/rest/api/service_api.py +0 -1311
- graphscope/flex/rest/api/stored_procedure_api.py +0 -1449
- graphscope/flex/rest/api/utils_api.py +0 -309
- graphscope/flex/rest/models/__init__.py +0 -73
- graphscope/flex/rest/models/base_edge_type.py +0 -102
- graphscope/flex/rest/models/base_edge_type_vertex_type_pair_relations_inner.py +0 -105
- graphscope/flex/rest/models/base_edge_type_vertex_type_pair_relations_inner_x_csr_params.py +0 -98
- graphscope/flex/rest/models/base_property_meta.py +0 -105
- graphscope/flex/rest/models/base_vertex_type.py +0 -96
- graphscope/flex/rest/models/base_vertex_type_x_csr_params.py +0 -88
- graphscope/flex/rest/models/column_mapping.py +0 -94
- graphscope/flex/rest/models/column_mapping_column.py +0 -90
- graphscope/flex/rest/models/create_alert_receiver_request.py +0 -103
- graphscope/flex/rest/models/create_alert_rule_request.py +0 -112
- graphscope/flex/rest/models/create_dataloading_job_response.py +0 -88
- graphscope/flex/rest/models/create_edge_type.py +0 -114
- graphscope/flex/rest/models/create_graph_request.py +0 -106
- graphscope/flex/rest/models/create_graph_response.py +0 -88
- graphscope/flex/rest/models/create_graph_schema_request.py +0 -106
- graphscope/flex/rest/models/create_property_meta.py +0 -100
- graphscope/flex/rest/models/create_stored_proc_request.py +0 -101
- graphscope/flex/rest/models/create_stored_proc_response.py +0 -88
- graphscope/flex/rest/models/create_vertex_type.py +0 -108
- graphscope/flex/rest/models/dataloading_job_config.py +0 -136
- graphscope/flex/rest/models/dataloading_job_config_edges_inner.py +0 -92
- graphscope/flex/rest/models/dataloading_job_config_loading_config.py +0 -104
- graphscope/flex/rest/models/dataloading_job_config_loading_config_format.py +0 -90
- graphscope/flex/rest/models/dataloading_job_config_vertices_inner.py +0 -88
- graphscope/flex/rest/models/edge_mapping.py +0 -122
- graphscope/flex/rest/models/edge_mapping_type_triplet.py +0 -92
- graphscope/flex/rest/models/error.py +0 -90
- graphscope/flex/rest/models/get_alert_message_response.py +0 -123
- graphscope/flex/rest/models/get_alert_receiver_response.py +0 -107
- graphscope/flex/rest/models/get_alert_rule_response.py +0 -114
- graphscope/flex/rest/models/get_edge_type.py +0 -116
- graphscope/flex/rest/models/get_graph_response.py +0 -126
- graphscope/flex/rest/models/get_graph_schema_response.py +0 -106
- graphscope/flex/rest/models/get_property_meta.py +0 -102
- graphscope/flex/rest/models/get_stored_proc_response.py +0 -128
- graphscope/flex/rest/models/get_vertex_type.py +0 -110
- graphscope/flex/rest/models/gs_data_type.py +0 -138
- graphscope/flex/rest/models/job_status.py +0 -107
- graphscope/flex/rest/models/long_text.py +0 -93
- graphscope/flex/rest/models/node_status.py +0 -94
- graphscope/flex/rest/models/parameter.py +0 -94
- graphscope/flex/rest/models/primitive_type.py +0 -95
- graphscope/flex/rest/models/running_deployment_info.py +0 -128
- graphscope/flex/rest/models/running_deployment_status.py +0 -105
- graphscope/flex/rest/models/running_deployment_status_nodes_inner.py +0 -124
- graphscope/flex/rest/models/schema_mapping.py +0 -106
- graphscope/flex/rest/models/service_status.py +0 -105
- graphscope/flex/rest/models/service_status_sdk_endpoints.py +0 -94
- graphscope/flex/rest/models/start_service_request.py +0 -88
- graphscope/flex/rest/models/stored_procedure_meta.py +0 -124
- graphscope/flex/rest/models/string_type.py +0 -92
- graphscope/flex/rest/models/string_type_string.py +0 -124
- graphscope/flex/rest/models/update_alert_message_status_request.py +0 -97
- graphscope/flex/rest/models/update_stored_proc_request.py +0 -88
- graphscope/flex/rest/models/upload_file_response.py +0 -88
- graphscope/flex/rest/models/vertex_mapping.py +0 -100
- graphscope_flex-0.27.0.dist-info/RECORD +0 -77
- {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.28.0.dist-info}/top_level.txt +0 -0
@@ -1,2780 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
GraphScope FLEX HTTP SERVICE API
|
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/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 1.0.0
|
9
|
-
Contact: graphscope@alibaba-inc.com
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
-
|
12
|
-
Do not edit the class manually.
|
13
|
-
""" # noqa: E501
|
14
|
-
|
15
|
-
import warnings
|
16
|
-
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
17
|
-
from typing import Any, Dict, List, Optional, Tuple, Union
|
18
|
-
from typing_extensions import Annotated
|
19
|
-
|
20
|
-
from pydantic import Field, StrictInt, StrictStr, field_validator
|
21
|
-
from typing import Optional
|
22
|
-
from typing_extensions import Annotated
|
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
|
29
|
-
|
30
|
-
from graphscope.flex.rest.api_client import ApiClient, RequestSerialized
|
31
|
-
from graphscope.flex.rest.api_response import ApiResponse
|
32
|
-
from graphscope.flex.rest.rest import RESTResponseType
|
33
|
-
|
34
|
-
|
35
|
-
class AlertApi:
|
36
|
-
"""NOTE: This class is auto generated by OpenAPI Generator
|
37
|
-
Ref: https://openapi-generator.tech
|
38
|
-
|
39
|
-
Do not edit the class manually.
|
40
|
-
"""
|
41
|
-
|
42
|
-
def __init__(self, api_client=None) -> None:
|
43
|
-
if api_client is None:
|
44
|
-
api_client = ApiClient.get_default()
|
45
|
-
self.api_client = api_client
|
46
|
-
|
47
|
-
|
48
|
-
@validate_call
|
49
|
-
def create_alert_receiver(
|
50
|
-
self,
|
51
|
-
create_alert_receiver_request: CreateAlertReceiverRequest,
|
52
|
-
_request_timeout: Union[
|
53
|
-
None,
|
54
|
-
Annotated[StrictFloat, Field(gt=0)],
|
55
|
-
Tuple[
|
56
|
-
Annotated[StrictFloat, Field(gt=0)],
|
57
|
-
Annotated[StrictFloat, Field(gt=0)]
|
58
|
-
]
|
59
|
-
] = None,
|
60
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
61
|
-
_content_type: Optional[StrictStr] = None,
|
62
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
63
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
64
|
-
) -> str:
|
65
|
-
"""create_alert_receiver
|
66
|
-
|
67
|
-
Create a new alert receiver
|
68
|
-
|
69
|
-
:param create_alert_receiver_request: (required)
|
70
|
-
:type create_alert_receiver_request: CreateAlertReceiverRequest
|
71
|
-
:param _request_timeout: timeout setting for this request. If one
|
72
|
-
number provided, it will be total request
|
73
|
-
timeout. It can also be a pair (tuple) of
|
74
|
-
(connection, read) timeouts.
|
75
|
-
:type _request_timeout: int, tuple(int, int), optional
|
76
|
-
:param _request_auth: set to override the auth_settings for an a single
|
77
|
-
request; this effectively ignores the
|
78
|
-
authentication in the spec for a single request.
|
79
|
-
:type _request_auth: dict, optional
|
80
|
-
:param _content_type: force content-type for the request.
|
81
|
-
:type _content_type: str, Optional
|
82
|
-
:param _headers: set to override the headers for a single
|
83
|
-
request; this effectively ignores the headers
|
84
|
-
in the spec for a single request.
|
85
|
-
:type _headers: dict, optional
|
86
|
-
:param _host_index: set to override the host_index for a single
|
87
|
-
request; this effectively ignores the host_index
|
88
|
-
in the spec for a single request.
|
89
|
-
:type _host_index: int, optional
|
90
|
-
:return: Returns the result object.
|
91
|
-
""" # noqa: E501
|
92
|
-
|
93
|
-
_param = self._create_alert_receiver_serialize(
|
94
|
-
create_alert_receiver_request=create_alert_receiver_request,
|
95
|
-
_request_auth=_request_auth,
|
96
|
-
_content_type=_content_type,
|
97
|
-
_headers=_headers,
|
98
|
-
_host_index=_host_index
|
99
|
-
)
|
100
|
-
|
101
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
102
|
-
'200': "str",
|
103
|
-
'500': "Error",
|
104
|
-
}
|
105
|
-
response_data = self.api_client.call_api(
|
106
|
-
*_param,
|
107
|
-
_request_timeout=_request_timeout
|
108
|
-
)
|
109
|
-
response_data.read()
|
110
|
-
return self.api_client.response_deserialize(
|
111
|
-
response_data=response_data,
|
112
|
-
response_types_map=_response_types_map,
|
113
|
-
).data
|
114
|
-
|
115
|
-
|
116
|
-
@validate_call
|
117
|
-
def create_alert_receiver_with_http_info(
|
118
|
-
self,
|
119
|
-
create_alert_receiver_request: CreateAlertReceiverRequest,
|
120
|
-
_request_timeout: Union[
|
121
|
-
None,
|
122
|
-
Annotated[StrictFloat, Field(gt=0)],
|
123
|
-
Tuple[
|
124
|
-
Annotated[StrictFloat, Field(gt=0)],
|
125
|
-
Annotated[StrictFloat, Field(gt=0)]
|
126
|
-
]
|
127
|
-
] = None,
|
128
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
129
|
-
_content_type: Optional[StrictStr] = None,
|
130
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
131
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
132
|
-
) -> ApiResponse[str]:
|
133
|
-
"""create_alert_receiver
|
134
|
-
|
135
|
-
Create a new alert receiver
|
136
|
-
|
137
|
-
:param create_alert_receiver_request: (required)
|
138
|
-
:type create_alert_receiver_request: CreateAlertReceiverRequest
|
139
|
-
:param _request_timeout: timeout setting for this request. If one
|
140
|
-
number provided, it will be total request
|
141
|
-
timeout. It can also be a pair (tuple) of
|
142
|
-
(connection, read) timeouts.
|
143
|
-
:type _request_timeout: int, tuple(int, int), optional
|
144
|
-
:param _request_auth: set to override the auth_settings for an a single
|
145
|
-
request; this effectively ignores the
|
146
|
-
authentication in the spec for a single request.
|
147
|
-
:type _request_auth: dict, optional
|
148
|
-
:param _content_type: force content-type for the request.
|
149
|
-
:type _content_type: str, Optional
|
150
|
-
:param _headers: set to override the headers for a single
|
151
|
-
request; this effectively ignores the headers
|
152
|
-
in the spec for a single request.
|
153
|
-
:type _headers: dict, optional
|
154
|
-
:param _host_index: set to override the host_index for a single
|
155
|
-
request; this effectively ignores the host_index
|
156
|
-
in the spec for a single request.
|
157
|
-
:type _host_index: int, optional
|
158
|
-
:return: Returns the result object.
|
159
|
-
""" # noqa: E501
|
160
|
-
|
161
|
-
_param = self._create_alert_receiver_serialize(
|
162
|
-
create_alert_receiver_request=create_alert_receiver_request,
|
163
|
-
_request_auth=_request_auth,
|
164
|
-
_content_type=_content_type,
|
165
|
-
_headers=_headers,
|
166
|
-
_host_index=_host_index
|
167
|
-
)
|
168
|
-
|
169
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
170
|
-
'200': "str",
|
171
|
-
'500': "Error",
|
172
|
-
}
|
173
|
-
response_data = self.api_client.call_api(
|
174
|
-
*_param,
|
175
|
-
_request_timeout=_request_timeout
|
176
|
-
)
|
177
|
-
response_data.read()
|
178
|
-
return self.api_client.response_deserialize(
|
179
|
-
response_data=response_data,
|
180
|
-
response_types_map=_response_types_map,
|
181
|
-
)
|
182
|
-
|
183
|
-
|
184
|
-
@validate_call
|
185
|
-
def create_alert_receiver_without_preload_content(
|
186
|
-
self,
|
187
|
-
create_alert_receiver_request: CreateAlertReceiverRequest,
|
188
|
-
_request_timeout: Union[
|
189
|
-
None,
|
190
|
-
Annotated[StrictFloat, Field(gt=0)],
|
191
|
-
Tuple[
|
192
|
-
Annotated[StrictFloat, Field(gt=0)],
|
193
|
-
Annotated[StrictFloat, Field(gt=0)]
|
194
|
-
]
|
195
|
-
] = None,
|
196
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
197
|
-
_content_type: Optional[StrictStr] = None,
|
198
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
199
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
200
|
-
) -> RESTResponseType:
|
201
|
-
"""create_alert_receiver
|
202
|
-
|
203
|
-
Create a new alert receiver
|
204
|
-
|
205
|
-
:param create_alert_receiver_request: (required)
|
206
|
-
:type create_alert_receiver_request: CreateAlertReceiverRequest
|
207
|
-
:param _request_timeout: timeout setting for this request. If one
|
208
|
-
number provided, it will be total request
|
209
|
-
timeout. It can also be a pair (tuple) of
|
210
|
-
(connection, read) timeouts.
|
211
|
-
:type _request_timeout: int, tuple(int, int), optional
|
212
|
-
:param _request_auth: set to override the auth_settings for an a single
|
213
|
-
request; this effectively ignores the
|
214
|
-
authentication in the spec for a single request.
|
215
|
-
:type _request_auth: dict, optional
|
216
|
-
:param _content_type: force content-type for the request.
|
217
|
-
:type _content_type: str, Optional
|
218
|
-
:param _headers: set to override the headers for a single
|
219
|
-
request; this effectively ignores the headers
|
220
|
-
in the spec for a single request.
|
221
|
-
:type _headers: dict, optional
|
222
|
-
:param _host_index: set to override the host_index for a single
|
223
|
-
request; this effectively ignores the host_index
|
224
|
-
in the spec for a single request.
|
225
|
-
:type _host_index: int, optional
|
226
|
-
:return: Returns the result object.
|
227
|
-
""" # noqa: E501
|
228
|
-
|
229
|
-
_param = self._create_alert_receiver_serialize(
|
230
|
-
create_alert_receiver_request=create_alert_receiver_request,
|
231
|
-
_request_auth=_request_auth,
|
232
|
-
_content_type=_content_type,
|
233
|
-
_headers=_headers,
|
234
|
-
_host_index=_host_index
|
235
|
-
)
|
236
|
-
|
237
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
238
|
-
'200': "str",
|
239
|
-
'500': "Error",
|
240
|
-
}
|
241
|
-
response_data = self.api_client.call_api(
|
242
|
-
*_param,
|
243
|
-
_request_timeout=_request_timeout
|
244
|
-
)
|
245
|
-
return response_data.response
|
246
|
-
|
247
|
-
|
248
|
-
def _create_alert_receiver_serialize(
|
249
|
-
self,
|
250
|
-
create_alert_receiver_request,
|
251
|
-
_request_auth,
|
252
|
-
_content_type,
|
253
|
-
_headers,
|
254
|
-
_host_index,
|
255
|
-
) -> RequestSerialized:
|
256
|
-
|
257
|
-
_host = None
|
258
|
-
|
259
|
-
_collection_formats: Dict[str, str] = {
|
260
|
-
}
|
261
|
-
|
262
|
-
_path_params: Dict[str, str] = {}
|
263
|
-
_query_params: List[Tuple[str, str]] = []
|
264
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
265
|
-
_form_params: List[Tuple[str, str]] = []
|
266
|
-
_files: Dict[str, str] = {}
|
267
|
-
_body_params: Optional[bytes] = None
|
268
|
-
|
269
|
-
# process the path parameters
|
270
|
-
# process the query parameters
|
271
|
-
# process the header parameters
|
272
|
-
# process the form parameters
|
273
|
-
# process the body parameter
|
274
|
-
if create_alert_receiver_request is not None:
|
275
|
-
_body_params = create_alert_receiver_request
|
276
|
-
|
277
|
-
|
278
|
-
# set the HTTP header `Accept`
|
279
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
280
|
-
[
|
281
|
-
'application/json'
|
282
|
-
]
|
283
|
-
)
|
284
|
-
|
285
|
-
# set the HTTP header `Content-Type`
|
286
|
-
if _content_type:
|
287
|
-
_header_params['Content-Type'] = _content_type
|
288
|
-
else:
|
289
|
-
_default_content_type = (
|
290
|
-
self.api_client.select_header_content_type(
|
291
|
-
[
|
292
|
-
'application/json'
|
293
|
-
]
|
294
|
-
)
|
295
|
-
)
|
296
|
-
if _default_content_type is not None:
|
297
|
-
_header_params['Content-Type'] = _default_content_type
|
298
|
-
|
299
|
-
# authentication setting
|
300
|
-
_auth_settings: List[str] = [
|
301
|
-
]
|
302
|
-
|
303
|
-
return self.api_client.param_serialize(
|
304
|
-
method='POST',
|
305
|
-
resource_path='/api/v1/alert/receiver',
|
306
|
-
path_params=_path_params,
|
307
|
-
query_params=_query_params,
|
308
|
-
header_params=_header_params,
|
309
|
-
body=_body_params,
|
310
|
-
post_params=_form_params,
|
311
|
-
files=_files,
|
312
|
-
auth_settings=_auth_settings,
|
313
|
-
collection_formats=_collection_formats,
|
314
|
-
_host=_host,
|
315
|
-
_request_auth=_request_auth
|
316
|
-
)
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
@validate_call
|
322
|
-
def delete_alert_message_in_batch(
|
323
|
-
self,
|
324
|
-
message_ids: Annotated[StrictStr, Field(description="A list of message id separated by comma, e.g. id1,id2,id3")],
|
325
|
-
_request_timeout: Union[
|
326
|
-
None,
|
327
|
-
Annotated[StrictFloat, Field(gt=0)],
|
328
|
-
Tuple[
|
329
|
-
Annotated[StrictFloat, Field(gt=0)],
|
330
|
-
Annotated[StrictFloat, Field(gt=0)]
|
331
|
-
]
|
332
|
-
] = None,
|
333
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
334
|
-
_content_type: Optional[StrictStr] = None,
|
335
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
336
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
337
|
-
) -> str:
|
338
|
-
"""delete_alert_message_in_batch
|
339
|
-
|
340
|
-
Delete alert message in batch
|
341
|
-
|
342
|
-
:param message_ids: A list of message id separated by comma, e.g. id1,id2,id3 (required)
|
343
|
-
:type message_ids: str
|
344
|
-
:param _request_timeout: timeout setting for this request. If one
|
345
|
-
number provided, it will be total request
|
346
|
-
timeout. It can also be a pair (tuple) of
|
347
|
-
(connection, read) timeouts.
|
348
|
-
:type _request_timeout: int, tuple(int, int), optional
|
349
|
-
:param _request_auth: set to override the auth_settings for an a single
|
350
|
-
request; this effectively ignores the
|
351
|
-
authentication in the spec for a single request.
|
352
|
-
:type _request_auth: dict, optional
|
353
|
-
:param _content_type: force content-type for the request.
|
354
|
-
:type _content_type: str, Optional
|
355
|
-
:param _headers: set to override the headers for a single
|
356
|
-
request; this effectively ignores the headers
|
357
|
-
in the spec for a single request.
|
358
|
-
:type _headers: dict, optional
|
359
|
-
:param _host_index: set to override the host_index for a single
|
360
|
-
request; this effectively ignores the host_index
|
361
|
-
in the spec for a single request.
|
362
|
-
:type _host_index: int, optional
|
363
|
-
:return: Returns the result object.
|
364
|
-
""" # noqa: E501
|
365
|
-
|
366
|
-
_param = self._delete_alert_message_in_batch_serialize(
|
367
|
-
message_ids=message_ids,
|
368
|
-
_request_auth=_request_auth,
|
369
|
-
_content_type=_content_type,
|
370
|
-
_headers=_headers,
|
371
|
-
_host_index=_host_index
|
372
|
-
)
|
373
|
-
|
374
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
375
|
-
'200': "str",
|
376
|
-
'500': "Error",
|
377
|
-
}
|
378
|
-
response_data = self.api_client.call_api(
|
379
|
-
*_param,
|
380
|
-
_request_timeout=_request_timeout
|
381
|
-
)
|
382
|
-
response_data.read()
|
383
|
-
return self.api_client.response_deserialize(
|
384
|
-
response_data=response_data,
|
385
|
-
response_types_map=_response_types_map,
|
386
|
-
).data
|
387
|
-
|
388
|
-
|
389
|
-
@validate_call
|
390
|
-
def delete_alert_message_in_batch_with_http_info(
|
391
|
-
self,
|
392
|
-
message_ids: Annotated[StrictStr, Field(description="A list of message id separated by comma, e.g. id1,id2,id3")],
|
393
|
-
_request_timeout: Union[
|
394
|
-
None,
|
395
|
-
Annotated[StrictFloat, Field(gt=0)],
|
396
|
-
Tuple[
|
397
|
-
Annotated[StrictFloat, Field(gt=0)],
|
398
|
-
Annotated[StrictFloat, Field(gt=0)]
|
399
|
-
]
|
400
|
-
] = None,
|
401
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
402
|
-
_content_type: Optional[StrictStr] = None,
|
403
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
404
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
405
|
-
) -> ApiResponse[str]:
|
406
|
-
"""delete_alert_message_in_batch
|
407
|
-
|
408
|
-
Delete alert message in batch
|
409
|
-
|
410
|
-
:param message_ids: A list of message id separated by comma, e.g. id1,id2,id3 (required)
|
411
|
-
:type message_ids: str
|
412
|
-
:param _request_timeout: timeout setting for this request. If one
|
413
|
-
number provided, it will be total request
|
414
|
-
timeout. It can also be a pair (tuple) of
|
415
|
-
(connection, read) timeouts.
|
416
|
-
:type _request_timeout: int, tuple(int, int), optional
|
417
|
-
:param _request_auth: set to override the auth_settings for an a single
|
418
|
-
request; this effectively ignores the
|
419
|
-
authentication in the spec for a single request.
|
420
|
-
:type _request_auth: dict, optional
|
421
|
-
:param _content_type: force content-type for the request.
|
422
|
-
:type _content_type: str, Optional
|
423
|
-
:param _headers: set to override the headers for a single
|
424
|
-
request; this effectively ignores the headers
|
425
|
-
in the spec for a single request.
|
426
|
-
:type _headers: dict, optional
|
427
|
-
:param _host_index: set to override the host_index for a single
|
428
|
-
request; this effectively ignores the host_index
|
429
|
-
in the spec for a single request.
|
430
|
-
:type _host_index: int, optional
|
431
|
-
:return: Returns the result object.
|
432
|
-
""" # noqa: E501
|
433
|
-
|
434
|
-
_param = self._delete_alert_message_in_batch_serialize(
|
435
|
-
message_ids=message_ids,
|
436
|
-
_request_auth=_request_auth,
|
437
|
-
_content_type=_content_type,
|
438
|
-
_headers=_headers,
|
439
|
-
_host_index=_host_index
|
440
|
-
)
|
441
|
-
|
442
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
443
|
-
'200': "str",
|
444
|
-
'500': "Error",
|
445
|
-
}
|
446
|
-
response_data = self.api_client.call_api(
|
447
|
-
*_param,
|
448
|
-
_request_timeout=_request_timeout
|
449
|
-
)
|
450
|
-
response_data.read()
|
451
|
-
return self.api_client.response_deserialize(
|
452
|
-
response_data=response_data,
|
453
|
-
response_types_map=_response_types_map,
|
454
|
-
)
|
455
|
-
|
456
|
-
|
457
|
-
@validate_call
|
458
|
-
def delete_alert_message_in_batch_without_preload_content(
|
459
|
-
self,
|
460
|
-
message_ids: Annotated[StrictStr, Field(description="A list of message id separated by comma, e.g. id1,id2,id3")],
|
461
|
-
_request_timeout: Union[
|
462
|
-
None,
|
463
|
-
Annotated[StrictFloat, Field(gt=0)],
|
464
|
-
Tuple[
|
465
|
-
Annotated[StrictFloat, Field(gt=0)],
|
466
|
-
Annotated[StrictFloat, Field(gt=0)]
|
467
|
-
]
|
468
|
-
] = None,
|
469
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
470
|
-
_content_type: Optional[StrictStr] = None,
|
471
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
472
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
473
|
-
) -> RESTResponseType:
|
474
|
-
"""delete_alert_message_in_batch
|
475
|
-
|
476
|
-
Delete alert message in batch
|
477
|
-
|
478
|
-
:param message_ids: A list of message id separated by comma, e.g. id1,id2,id3 (required)
|
479
|
-
:type message_ids: str
|
480
|
-
:param _request_timeout: timeout setting for this request. If one
|
481
|
-
number provided, it will be total request
|
482
|
-
timeout. It can also be a pair (tuple) of
|
483
|
-
(connection, read) timeouts.
|
484
|
-
:type _request_timeout: int, tuple(int, int), optional
|
485
|
-
:param _request_auth: set to override the auth_settings for an a single
|
486
|
-
request; this effectively ignores the
|
487
|
-
authentication in the spec for a single request.
|
488
|
-
:type _request_auth: dict, optional
|
489
|
-
:param _content_type: force content-type for the request.
|
490
|
-
:type _content_type: str, Optional
|
491
|
-
:param _headers: set to override the headers for a single
|
492
|
-
request; this effectively ignores the headers
|
493
|
-
in the spec for a single request.
|
494
|
-
:type _headers: dict, optional
|
495
|
-
:param _host_index: set to override the host_index for a single
|
496
|
-
request; this effectively ignores the host_index
|
497
|
-
in the spec for a single request.
|
498
|
-
:type _host_index: int, optional
|
499
|
-
:return: Returns the result object.
|
500
|
-
""" # noqa: E501
|
501
|
-
|
502
|
-
_param = self._delete_alert_message_in_batch_serialize(
|
503
|
-
message_ids=message_ids,
|
504
|
-
_request_auth=_request_auth,
|
505
|
-
_content_type=_content_type,
|
506
|
-
_headers=_headers,
|
507
|
-
_host_index=_host_index
|
508
|
-
)
|
509
|
-
|
510
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
511
|
-
'200': "str",
|
512
|
-
'500': "Error",
|
513
|
-
}
|
514
|
-
response_data = self.api_client.call_api(
|
515
|
-
*_param,
|
516
|
-
_request_timeout=_request_timeout
|
517
|
-
)
|
518
|
-
return response_data.response
|
519
|
-
|
520
|
-
|
521
|
-
def _delete_alert_message_in_batch_serialize(
|
522
|
-
self,
|
523
|
-
message_ids,
|
524
|
-
_request_auth,
|
525
|
-
_content_type,
|
526
|
-
_headers,
|
527
|
-
_host_index,
|
528
|
-
) -> RequestSerialized:
|
529
|
-
|
530
|
-
_host = None
|
531
|
-
|
532
|
-
_collection_formats: Dict[str, str] = {
|
533
|
-
}
|
534
|
-
|
535
|
-
_path_params: Dict[str, str] = {}
|
536
|
-
_query_params: List[Tuple[str, str]] = []
|
537
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
538
|
-
_form_params: List[Tuple[str, str]] = []
|
539
|
-
_files: Dict[str, str] = {}
|
540
|
-
_body_params: Optional[bytes] = None
|
541
|
-
|
542
|
-
# process the path parameters
|
543
|
-
# process the query parameters
|
544
|
-
if message_ids is not None:
|
545
|
-
|
546
|
-
_query_params.append(('message_ids', message_ids))
|
547
|
-
|
548
|
-
# process the header parameters
|
549
|
-
# process the form parameters
|
550
|
-
# process the body parameter
|
551
|
-
|
552
|
-
|
553
|
-
# set the HTTP header `Accept`
|
554
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
555
|
-
[
|
556
|
-
'application/json'
|
557
|
-
]
|
558
|
-
)
|
559
|
-
|
560
|
-
|
561
|
-
# authentication setting
|
562
|
-
_auth_settings: List[str] = [
|
563
|
-
]
|
564
|
-
|
565
|
-
return self.api_client.param_serialize(
|
566
|
-
method='DELETE',
|
567
|
-
resource_path='/api/v1/alert/message-collection',
|
568
|
-
path_params=_path_params,
|
569
|
-
query_params=_query_params,
|
570
|
-
header_params=_header_params,
|
571
|
-
body=_body_params,
|
572
|
-
post_params=_form_params,
|
573
|
-
files=_files,
|
574
|
-
auth_settings=_auth_settings,
|
575
|
-
collection_formats=_collection_formats,
|
576
|
-
_host=_host,
|
577
|
-
_request_auth=_request_auth
|
578
|
-
)
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
@validate_call
|
584
|
-
def delete_alert_receiver_by_id(
|
585
|
-
self,
|
586
|
-
receiver_id: StrictStr,
|
587
|
-
_request_timeout: Union[
|
588
|
-
None,
|
589
|
-
Annotated[StrictFloat, Field(gt=0)],
|
590
|
-
Tuple[
|
591
|
-
Annotated[StrictFloat, Field(gt=0)],
|
592
|
-
Annotated[StrictFloat, Field(gt=0)]
|
593
|
-
]
|
594
|
-
] = None,
|
595
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
596
|
-
_content_type: Optional[StrictStr] = None,
|
597
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
598
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
599
|
-
) -> str:
|
600
|
-
"""delete_alert_receiver_by_id
|
601
|
-
|
602
|
-
Delete the alert receiver by ID
|
603
|
-
|
604
|
-
:param receiver_id: (required)
|
605
|
-
:type receiver_id: str
|
606
|
-
:param _request_timeout: timeout setting for this request. If one
|
607
|
-
number provided, it will be total request
|
608
|
-
timeout. It can also be a pair (tuple) of
|
609
|
-
(connection, read) timeouts.
|
610
|
-
:type _request_timeout: int, tuple(int, int), optional
|
611
|
-
:param _request_auth: set to override the auth_settings for an a single
|
612
|
-
request; this effectively ignores the
|
613
|
-
authentication in the spec for a single request.
|
614
|
-
:type _request_auth: dict, optional
|
615
|
-
:param _content_type: force content-type for the request.
|
616
|
-
:type _content_type: str, Optional
|
617
|
-
:param _headers: set to override the headers for a single
|
618
|
-
request; this effectively ignores the headers
|
619
|
-
in the spec for a single request.
|
620
|
-
:type _headers: dict, optional
|
621
|
-
:param _host_index: set to override the host_index for a single
|
622
|
-
request; this effectively ignores the host_index
|
623
|
-
in the spec for a single request.
|
624
|
-
:type _host_index: int, optional
|
625
|
-
:return: Returns the result object.
|
626
|
-
""" # noqa: E501
|
627
|
-
|
628
|
-
_param = self._delete_alert_receiver_by_id_serialize(
|
629
|
-
receiver_id=receiver_id,
|
630
|
-
_request_auth=_request_auth,
|
631
|
-
_content_type=_content_type,
|
632
|
-
_headers=_headers,
|
633
|
-
_host_index=_host_index
|
634
|
-
)
|
635
|
-
|
636
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
637
|
-
'200': "str",
|
638
|
-
'500': "Error",
|
639
|
-
}
|
640
|
-
response_data = self.api_client.call_api(
|
641
|
-
*_param,
|
642
|
-
_request_timeout=_request_timeout
|
643
|
-
)
|
644
|
-
response_data.read()
|
645
|
-
return self.api_client.response_deserialize(
|
646
|
-
response_data=response_data,
|
647
|
-
response_types_map=_response_types_map,
|
648
|
-
).data
|
649
|
-
|
650
|
-
|
651
|
-
@validate_call
|
652
|
-
def delete_alert_receiver_by_id_with_http_info(
|
653
|
-
self,
|
654
|
-
receiver_id: StrictStr,
|
655
|
-
_request_timeout: Union[
|
656
|
-
None,
|
657
|
-
Annotated[StrictFloat, Field(gt=0)],
|
658
|
-
Tuple[
|
659
|
-
Annotated[StrictFloat, Field(gt=0)],
|
660
|
-
Annotated[StrictFloat, Field(gt=0)]
|
661
|
-
]
|
662
|
-
] = None,
|
663
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
664
|
-
_content_type: Optional[StrictStr] = None,
|
665
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
666
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
667
|
-
) -> ApiResponse[str]:
|
668
|
-
"""delete_alert_receiver_by_id
|
669
|
-
|
670
|
-
Delete the alert receiver by ID
|
671
|
-
|
672
|
-
:param receiver_id: (required)
|
673
|
-
:type receiver_id: str
|
674
|
-
:param _request_timeout: timeout setting for this request. If one
|
675
|
-
number provided, it will be total request
|
676
|
-
timeout. It can also be a pair (tuple) of
|
677
|
-
(connection, read) timeouts.
|
678
|
-
:type _request_timeout: int, tuple(int, int), optional
|
679
|
-
:param _request_auth: set to override the auth_settings for an a single
|
680
|
-
request; this effectively ignores the
|
681
|
-
authentication in the spec for a single request.
|
682
|
-
:type _request_auth: dict, optional
|
683
|
-
:param _content_type: force content-type for the request.
|
684
|
-
:type _content_type: str, Optional
|
685
|
-
:param _headers: set to override the headers for a single
|
686
|
-
request; this effectively ignores the headers
|
687
|
-
in the spec for a single request.
|
688
|
-
:type _headers: dict, optional
|
689
|
-
:param _host_index: set to override the host_index for a single
|
690
|
-
request; this effectively ignores the host_index
|
691
|
-
in the spec for a single request.
|
692
|
-
:type _host_index: int, optional
|
693
|
-
:return: Returns the result object.
|
694
|
-
""" # noqa: E501
|
695
|
-
|
696
|
-
_param = self._delete_alert_receiver_by_id_serialize(
|
697
|
-
receiver_id=receiver_id,
|
698
|
-
_request_auth=_request_auth,
|
699
|
-
_content_type=_content_type,
|
700
|
-
_headers=_headers,
|
701
|
-
_host_index=_host_index
|
702
|
-
)
|
703
|
-
|
704
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
705
|
-
'200': "str",
|
706
|
-
'500': "Error",
|
707
|
-
}
|
708
|
-
response_data = self.api_client.call_api(
|
709
|
-
*_param,
|
710
|
-
_request_timeout=_request_timeout
|
711
|
-
)
|
712
|
-
response_data.read()
|
713
|
-
return self.api_client.response_deserialize(
|
714
|
-
response_data=response_data,
|
715
|
-
response_types_map=_response_types_map,
|
716
|
-
)
|
717
|
-
|
718
|
-
|
719
|
-
@validate_call
|
720
|
-
def delete_alert_receiver_by_id_without_preload_content(
|
721
|
-
self,
|
722
|
-
receiver_id: StrictStr,
|
723
|
-
_request_timeout: Union[
|
724
|
-
None,
|
725
|
-
Annotated[StrictFloat, Field(gt=0)],
|
726
|
-
Tuple[
|
727
|
-
Annotated[StrictFloat, Field(gt=0)],
|
728
|
-
Annotated[StrictFloat, Field(gt=0)]
|
729
|
-
]
|
730
|
-
] = None,
|
731
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
732
|
-
_content_type: Optional[StrictStr] = None,
|
733
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
734
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
735
|
-
) -> RESTResponseType:
|
736
|
-
"""delete_alert_receiver_by_id
|
737
|
-
|
738
|
-
Delete the alert receiver by ID
|
739
|
-
|
740
|
-
:param receiver_id: (required)
|
741
|
-
:type receiver_id: str
|
742
|
-
:param _request_timeout: timeout setting for this request. If one
|
743
|
-
number provided, it will be total request
|
744
|
-
timeout. It can also be a pair (tuple) of
|
745
|
-
(connection, read) timeouts.
|
746
|
-
:type _request_timeout: int, tuple(int, int), optional
|
747
|
-
:param _request_auth: set to override the auth_settings for an a single
|
748
|
-
request; this effectively ignores the
|
749
|
-
authentication in the spec for a single request.
|
750
|
-
:type _request_auth: dict, optional
|
751
|
-
:param _content_type: force content-type for the request.
|
752
|
-
:type _content_type: str, Optional
|
753
|
-
:param _headers: set to override the headers for a single
|
754
|
-
request; this effectively ignores the headers
|
755
|
-
in the spec for a single request.
|
756
|
-
:type _headers: dict, optional
|
757
|
-
:param _host_index: set to override the host_index for a single
|
758
|
-
request; this effectively ignores the host_index
|
759
|
-
in the spec for a single request.
|
760
|
-
:type _host_index: int, optional
|
761
|
-
:return: Returns the result object.
|
762
|
-
""" # noqa: E501
|
763
|
-
|
764
|
-
_param = self._delete_alert_receiver_by_id_serialize(
|
765
|
-
receiver_id=receiver_id,
|
766
|
-
_request_auth=_request_auth,
|
767
|
-
_content_type=_content_type,
|
768
|
-
_headers=_headers,
|
769
|
-
_host_index=_host_index
|
770
|
-
)
|
771
|
-
|
772
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
773
|
-
'200': "str",
|
774
|
-
'500': "Error",
|
775
|
-
}
|
776
|
-
response_data = self.api_client.call_api(
|
777
|
-
*_param,
|
778
|
-
_request_timeout=_request_timeout
|
779
|
-
)
|
780
|
-
return response_data.response
|
781
|
-
|
782
|
-
|
783
|
-
def _delete_alert_receiver_by_id_serialize(
|
784
|
-
self,
|
785
|
-
receiver_id,
|
786
|
-
_request_auth,
|
787
|
-
_content_type,
|
788
|
-
_headers,
|
789
|
-
_host_index,
|
790
|
-
) -> RequestSerialized:
|
791
|
-
|
792
|
-
_host = None
|
793
|
-
|
794
|
-
_collection_formats: Dict[str, str] = {
|
795
|
-
}
|
796
|
-
|
797
|
-
_path_params: Dict[str, str] = {}
|
798
|
-
_query_params: List[Tuple[str, str]] = []
|
799
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
800
|
-
_form_params: List[Tuple[str, str]] = []
|
801
|
-
_files: Dict[str, str] = {}
|
802
|
-
_body_params: Optional[bytes] = None
|
803
|
-
|
804
|
-
# process the path parameters
|
805
|
-
if receiver_id is not None:
|
806
|
-
_path_params['receiver_id'] = receiver_id
|
807
|
-
# process the query parameters
|
808
|
-
# process the header parameters
|
809
|
-
# process the form parameters
|
810
|
-
# process the body parameter
|
811
|
-
|
812
|
-
|
813
|
-
# set the HTTP header `Accept`
|
814
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
815
|
-
[
|
816
|
-
'application/json'
|
817
|
-
]
|
818
|
-
)
|
819
|
-
|
820
|
-
|
821
|
-
# authentication setting
|
822
|
-
_auth_settings: List[str] = [
|
823
|
-
]
|
824
|
-
|
825
|
-
return self.api_client.param_serialize(
|
826
|
-
method='DELETE',
|
827
|
-
resource_path='/api/v1/alert/receiver/{receiver_id}',
|
828
|
-
path_params=_path_params,
|
829
|
-
query_params=_query_params,
|
830
|
-
header_params=_header_params,
|
831
|
-
body=_body_params,
|
832
|
-
post_params=_form_params,
|
833
|
-
files=_files,
|
834
|
-
auth_settings=_auth_settings,
|
835
|
-
collection_formats=_collection_formats,
|
836
|
-
_host=_host,
|
837
|
-
_request_auth=_request_auth
|
838
|
-
)
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
@validate_call
|
844
|
-
def delete_alert_rule_by_id(
|
845
|
-
self,
|
846
|
-
rule_id: StrictStr,
|
847
|
-
_request_timeout: Union[
|
848
|
-
None,
|
849
|
-
Annotated[StrictFloat, Field(gt=0)],
|
850
|
-
Tuple[
|
851
|
-
Annotated[StrictFloat, Field(gt=0)],
|
852
|
-
Annotated[StrictFloat, Field(gt=0)]
|
853
|
-
]
|
854
|
-
] = None,
|
855
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
856
|
-
_content_type: Optional[StrictStr] = None,
|
857
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
858
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
859
|
-
) -> str:
|
860
|
-
"""delete_alert_rule_by_id
|
861
|
-
|
862
|
-
|
863
|
-
:param rule_id: (required)
|
864
|
-
:type rule_id: str
|
865
|
-
:param _request_timeout: timeout setting for this request. If one
|
866
|
-
number provided, it will be total request
|
867
|
-
timeout. It can also be a pair (tuple) of
|
868
|
-
(connection, read) timeouts.
|
869
|
-
:type _request_timeout: int, tuple(int, int), optional
|
870
|
-
:param _request_auth: set to override the auth_settings for an a single
|
871
|
-
request; this effectively ignores the
|
872
|
-
authentication in the spec for a single request.
|
873
|
-
:type _request_auth: dict, optional
|
874
|
-
:param _content_type: force content-type for the request.
|
875
|
-
:type _content_type: str, Optional
|
876
|
-
:param _headers: set to override the headers for a single
|
877
|
-
request; this effectively ignores the headers
|
878
|
-
in the spec for a single request.
|
879
|
-
:type _headers: dict, optional
|
880
|
-
:param _host_index: set to override the host_index for a single
|
881
|
-
request; this effectively ignores the host_index
|
882
|
-
in the spec for a single request.
|
883
|
-
:type _host_index: int, optional
|
884
|
-
:return: Returns the result object.
|
885
|
-
""" # noqa: E501
|
886
|
-
|
887
|
-
_param = self._delete_alert_rule_by_id_serialize(
|
888
|
-
rule_id=rule_id,
|
889
|
-
_request_auth=_request_auth,
|
890
|
-
_content_type=_content_type,
|
891
|
-
_headers=_headers,
|
892
|
-
_host_index=_host_index
|
893
|
-
)
|
894
|
-
|
895
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
896
|
-
'200': "str",
|
897
|
-
'500': "Error",
|
898
|
-
}
|
899
|
-
response_data = self.api_client.call_api(
|
900
|
-
*_param,
|
901
|
-
_request_timeout=_request_timeout
|
902
|
-
)
|
903
|
-
response_data.read()
|
904
|
-
return self.api_client.response_deserialize(
|
905
|
-
response_data=response_data,
|
906
|
-
response_types_map=_response_types_map,
|
907
|
-
).data
|
908
|
-
|
909
|
-
|
910
|
-
@validate_call
|
911
|
-
def delete_alert_rule_by_id_with_http_info(
|
912
|
-
self,
|
913
|
-
rule_id: StrictStr,
|
914
|
-
_request_timeout: Union[
|
915
|
-
None,
|
916
|
-
Annotated[StrictFloat, Field(gt=0)],
|
917
|
-
Tuple[
|
918
|
-
Annotated[StrictFloat, Field(gt=0)],
|
919
|
-
Annotated[StrictFloat, Field(gt=0)]
|
920
|
-
]
|
921
|
-
] = None,
|
922
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
923
|
-
_content_type: Optional[StrictStr] = None,
|
924
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
925
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
926
|
-
) -> ApiResponse[str]:
|
927
|
-
"""delete_alert_rule_by_id
|
928
|
-
|
929
|
-
|
930
|
-
:param rule_id: (required)
|
931
|
-
:type rule_id: str
|
932
|
-
:param _request_timeout: timeout setting for this request. If one
|
933
|
-
number provided, it will be total request
|
934
|
-
timeout. It can also be a pair (tuple) of
|
935
|
-
(connection, read) timeouts.
|
936
|
-
:type _request_timeout: int, tuple(int, int), optional
|
937
|
-
:param _request_auth: set to override the auth_settings for an a single
|
938
|
-
request; this effectively ignores the
|
939
|
-
authentication in the spec for a single request.
|
940
|
-
:type _request_auth: dict, optional
|
941
|
-
:param _content_type: force content-type for the request.
|
942
|
-
:type _content_type: str, Optional
|
943
|
-
:param _headers: set to override the headers for a single
|
944
|
-
request; this effectively ignores the headers
|
945
|
-
in the spec for a single request.
|
946
|
-
:type _headers: dict, optional
|
947
|
-
:param _host_index: set to override the host_index for a single
|
948
|
-
request; this effectively ignores the host_index
|
949
|
-
in the spec for a single request.
|
950
|
-
:type _host_index: int, optional
|
951
|
-
:return: Returns the result object.
|
952
|
-
""" # noqa: E501
|
953
|
-
|
954
|
-
_param = self._delete_alert_rule_by_id_serialize(
|
955
|
-
rule_id=rule_id,
|
956
|
-
_request_auth=_request_auth,
|
957
|
-
_content_type=_content_type,
|
958
|
-
_headers=_headers,
|
959
|
-
_host_index=_host_index
|
960
|
-
)
|
961
|
-
|
962
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
963
|
-
'200': "str",
|
964
|
-
'500': "Error",
|
965
|
-
}
|
966
|
-
response_data = self.api_client.call_api(
|
967
|
-
*_param,
|
968
|
-
_request_timeout=_request_timeout
|
969
|
-
)
|
970
|
-
response_data.read()
|
971
|
-
return self.api_client.response_deserialize(
|
972
|
-
response_data=response_data,
|
973
|
-
response_types_map=_response_types_map,
|
974
|
-
)
|
975
|
-
|
976
|
-
|
977
|
-
@validate_call
|
978
|
-
def delete_alert_rule_by_id_without_preload_content(
|
979
|
-
self,
|
980
|
-
rule_id: StrictStr,
|
981
|
-
_request_timeout: Union[
|
982
|
-
None,
|
983
|
-
Annotated[StrictFloat, Field(gt=0)],
|
984
|
-
Tuple[
|
985
|
-
Annotated[StrictFloat, Field(gt=0)],
|
986
|
-
Annotated[StrictFloat, Field(gt=0)]
|
987
|
-
]
|
988
|
-
] = None,
|
989
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
990
|
-
_content_type: Optional[StrictStr] = None,
|
991
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
992
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
993
|
-
) -> RESTResponseType:
|
994
|
-
"""delete_alert_rule_by_id
|
995
|
-
|
996
|
-
|
997
|
-
:param rule_id: (required)
|
998
|
-
:type rule_id: str
|
999
|
-
:param _request_timeout: timeout setting for this request. If one
|
1000
|
-
number provided, it will be total request
|
1001
|
-
timeout. It can also be a pair (tuple) of
|
1002
|
-
(connection, read) timeouts.
|
1003
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1004
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1005
|
-
request; this effectively ignores the
|
1006
|
-
authentication in the spec for a single request.
|
1007
|
-
:type _request_auth: dict, optional
|
1008
|
-
:param _content_type: force content-type for the request.
|
1009
|
-
:type _content_type: str, Optional
|
1010
|
-
:param _headers: set to override the headers for a single
|
1011
|
-
request; this effectively ignores the headers
|
1012
|
-
in the spec for a single request.
|
1013
|
-
:type _headers: dict, optional
|
1014
|
-
:param _host_index: set to override the host_index for a single
|
1015
|
-
request; this effectively ignores the host_index
|
1016
|
-
in the spec for a single request.
|
1017
|
-
:type _host_index: int, optional
|
1018
|
-
:return: Returns the result object.
|
1019
|
-
""" # noqa: E501
|
1020
|
-
|
1021
|
-
_param = self._delete_alert_rule_by_id_serialize(
|
1022
|
-
rule_id=rule_id,
|
1023
|
-
_request_auth=_request_auth,
|
1024
|
-
_content_type=_content_type,
|
1025
|
-
_headers=_headers,
|
1026
|
-
_host_index=_host_index
|
1027
|
-
)
|
1028
|
-
|
1029
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1030
|
-
'200': "str",
|
1031
|
-
'500': "Error",
|
1032
|
-
}
|
1033
|
-
response_data = self.api_client.call_api(
|
1034
|
-
*_param,
|
1035
|
-
_request_timeout=_request_timeout
|
1036
|
-
)
|
1037
|
-
return response_data.response
|
1038
|
-
|
1039
|
-
|
1040
|
-
def _delete_alert_rule_by_id_serialize(
|
1041
|
-
self,
|
1042
|
-
rule_id,
|
1043
|
-
_request_auth,
|
1044
|
-
_content_type,
|
1045
|
-
_headers,
|
1046
|
-
_host_index,
|
1047
|
-
) -> RequestSerialized:
|
1048
|
-
|
1049
|
-
_host = None
|
1050
|
-
|
1051
|
-
_collection_formats: Dict[str, str] = {
|
1052
|
-
}
|
1053
|
-
|
1054
|
-
_path_params: Dict[str, str] = {}
|
1055
|
-
_query_params: List[Tuple[str, str]] = []
|
1056
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1057
|
-
_form_params: List[Tuple[str, str]] = []
|
1058
|
-
_files: Dict[str, str] = {}
|
1059
|
-
_body_params: Optional[bytes] = None
|
1060
|
-
|
1061
|
-
# process the path parameters
|
1062
|
-
if rule_id is not None:
|
1063
|
-
_path_params['rule_id'] = rule_id
|
1064
|
-
# process the query parameters
|
1065
|
-
# process the header parameters
|
1066
|
-
# process the form parameters
|
1067
|
-
# process the body parameter
|
1068
|
-
|
1069
|
-
|
1070
|
-
# set the HTTP header `Accept`
|
1071
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
1072
|
-
[
|
1073
|
-
'application/json'
|
1074
|
-
]
|
1075
|
-
)
|
1076
|
-
|
1077
|
-
|
1078
|
-
# authentication setting
|
1079
|
-
_auth_settings: List[str] = [
|
1080
|
-
]
|
1081
|
-
|
1082
|
-
return self.api_client.param_serialize(
|
1083
|
-
method='DELETE',
|
1084
|
-
resource_path='/api/v1/alert/rule/{rule_id}',
|
1085
|
-
path_params=_path_params,
|
1086
|
-
query_params=_query_params,
|
1087
|
-
header_params=_header_params,
|
1088
|
-
body=_body_params,
|
1089
|
-
post_params=_form_params,
|
1090
|
-
files=_files,
|
1091
|
-
auth_settings=_auth_settings,
|
1092
|
-
collection_formats=_collection_formats,
|
1093
|
-
_host=_host,
|
1094
|
-
_request_auth=_request_auth
|
1095
|
-
)
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
@validate_call
|
1101
|
-
def list_alert_messages(
|
1102
|
-
self,
|
1103
|
-
alert_type: Optional[StrictStr] = None,
|
1104
|
-
status: Optional[StrictStr] = None,
|
1105
|
-
severity: Optional[StrictStr] = None,
|
1106
|
-
start_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
1107
|
-
end_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
1108
|
-
limit: Optional[StrictInt] = None,
|
1109
|
-
_request_timeout: Union[
|
1110
|
-
None,
|
1111
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1112
|
-
Tuple[
|
1113
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1114
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1115
|
-
]
|
1116
|
-
] = None,
|
1117
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1118
|
-
_content_type: Optional[StrictStr] = None,
|
1119
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1120
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1121
|
-
) -> List[GetAlertMessageResponse]:
|
1122
|
-
"""list_alert_messages
|
1123
|
-
|
1124
|
-
List all alert messages
|
1125
|
-
|
1126
|
-
:param alert_type:
|
1127
|
-
:type alert_type: str
|
1128
|
-
:param status:
|
1129
|
-
:type status: str
|
1130
|
-
:param severity:
|
1131
|
-
:type severity: str
|
1132
|
-
:param start_time: format with \"2023-02-21-11-56-30\"
|
1133
|
-
:type start_time: str
|
1134
|
-
:param end_time: format with \"2023-02-21-11-56-30\"
|
1135
|
-
:type end_time: str
|
1136
|
-
:param limit:
|
1137
|
-
:type limit: int
|
1138
|
-
:param _request_timeout: timeout setting for this request. If one
|
1139
|
-
number provided, it will be total request
|
1140
|
-
timeout. It can also be a pair (tuple) of
|
1141
|
-
(connection, read) timeouts.
|
1142
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1143
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1144
|
-
request; this effectively ignores the
|
1145
|
-
authentication in the spec for a single request.
|
1146
|
-
:type _request_auth: dict, optional
|
1147
|
-
:param _content_type: force content-type for the request.
|
1148
|
-
:type _content_type: str, Optional
|
1149
|
-
:param _headers: set to override the headers for a single
|
1150
|
-
request; this effectively ignores the headers
|
1151
|
-
in the spec for a single request.
|
1152
|
-
:type _headers: dict, optional
|
1153
|
-
:param _host_index: set to override the host_index for a single
|
1154
|
-
request; this effectively ignores the host_index
|
1155
|
-
in the spec for a single request.
|
1156
|
-
:type _host_index: int, optional
|
1157
|
-
:return: Returns the result object.
|
1158
|
-
""" # noqa: E501
|
1159
|
-
|
1160
|
-
_param = self._list_alert_messages_serialize(
|
1161
|
-
alert_type=alert_type,
|
1162
|
-
status=status,
|
1163
|
-
severity=severity,
|
1164
|
-
start_time=start_time,
|
1165
|
-
end_time=end_time,
|
1166
|
-
limit=limit,
|
1167
|
-
_request_auth=_request_auth,
|
1168
|
-
_content_type=_content_type,
|
1169
|
-
_headers=_headers,
|
1170
|
-
_host_index=_host_index
|
1171
|
-
)
|
1172
|
-
|
1173
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1174
|
-
'200': "List[GetAlertMessageResponse]",
|
1175
|
-
'500': "Error",
|
1176
|
-
}
|
1177
|
-
response_data = self.api_client.call_api(
|
1178
|
-
*_param,
|
1179
|
-
_request_timeout=_request_timeout
|
1180
|
-
)
|
1181
|
-
response_data.read()
|
1182
|
-
return self.api_client.response_deserialize(
|
1183
|
-
response_data=response_data,
|
1184
|
-
response_types_map=_response_types_map,
|
1185
|
-
).data
|
1186
|
-
|
1187
|
-
|
1188
|
-
@validate_call
|
1189
|
-
def list_alert_messages_with_http_info(
|
1190
|
-
self,
|
1191
|
-
alert_type: Optional[StrictStr] = None,
|
1192
|
-
status: Optional[StrictStr] = None,
|
1193
|
-
severity: Optional[StrictStr] = None,
|
1194
|
-
start_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
1195
|
-
end_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
1196
|
-
limit: Optional[StrictInt] = None,
|
1197
|
-
_request_timeout: Union[
|
1198
|
-
None,
|
1199
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1200
|
-
Tuple[
|
1201
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1202
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1203
|
-
]
|
1204
|
-
] = None,
|
1205
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1206
|
-
_content_type: Optional[StrictStr] = None,
|
1207
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1208
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1209
|
-
) -> ApiResponse[List[GetAlertMessageResponse]]:
|
1210
|
-
"""list_alert_messages
|
1211
|
-
|
1212
|
-
List all alert messages
|
1213
|
-
|
1214
|
-
:param alert_type:
|
1215
|
-
:type alert_type: str
|
1216
|
-
:param status:
|
1217
|
-
:type status: str
|
1218
|
-
:param severity:
|
1219
|
-
:type severity: str
|
1220
|
-
:param start_time: format with \"2023-02-21-11-56-30\"
|
1221
|
-
:type start_time: str
|
1222
|
-
:param end_time: format with \"2023-02-21-11-56-30\"
|
1223
|
-
:type end_time: str
|
1224
|
-
:param limit:
|
1225
|
-
:type limit: int
|
1226
|
-
:param _request_timeout: timeout setting for this request. If one
|
1227
|
-
number provided, it will be total request
|
1228
|
-
timeout. It can also be a pair (tuple) of
|
1229
|
-
(connection, read) timeouts.
|
1230
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1231
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1232
|
-
request; this effectively ignores the
|
1233
|
-
authentication in the spec for a single request.
|
1234
|
-
:type _request_auth: dict, optional
|
1235
|
-
:param _content_type: force content-type for the request.
|
1236
|
-
:type _content_type: str, Optional
|
1237
|
-
:param _headers: set to override the headers for a single
|
1238
|
-
request; this effectively ignores the headers
|
1239
|
-
in the spec for a single request.
|
1240
|
-
:type _headers: dict, optional
|
1241
|
-
:param _host_index: set to override the host_index for a single
|
1242
|
-
request; this effectively ignores the host_index
|
1243
|
-
in the spec for a single request.
|
1244
|
-
:type _host_index: int, optional
|
1245
|
-
:return: Returns the result object.
|
1246
|
-
""" # noqa: E501
|
1247
|
-
|
1248
|
-
_param = self._list_alert_messages_serialize(
|
1249
|
-
alert_type=alert_type,
|
1250
|
-
status=status,
|
1251
|
-
severity=severity,
|
1252
|
-
start_time=start_time,
|
1253
|
-
end_time=end_time,
|
1254
|
-
limit=limit,
|
1255
|
-
_request_auth=_request_auth,
|
1256
|
-
_content_type=_content_type,
|
1257
|
-
_headers=_headers,
|
1258
|
-
_host_index=_host_index
|
1259
|
-
)
|
1260
|
-
|
1261
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1262
|
-
'200': "List[GetAlertMessageResponse]",
|
1263
|
-
'500': "Error",
|
1264
|
-
}
|
1265
|
-
response_data = self.api_client.call_api(
|
1266
|
-
*_param,
|
1267
|
-
_request_timeout=_request_timeout
|
1268
|
-
)
|
1269
|
-
response_data.read()
|
1270
|
-
return self.api_client.response_deserialize(
|
1271
|
-
response_data=response_data,
|
1272
|
-
response_types_map=_response_types_map,
|
1273
|
-
)
|
1274
|
-
|
1275
|
-
|
1276
|
-
@validate_call
|
1277
|
-
def list_alert_messages_without_preload_content(
|
1278
|
-
self,
|
1279
|
-
alert_type: Optional[StrictStr] = None,
|
1280
|
-
status: Optional[StrictStr] = None,
|
1281
|
-
severity: Optional[StrictStr] = None,
|
1282
|
-
start_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
1283
|
-
end_time: Annotated[Optional[StrictStr], Field(description="format with \"2023-02-21-11-56-30\"")] = None,
|
1284
|
-
limit: Optional[StrictInt] = None,
|
1285
|
-
_request_timeout: Union[
|
1286
|
-
None,
|
1287
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1288
|
-
Tuple[
|
1289
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1290
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1291
|
-
]
|
1292
|
-
] = None,
|
1293
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1294
|
-
_content_type: Optional[StrictStr] = None,
|
1295
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1296
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1297
|
-
) -> RESTResponseType:
|
1298
|
-
"""list_alert_messages
|
1299
|
-
|
1300
|
-
List all alert messages
|
1301
|
-
|
1302
|
-
:param alert_type:
|
1303
|
-
:type alert_type: str
|
1304
|
-
:param status:
|
1305
|
-
:type status: str
|
1306
|
-
:param severity:
|
1307
|
-
:type severity: str
|
1308
|
-
:param start_time: format with \"2023-02-21-11-56-30\"
|
1309
|
-
:type start_time: str
|
1310
|
-
:param end_time: format with \"2023-02-21-11-56-30\"
|
1311
|
-
:type end_time: str
|
1312
|
-
:param limit:
|
1313
|
-
:type limit: int
|
1314
|
-
:param _request_timeout: timeout setting for this request. If one
|
1315
|
-
number provided, it will be total request
|
1316
|
-
timeout. It can also be a pair (tuple) of
|
1317
|
-
(connection, read) timeouts.
|
1318
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1319
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1320
|
-
request; this effectively ignores the
|
1321
|
-
authentication in the spec for a single request.
|
1322
|
-
:type _request_auth: dict, optional
|
1323
|
-
:param _content_type: force content-type for the request.
|
1324
|
-
:type _content_type: str, Optional
|
1325
|
-
:param _headers: set to override the headers for a single
|
1326
|
-
request; this effectively ignores the headers
|
1327
|
-
in the spec for a single request.
|
1328
|
-
:type _headers: dict, optional
|
1329
|
-
:param _host_index: set to override the host_index for a single
|
1330
|
-
request; this effectively ignores the host_index
|
1331
|
-
in the spec for a single request.
|
1332
|
-
:type _host_index: int, optional
|
1333
|
-
:return: Returns the result object.
|
1334
|
-
""" # noqa: E501
|
1335
|
-
|
1336
|
-
_param = self._list_alert_messages_serialize(
|
1337
|
-
alert_type=alert_type,
|
1338
|
-
status=status,
|
1339
|
-
severity=severity,
|
1340
|
-
start_time=start_time,
|
1341
|
-
end_time=end_time,
|
1342
|
-
limit=limit,
|
1343
|
-
_request_auth=_request_auth,
|
1344
|
-
_content_type=_content_type,
|
1345
|
-
_headers=_headers,
|
1346
|
-
_host_index=_host_index
|
1347
|
-
)
|
1348
|
-
|
1349
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1350
|
-
'200': "List[GetAlertMessageResponse]",
|
1351
|
-
'500': "Error",
|
1352
|
-
}
|
1353
|
-
response_data = self.api_client.call_api(
|
1354
|
-
*_param,
|
1355
|
-
_request_timeout=_request_timeout
|
1356
|
-
)
|
1357
|
-
return response_data.response
|
1358
|
-
|
1359
|
-
|
1360
|
-
def _list_alert_messages_serialize(
|
1361
|
-
self,
|
1362
|
-
alert_type,
|
1363
|
-
status,
|
1364
|
-
severity,
|
1365
|
-
start_time,
|
1366
|
-
end_time,
|
1367
|
-
limit,
|
1368
|
-
_request_auth,
|
1369
|
-
_content_type,
|
1370
|
-
_headers,
|
1371
|
-
_host_index,
|
1372
|
-
) -> RequestSerialized:
|
1373
|
-
|
1374
|
-
_host = None
|
1375
|
-
|
1376
|
-
_collection_formats: Dict[str, str] = {
|
1377
|
-
}
|
1378
|
-
|
1379
|
-
_path_params: Dict[str, str] = {}
|
1380
|
-
_query_params: List[Tuple[str, str]] = []
|
1381
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1382
|
-
_form_params: List[Tuple[str, str]] = []
|
1383
|
-
_files: Dict[str, str] = {}
|
1384
|
-
_body_params: Optional[bytes] = None
|
1385
|
-
|
1386
|
-
# process the path parameters
|
1387
|
-
# process the query parameters
|
1388
|
-
if alert_type is not None:
|
1389
|
-
|
1390
|
-
_query_params.append(('alert_type', alert_type))
|
1391
|
-
|
1392
|
-
if status is not None:
|
1393
|
-
|
1394
|
-
_query_params.append(('status', status))
|
1395
|
-
|
1396
|
-
if severity is not None:
|
1397
|
-
|
1398
|
-
_query_params.append(('severity', severity))
|
1399
|
-
|
1400
|
-
if start_time is not None:
|
1401
|
-
|
1402
|
-
_query_params.append(('start_time', start_time))
|
1403
|
-
|
1404
|
-
if end_time is not None:
|
1405
|
-
|
1406
|
-
_query_params.append(('end_time', end_time))
|
1407
|
-
|
1408
|
-
if limit is not None:
|
1409
|
-
|
1410
|
-
_query_params.append(('limit', limit))
|
1411
|
-
|
1412
|
-
# process the header parameters
|
1413
|
-
# process the form parameters
|
1414
|
-
# process the body parameter
|
1415
|
-
|
1416
|
-
|
1417
|
-
# set the HTTP header `Accept`
|
1418
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
1419
|
-
[
|
1420
|
-
'application/json'
|
1421
|
-
]
|
1422
|
-
)
|
1423
|
-
|
1424
|
-
|
1425
|
-
# authentication setting
|
1426
|
-
_auth_settings: List[str] = [
|
1427
|
-
]
|
1428
|
-
|
1429
|
-
return self.api_client.param_serialize(
|
1430
|
-
method='GET',
|
1431
|
-
resource_path='/api/v1/alert/message',
|
1432
|
-
path_params=_path_params,
|
1433
|
-
query_params=_query_params,
|
1434
|
-
header_params=_header_params,
|
1435
|
-
body=_body_params,
|
1436
|
-
post_params=_form_params,
|
1437
|
-
files=_files,
|
1438
|
-
auth_settings=_auth_settings,
|
1439
|
-
collection_formats=_collection_formats,
|
1440
|
-
_host=_host,
|
1441
|
-
_request_auth=_request_auth
|
1442
|
-
)
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
@validate_call
|
1448
|
-
def list_alert_receivers(
|
1449
|
-
self,
|
1450
|
-
_request_timeout: Union[
|
1451
|
-
None,
|
1452
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1453
|
-
Tuple[
|
1454
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1455
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1456
|
-
]
|
1457
|
-
] = None,
|
1458
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1459
|
-
_content_type: Optional[StrictStr] = None,
|
1460
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1461
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1462
|
-
) -> List[GetAlertReceiverResponse]:
|
1463
|
-
"""list_alert_receivers
|
1464
|
-
|
1465
|
-
List all alert receivers
|
1466
|
-
|
1467
|
-
:param _request_timeout: timeout setting for this request. If one
|
1468
|
-
number provided, it will be total request
|
1469
|
-
timeout. It can also be a pair (tuple) of
|
1470
|
-
(connection, read) timeouts.
|
1471
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1472
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1473
|
-
request; this effectively ignores the
|
1474
|
-
authentication in the spec for a single request.
|
1475
|
-
:type _request_auth: dict, optional
|
1476
|
-
:param _content_type: force content-type for the request.
|
1477
|
-
:type _content_type: str, Optional
|
1478
|
-
:param _headers: set to override the headers for a single
|
1479
|
-
request; this effectively ignores the headers
|
1480
|
-
in the spec for a single request.
|
1481
|
-
:type _headers: dict, optional
|
1482
|
-
:param _host_index: set to override the host_index for a single
|
1483
|
-
request; this effectively ignores the host_index
|
1484
|
-
in the spec for a single request.
|
1485
|
-
:type _host_index: int, optional
|
1486
|
-
:return: Returns the result object.
|
1487
|
-
""" # noqa: E501
|
1488
|
-
|
1489
|
-
_param = self._list_alert_receivers_serialize(
|
1490
|
-
_request_auth=_request_auth,
|
1491
|
-
_content_type=_content_type,
|
1492
|
-
_headers=_headers,
|
1493
|
-
_host_index=_host_index
|
1494
|
-
)
|
1495
|
-
|
1496
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1497
|
-
'200': "List[GetAlertReceiverResponse]",
|
1498
|
-
'500': "Error",
|
1499
|
-
}
|
1500
|
-
response_data = self.api_client.call_api(
|
1501
|
-
*_param,
|
1502
|
-
_request_timeout=_request_timeout
|
1503
|
-
)
|
1504
|
-
response_data.read()
|
1505
|
-
return self.api_client.response_deserialize(
|
1506
|
-
response_data=response_data,
|
1507
|
-
response_types_map=_response_types_map,
|
1508
|
-
).data
|
1509
|
-
|
1510
|
-
|
1511
|
-
@validate_call
|
1512
|
-
def list_alert_receivers_with_http_info(
|
1513
|
-
self,
|
1514
|
-
_request_timeout: Union[
|
1515
|
-
None,
|
1516
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1517
|
-
Tuple[
|
1518
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1519
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1520
|
-
]
|
1521
|
-
] = None,
|
1522
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1523
|
-
_content_type: Optional[StrictStr] = None,
|
1524
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1525
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1526
|
-
) -> ApiResponse[List[GetAlertReceiverResponse]]:
|
1527
|
-
"""list_alert_receivers
|
1528
|
-
|
1529
|
-
List all alert receivers
|
1530
|
-
|
1531
|
-
:param _request_timeout: timeout setting for this request. If one
|
1532
|
-
number provided, it will be total request
|
1533
|
-
timeout. It can also be a pair (tuple) of
|
1534
|
-
(connection, read) timeouts.
|
1535
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1536
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1537
|
-
request; this effectively ignores the
|
1538
|
-
authentication in the spec for a single request.
|
1539
|
-
:type _request_auth: dict, optional
|
1540
|
-
:param _content_type: force content-type for the request.
|
1541
|
-
:type _content_type: str, Optional
|
1542
|
-
:param _headers: set to override the headers for a single
|
1543
|
-
request; this effectively ignores the headers
|
1544
|
-
in the spec for a single request.
|
1545
|
-
:type _headers: dict, optional
|
1546
|
-
:param _host_index: set to override the host_index for a single
|
1547
|
-
request; this effectively ignores the host_index
|
1548
|
-
in the spec for a single request.
|
1549
|
-
:type _host_index: int, optional
|
1550
|
-
:return: Returns the result object.
|
1551
|
-
""" # noqa: E501
|
1552
|
-
|
1553
|
-
_param = self._list_alert_receivers_serialize(
|
1554
|
-
_request_auth=_request_auth,
|
1555
|
-
_content_type=_content_type,
|
1556
|
-
_headers=_headers,
|
1557
|
-
_host_index=_host_index
|
1558
|
-
)
|
1559
|
-
|
1560
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1561
|
-
'200': "List[GetAlertReceiverResponse]",
|
1562
|
-
'500': "Error",
|
1563
|
-
}
|
1564
|
-
response_data = self.api_client.call_api(
|
1565
|
-
*_param,
|
1566
|
-
_request_timeout=_request_timeout
|
1567
|
-
)
|
1568
|
-
response_data.read()
|
1569
|
-
return self.api_client.response_deserialize(
|
1570
|
-
response_data=response_data,
|
1571
|
-
response_types_map=_response_types_map,
|
1572
|
-
)
|
1573
|
-
|
1574
|
-
|
1575
|
-
@validate_call
|
1576
|
-
def list_alert_receivers_without_preload_content(
|
1577
|
-
self,
|
1578
|
-
_request_timeout: Union[
|
1579
|
-
None,
|
1580
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1581
|
-
Tuple[
|
1582
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1583
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1584
|
-
]
|
1585
|
-
] = None,
|
1586
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1587
|
-
_content_type: Optional[StrictStr] = None,
|
1588
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1589
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1590
|
-
) -> RESTResponseType:
|
1591
|
-
"""list_alert_receivers
|
1592
|
-
|
1593
|
-
List all alert receivers
|
1594
|
-
|
1595
|
-
:param _request_timeout: timeout setting for this request. If one
|
1596
|
-
number provided, it will be total request
|
1597
|
-
timeout. It can also be a pair (tuple) of
|
1598
|
-
(connection, read) timeouts.
|
1599
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1600
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1601
|
-
request; this effectively ignores the
|
1602
|
-
authentication in the spec for a single request.
|
1603
|
-
:type _request_auth: dict, optional
|
1604
|
-
:param _content_type: force content-type for the request.
|
1605
|
-
:type _content_type: str, Optional
|
1606
|
-
:param _headers: set to override the headers for a single
|
1607
|
-
request; this effectively ignores the headers
|
1608
|
-
in the spec for a single request.
|
1609
|
-
:type _headers: dict, optional
|
1610
|
-
:param _host_index: set to override the host_index for a single
|
1611
|
-
request; this effectively ignores the host_index
|
1612
|
-
in the spec for a single request.
|
1613
|
-
:type _host_index: int, optional
|
1614
|
-
:return: Returns the result object.
|
1615
|
-
""" # noqa: E501
|
1616
|
-
|
1617
|
-
_param = self._list_alert_receivers_serialize(
|
1618
|
-
_request_auth=_request_auth,
|
1619
|
-
_content_type=_content_type,
|
1620
|
-
_headers=_headers,
|
1621
|
-
_host_index=_host_index
|
1622
|
-
)
|
1623
|
-
|
1624
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1625
|
-
'200': "List[GetAlertReceiverResponse]",
|
1626
|
-
'500': "Error",
|
1627
|
-
}
|
1628
|
-
response_data = self.api_client.call_api(
|
1629
|
-
*_param,
|
1630
|
-
_request_timeout=_request_timeout
|
1631
|
-
)
|
1632
|
-
return response_data.response
|
1633
|
-
|
1634
|
-
|
1635
|
-
def _list_alert_receivers_serialize(
|
1636
|
-
self,
|
1637
|
-
_request_auth,
|
1638
|
-
_content_type,
|
1639
|
-
_headers,
|
1640
|
-
_host_index,
|
1641
|
-
) -> RequestSerialized:
|
1642
|
-
|
1643
|
-
_host = None
|
1644
|
-
|
1645
|
-
_collection_formats: Dict[str, str] = {
|
1646
|
-
}
|
1647
|
-
|
1648
|
-
_path_params: Dict[str, str] = {}
|
1649
|
-
_query_params: List[Tuple[str, str]] = []
|
1650
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1651
|
-
_form_params: List[Tuple[str, str]] = []
|
1652
|
-
_files: Dict[str, str] = {}
|
1653
|
-
_body_params: Optional[bytes] = None
|
1654
|
-
|
1655
|
-
# process the path parameters
|
1656
|
-
# process the query parameters
|
1657
|
-
# process the header parameters
|
1658
|
-
# process the form parameters
|
1659
|
-
# process the body parameter
|
1660
|
-
|
1661
|
-
|
1662
|
-
# set the HTTP header `Accept`
|
1663
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
1664
|
-
[
|
1665
|
-
'application/json'
|
1666
|
-
]
|
1667
|
-
)
|
1668
|
-
|
1669
|
-
|
1670
|
-
# authentication setting
|
1671
|
-
_auth_settings: List[str] = [
|
1672
|
-
]
|
1673
|
-
|
1674
|
-
return self.api_client.param_serialize(
|
1675
|
-
method='GET',
|
1676
|
-
resource_path='/api/v1/alert/receiver',
|
1677
|
-
path_params=_path_params,
|
1678
|
-
query_params=_query_params,
|
1679
|
-
header_params=_header_params,
|
1680
|
-
body=_body_params,
|
1681
|
-
post_params=_form_params,
|
1682
|
-
files=_files,
|
1683
|
-
auth_settings=_auth_settings,
|
1684
|
-
collection_formats=_collection_formats,
|
1685
|
-
_host=_host,
|
1686
|
-
_request_auth=_request_auth
|
1687
|
-
)
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1692
|
-
@validate_call
|
1693
|
-
def list_alert_rules(
|
1694
|
-
self,
|
1695
|
-
_request_timeout: Union[
|
1696
|
-
None,
|
1697
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1698
|
-
Tuple[
|
1699
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1700
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1701
|
-
]
|
1702
|
-
] = None,
|
1703
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1704
|
-
_content_type: Optional[StrictStr] = None,
|
1705
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1706
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1707
|
-
) -> List[GetAlertRuleResponse]:
|
1708
|
-
"""list_alert_rules
|
1709
|
-
|
1710
|
-
List all alert rules
|
1711
|
-
|
1712
|
-
:param _request_timeout: timeout setting for this request. If one
|
1713
|
-
number provided, it will be total request
|
1714
|
-
timeout. It can also be a pair (tuple) of
|
1715
|
-
(connection, read) timeouts.
|
1716
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1717
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1718
|
-
request; this effectively ignores the
|
1719
|
-
authentication in the spec for a single request.
|
1720
|
-
:type _request_auth: dict, optional
|
1721
|
-
:param _content_type: force content-type for the request.
|
1722
|
-
:type _content_type: str, Optional
|
1723
|
-
:param _headers: set to override the headers for a single
|
1724
|
-
request; this effectively ignores the headers
|
1725
|
-
in the spec for a single request.
|
1726
|
-
:type _headers: dict, optional
|
1727
|
-
:param _host_index: set to override the host_index for a single
|
1728
|
-
request; this effectively ignores the host_index
|
1729
|
-
in the spec for a single request.
|
1730
|
-
:type _host_index: int, optional
|
1731
|
-
:return: Returns the result object.
|
1732
|
-
""" # noqa: E501
|
1733
|
-
|
1734
|
-
_param = self._list_alert_rules_serialize(
|
1735
|
-
_request_auth=_request_auth,
|
1736
|
-
_content_type=_content_type,
|
1737
|
-
_headers=_headers,
|
1738
|
-
_host_index=_host_index
|
1739
|
-
)
|
1740
|
-
|
1741
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1742
|
-
'200': "List[GetAlertRuleResponse]",
|
1743
|
-
'500': "Error",
|
1744
|
-
}
|
1745
|
-
response_data = self.api_client.call_api(
|
1746
|
-
*_param,
|
1747
|
-
_request_timeout=_request_timeout
|
1748
|
-
)
|
1749
|
-
response_data.read()
|
1750
|
-
return self.api_client.response_deserialize(
|
1751
|
-
response_data=response_data,
|
1752
|
-
response_types_map=_response_types_map,
|
1753
|
-
).data
|
1754
|
-
|
1755
|
-
|
1756
|
-
@validate_call
|
1757
|
-
def list_alert_rules_with_http_info(
|
1758
|
-
self,
|
1759
|
-
_request_timeout: Union[
|
1760
|
-
None,
|
1761
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1762
|
-
Tuple[
|
1763
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1764
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1765
|
-
]
|
1766
|
-
] = None,
|
1767
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1768
|
-
_content_type: Optional[StrictStr] = None,
|
1769
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1770
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1771
|
-
) -> ApiResponse[List[GetAlertRuleResponse]]:
|
1772
|
-
"""list_alert_rules
|
1773
|
-
|
1774
|
-
List all alert rules
|
1775
|
-
|
1776
|
-
:param _request_timeout: timeout setting for this request. If one
|
1777
|
-
number provided, it will be total request
|
1778
|
-
timeout. It can also be a pair (tuple) of
|
1779
|
-
(connection, read) timeouts.
|
1780
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1781
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1782
|
-
request; this effectively ignores the
|
1783
|
-
authentication in the spec for a single request.
|
1784
|
-
:type _request_auth: dict, optional
|
1785
|
-
:param _content_type: force content-type for the request.
|
1786
|
-
:type _content_type: str, Optional
|
1787
|
-
:param _headers: set to override the headers for a single
|
1788
|
-
request; this effectively ignores the headers
|
1789
|
-
in the spec for a single request.
|
1790
|
-
:type _headers: dict, optional
|
1791
|
-
:param _host_index: set to override the host_index for a single
|
1792
|
-
request; this effectively ignores the host_index
|
1793
|
-
in the spec for a single request.
|
1794
|
-
:type _host_index: int, optional
|
1795
|
-
:return: Returns the result object.
|
1796
|
-
""" # noqa: E501
|
1797
|
-
|
1798
|
-
_param = self._list_alert_rules_serialize(
|
1799
|
-
_request_auth=_request_auth,
|
1800
|
-
_content_type=_content_type,
|
1801
|
-
_headers=_headers,
|
1802
|
-
_host_index=_host_index
|
1803
|
-
)
|
1804
|
-
|
1805
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1806
|
-
'200': "List[GetAlertRuleResponse]",
|
1807
|
-
'500': "Error",
|
1808
|
-
}
|
1809
|
-
response_data = self.api_client.call_api(
|
1810
|
-
*_param,
|
1811
|
-
_request_timeout=_request_timeout
|
1812
|
-
)
|
1813
|
-
response_data.read()
|
1814
|
-
return self.api_client.response_deserialize(
|
1815
|
-
response_data=response_data,
|
1816
|
-
response_types_map=_response_types_map,
|
1817
|
-
)
|
1818
|
-
|
1819
|
-
|
1820
|
-
@validate_call
|
1821
|
-
def list_alert_rules_without_preload_content(
|
1822
|
-
self,
|
1823
|
-
_request_timeout: Union[
|
1824
|
-
None,
|
1825
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1826
|
-
Tuple[
|
1827
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1828
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1829
|
-
]
|
1830
|
-
] = None,
|
1831
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1832
|
-
_content_type: Optional[StrictStr] = None,
|
1833
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1834
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1835
|
-
) -> RESTResponseType:
|
1836
|
-
"""list_alert_rules
|
1837
|
-
|
1838
|
-
List all alert rules
|
1839
|
-
|
1840
|
-
:param _request_timeout: timeout setting for this request. If one
|
1841
|
-
number provided, it will be total request
|
1842
|
-
timeout. It can also be a pair (tuple) of
|
1843
|
-
(connection, read) timeouts.
|
1844
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1845
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1846
|
-
request; this effectively ignores the
|
1847
|
-
authentication in the spec for a single request.
|
1848
|
-
:type _request_auth: dict, optional
|
1849
|
-
:param _content_type: force content-type for the request.
|
1850
|
-
:type _content_type: str, Optional
|
1851
|
-
:param _headers: set to override the headers for a single
|
1852
|
-
request; this effectively ignores the headers
|
1853
|
-
in the spec for a single request.
|
1854
|
-
:type _headers: dict, optional
|
1855
|
-
:param _host_index: set to override the host_index for a single
|
1856
|
-
request; this effectively ignores the host_index
|
1857
|
-
in the spec for a single request.
|
1858
|
-
:type _host_index: int, optional
|
1859
|
-
:return: Returns the result object.
|
1860
|
-
""" # noqa: E501
|
1861
|
-
|
1862
|
-
_param = self._list_alert_rules_serialize(
|
1863
|
-
_request_auth=_request_auth,
|
1864
|
-
_content_type=_content_type,
|
1865
|
-
_headers=_headers,
|
1866
|
-
_host_index=_host_index
|
1867
|
-
)
|
1868
|
-
|
1869
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1870
|
-
'200': "List[GetAlertRuleResponse]",
|
1871
|
-
'500': "Error",
|
1872
|
-
}
|
1873
|
-
response_data = self.api_client.call_api(
|
1874
|
-
*_param,
|
1875
|
-
_request_timeout=_request_timeout
|
1876
|
-
)
|
1877
|
-
return response_data.response
|
1878
|
-
|
1879
|
-
|
1880
|
-
def _list_alert_rules_serialize(
|
1881
|
-
self,
|
1882
|
-
_request_auth,
|
1883
|
-
_content_type,
|
1884
|
-
_headers,
|
1885
|
-
_host_index,
|
1886
|
-
) -> RequestSerialized:
|
1887
|
-
|
1888
|
-
_host = None
|
1889
|
-
|
1890
|
-
_collection_formats: Dict[str, str] = {
|
1891
|
-
}
|
1892
|
-
|
1893
|
-
_path_params: Dict[str, str] = {}
|
1894
|
-
_query_params: List[Tuple[str, str]] = []
|
1895
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1896
|
-
_form_params: List[Tuple[str, str]] = []
|
1897
|
-
_files: Dict[str, str] = {}
|
1898
|
-
_body_params: Optional[bytes] = None
|
1899
|
-
|
1900
|
-
# process the path parameters
|
1901
|
-
# process the query parameters
|
1902
|
-
# process the header parameters
|
1903
|
-
# process the form parameters
|
1904
|
-
# process the body parameter
|
1905
|
-
|
1906
|
-
|
1907
|
-
# set the HTTP header `Accept`
|
1908
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
1909
|
-
[
|
1910
|
-
'application/json'
|
1911
|
-
]
|
1912
|
-
)
|
1913
|
-
|
1914
|
-
|
1915
|
-
# authentication setting
|
1916
|
-
_auth_settings: List[str] = [
|
1917
|
-
]
|
1918
|
-
|
1919
|
-
return self.api_client.param_serialize(
|
1920
|
-
method='GET',
|
1921
|
-
resource_path='/api/v1/alert/rule',
|
1922
|
-
path_params=_path_params,
|
1923
|
-
query_params=_query_params,
|
1924
|
-
header_params=_header_params,
|
1925
|
-
body=_body_params,
|
1926
|
-
post_params=_form_params,
|
1927
|
-
files=_files,
|
1928
|
-
auth_settings=_auth_settings,
|
1929
|
-
collection_formats=_collection_formats,
|
1930
|
-
_host=_host,
|
1931
|
-
_request_auth=_request_auth
|
1932
|
-
)
|
1933
|
-
|
1934
|
-
|
1935
|
-
|
1936
|
-
|
1937
|
-
@validate_call
|
1938
|
-
def update_alert_message_in_batch(
|
1939
|
-
self,
|
1940
|
-
update_alert_message_status_request: Optional[UpdateAlertMessageStatusRequest] = None,
|
1941
|
-
_request_timeout: Union[
|
1942
|
-
None,
|
1943
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1944
|
-
Tuple[
|
1945
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1946
|
-
Annotated[StrictFloat, Field(gt=0)]
|
1947
|
-
]
|
1948
|
-
] = None,
|
1949
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1950
|
-
_content_type: Optional[StrictStr] = None,
|
1951
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1952
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1953
|
-
) -> str:
|
1954
|
-
"""update_alert_message_in_batch
|
1955
|
-
|
1956
|
-
Update the message status in batch
|
1957
|
-
|
1958
|
-
:param update_alert_message_status_request:
|
1959
|
-
:type update_alert_message_status_request: UpdateAlertMessageStatusRequest
|
1960
|
-
:param _request_timeout: timeout setting for this request. If one
|
1961
|
-
number provided, it will be total request
|
1962
|
-
timeout. It can also be a pair (tuple) of
|
1963
|
-
(connection, read) timeouts.
|
1964
|
-
:type _request_timeout: int, tuple(int, int), optional
|
1965
|
-
:param _request_auth: set to override the auth_settings for an a single
|
1966
|
-
request; this effectively ignores the
|
1967
|
-
authentication in the spec for a single request.
|
1968
|
-
:type _request_auth: dict, optional
|
1969
|
-
:param _content_type: force content-type for the request.
|
1970
|
-
:type _content_type: str, Optional
|
1971
|
-
:param _headers: set to override the headers for a single
|
1972
|
-
request; this effectively ignores the headers
|
1973
|
-
in the spec for a single request.
|
1974
|
-
:type _headers: dict, optional
|
1975
|
-
:param _host_index: set to override the host_index for a single
|
1976
|
-
request; this effectively ignores the host_index
|
1977
|
-
in the spec for a single request.
|
1978
|
-
:type _host_index: int, optional
|
1979
|
-
:return: Returns the result object.
|
1980
|
-
""" # noqa: E501
|
1981
|
-
|
1982
|
-
_param = self._update_alert_message_in_batch_serialize(
|
1983
|
-
update_alert_message_status_request=update_alert_message_status_request,
|
1984
|
-
_request_auth=_request_auth,
|
1985
|
-
_content_type=_content_type,
|
1986
|
-
_headers=_headers,
|
1987
|
-
_host_index=_host_index
|
1988
|
-
)
|
1989
|
-
|
1990
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
1991
|
-
'200': "str",
|
1992
|
-
'500': "Error",
|
1993
|
-
}
|
1994
|
-
response_data = self.api_client.call_api(
|
1995
|
-
*_param,
|
1996
|
-
_request_timeout=_request_timeout
|
1997
|
-
)
|
1998
|
-
response_data.read()
|
1999
|
-
return self.api_client.response_deserialize(
|
2000
|
-
response_data=response_data,
|
2001
|
-
response_types_map=_response_types_map,
|
2002
|
-
).data
|
2003
|
-
|
2004
|
-
|
2005
|
-
@validate_call
|
2006
|
-
def update_alert_message_in_batch_with_http_info(
|
2007
|
-
self,
|
2008
|
-
update_alert_message_status_request: Optional[UpdateAlertMessageStatusRequest] = None,
|
2009
|
-
_request_timeout: Union[
|
2010
|
-
None,
|
2011
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2012
|
-
Tuple[
|
2013
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2014
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2015
|
-
]
|
2016
|
-
] = None,
|
2017
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2018
|
-
_content_type: Optional[StrictStr] = None,
|
2019
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2020
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2021
|
-
) -> ApiResponse[str]:
|
2022
|
-
"""update_alert_message_in_batch
|
2023
|
-
|
2024
|
-
Update the message status in batch
|
2025
|
-
|
2026
|
-
:param update_alert_message_status_request:
|
2027
|
-
:type update_alert_message_status_request: UpdateAlertMessageStatusRequest
|
2028
|
-
:param _request_timeout: timeout setting for this request. If one
|
2029
|
-
number provided, it will be total request
|
2030
|
-
timeout. It can also be a pair (tuple) of
|
2031
|
-
(connection, read) timeouts.
|
2032
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2033
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2034
|
-
request; this effectively ignores the
|
2035
|
-
authentication in the spec for a single request.
|
2036
|
-
:type _request_auth: dict, optional
|
2037
|
-
:param _content_type: force content-type for the request.
|
2038
|
-
:type _content_type: str, Optional
|
2039
|
-
:param _headers: set to override the headers for a single
|
2040
|
-
request; this effectively ignores the headers
|
2041
|
-
in the spec for a single request.
|
2042
|
-
:type _headers: dict, optional
|
2043
|
-
:param _host_index: set to override the host_index for a single
|
2044
|
-
request; this effectively ignores the host_index
|
2045
|
-
in the spec for a single request.
|
2046
|
-
:type _host_index: int, optional
|
2047
|
-
:return: Returns the result object.
|
2048
|
-
""" # noqa: E501
|
2049
|
-
|
2050
|
-
_param = self._update_alert_message_in_batch_serialize(
|
2051
|
-
update_alert_message_status_request=update_alert_message_status_request,
|
2052
|
-
_request_auth=_request_auth,
|
2053
|
-
_content_type=_content_type,
|
2054
|
-
_headers=_headers,
|
2055
|
-
_host_index=_host_index
|
2056
|
-
)
|
2057
|
-
|
2058
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2059
|
-
'200': "str",
|
2060
|
-
'500': "Error",
|
2061
|
-
}
|
2062
|
-
response_data = self.api_client.call_api(
|
2063
|
-
*_param,
|
2064
|
-
_request_timeout=_request_timeout
|
2065
|
-
)
|
2066
|
-
response_data.read()
|
2067
|
-
return self.api_client.response_deserialize(
|
2068
|
-
response_data=response_data,
|
2069
|
-
response_types_map=_response_types_map,
|
2070
|
-
)
|
2071
|
-
|
2072
|
-
|
2073
|
-
@validate_call
|
2074
|
-
def update_alert_message_in_batch_without_preload_content(
|
2075
|
-
self,
|
2076
|
-
update_alert_message_status_request: Optional[UpdateAlertMessageStatusRequest] = None,
|
2077
|
-
_request_timeout: Union[
|
2078
|
-
None,
|
2079
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2080
|
-
Tuple[
|
2081
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2082
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2083
|
-
]
|
2084
|
-
] = None,
|
2085
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2086
|
-
_content_type: Optional[StrictStr] = None,
|
2087
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2088
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2089
|
-
) -> RESTResponseType:
|
2090
|
-
"""update_alert_message_in_batch
|
2091
|
-
|
2092
|
-
Update the message status in batch
|
2093
|
-
|
2094
|
-
:param update_alert_message_status_request:
|
2095
|
-
:type update_alert_message_status_request: UpdateAlertMessageStatusRequest
|
2096
|
-
:param _request_timeout: timeout setting for this request. If one
|
2097
|
-
number provided, it will be total request
|
2098
|
-
timeout. It can also be a pair (tuple) of
|
2099
|
-
(connection, read) timeouts.
|
2100
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2101
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2102
|
-
request; this effectively ignores the
|
2103
|
-
authentication in the spec for a single request.
|
2104
|
-
:type _request_auth: dict, optional
|
2105
|
-
:param _content_type: force content-type for the request.
|
2106
|
-
:type _content_type: str, Optional
|
2107
|
-
:param _headers: set to override the headers for a single
|
2108
|
-
request; this effectively ignores the headers
|
2109
|
-
in the spec for a single request.
|
2110
|
-
:type _headers: dict, optional
|
2111
|
-
:param _host_index: set to override the host_index for a single
|
2112
|
-
request; this effectively ignores the host_index
|
2113
|
-
in the spec for a single request.
|
2114
|
-
:type _host_index: int, optional
|
2115
|
-
:return: Returns the result object.
|
2116
|
-
""" # noqa: E501
|
2117
|
-
|
2118
|
-
_param = self._update_alert_message_in_batch_serialize(
|
2119
|
-
update_alert_message_status_request=update_alert_message_status_request,
|
2120
|
-
_request_auth=_request_auth,
|
2121
|
-
_content_type=_content_type,
|
2122
|
-
_headers=_headers,
|
2123
|
-
_host_index=_host_index
|
2124
|
-
)
|
2125
|
-
|
2126
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2127
|
-
'200': "str",
|
2128
|
-
'500': "Error",
|
2129
|
-
}
|
2130
|
-
response_data = self.api_client.call_api(
|
2131
|
-
*_param,
|
2132
|
-
_request_timeout=_request_timeout
|
2133
|
-
)
|
2134
|
-
return response_data.response
|
2135
|
-
|
2136
|
-
|
2137
|
-
def _update_alert_message_in_batch_serialize(
|
2138
|
-
self,
|
2139
|
-
update_alert_message_status_request,
|
2140
|
-
_request_auth,
|
2141
|
-
_content_type,
|
2142
|
-
_headers,
|
2143
|
-
_host_index,
|
2144
|
-
) -> RequestSerialized:
|
2145
|
-
|
2146
|
-
_host = None
|
2147
|
-
|
2148
|
-
_collection_formats: Dict[str, str] = {
|
2149
|
-
}
|
2150
|
-
|
2151
|
-
_path_params: Dict[str, str] = {}
|
2152
|
-
_query_params: List[Tuple[str, str]] = []
|
2153
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2154
|
-
_form_params: List[Tuple[str, str]] = []
|
2155
|
-
_files: Dict[str, str] = {}
|
2156
|
-
_body_params: Optional[bytes] = None
|
2157
|
-
|
2158
|
-
# process the path parameters
|
2159
|
-
# process the query parameters
|
2160
|
-
# process the header parameters
|
2161
|
-
# process the form parameters
|
2162
|
-
# process the body parameter
|
2163
|
-
if update_alert_message_status_request is not None:
|
2164
|
-
_body_params = update_alert_message_status_request
|
2165
|
-
|
2166
|
-
|
2167
|
-
# set the HTTP header `Accept`
|
2168
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
2169
|
-
[
|
2170
|
-
'application/json'
|
2171
|
-
]
|
2172
|
-
)
|
2173
|
-
|
2174
|
-
# set the HTTP header `Content-Type`
|
2175
|
-
if _content_type:
|
2176
|
-
_header_params['Content-Type'] = _content_type
|
2177
|
-
else:
|
2178
|
-
_default_content_type = (
|
2179
|
-
self.api_client.select_header_content_type(
|
2180
|
-
[
|
2181
|
-
'application/json'
|
2182
|
-
]
|
2183
|
-
)
|
2184
|
-
)
|
2185
|
-
if _default_content_type is not None:
|
2186
|
-
_header_params['Content-Type'] = _default_content_type
|
2187
|
-
|
2188
|
-
# authentication setting
|
2189
|
-
_auth_settings: List[str] = [
|
2190
|
-
]
|
2191
|
-
|
2192
|
-
return self.api_client.param_serialize(
|
2193
|
-
method='PUT',
|
2194
|
-
resource_path='/api/v1/alert/message-collection/status',
|
2195
|
-
path_params=_path_params,
|
2196
|
-
query_params=_query_params,
|
2197
|
-
header_params=_header_params,
|
2198
|
-
body=_body_params,
|
2199
|
-
post_params=_form_params,
|
2200
|
-
files=_files,
|
2201
|
-
auth_settings=_auth_settings,
|
2202
|
-
collection_formats=_collection_formats,
|
2203
|
-
_host=_host,
|
2204
|
-
_request_auth=_request_auth
|
2205
|
-
)
|
2206
|
-
|
2207
|
-
|
2208
|
-
|
2209
|
-
|
2210
|
-
@validate_call
|
2211
|
-
def update_alert_receiver_by_id(
|
2212
|
-
self,
|
2213
|
-
receiver_id: StrictStr,
|
2214
|
-
create_alert_receiver_request: Optional[CreateAlertReceiverRequest] = None,
|
2215
|
-
_request_timeout: Union[
|
2216
|
-
None,
|
2217
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2218
|
-
Tuple[
|
2219
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2220
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2221
|
-
]
|
2222
|
-
] = None,
|
2223
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2224
|
-
_content_type: Optional[StrictStr] = None,
|
2225
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2226
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2227
|
-
) -> str:
|
2228
|
-
"""update_alert_receiver_by_id
|
2229
|
-
|
2230
|
-
Update alert receiver by ID
|
2231
|
-
|
2232
|
-
:param receiver_id: (required)
|
2233
|
-
:type receiver_id: str
|
2234
|
-
:param create_alert_receiver_request:
|
2235
|
-
:type create_alert_receiver_request: CreateAlertReceiverRequest
|
2236
|
-
:param _request_timeout: timeout setting for this request. If one
|
2237
|
-
number provided, it will be total request
|
2238
|
-
timeout. It can also be a pair (tuple) of
|
2239
|
-
(connection, read) timeouts.
|
2240
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2241
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2242
|
-
request; this effectively ignores the
|
2243
|
-
authentication in the spec for a single request.
|
2244
|
-
:type _request_auth: dict, optional
|
2245
|
-
:param _content_type: force content-type for the request.
|
2246
|
-
:type _content_type: str, Optional
|
2247
|
-
:param _headers: set to override the headers for a single
|
2248
|
-
request; this effectively ignores the headers
|
2249
|
-
in the spec for a single request.
|
2250
|
-
:type _headers: dict, optional
|
2251
|
-
:param _host_index: set to override the host_index for a single
|
2252
|
-
request; this effectively ignores the host_index
|
2253
|
-
in the spec for a single request.
|
2254
|
-
:type _host_index: int, optional
|
2255
|
-
:return: Returns the result object.
|
2256
|
-
""" # noqa: E501
|
2257
|
-
|
2258
|
-
_param = self._update_alert_receiver_by_id_serialize(
|
2259
|
-
receiver_id=receiver_id,
|
2260
|
-
create_alert_receiver_request=create_alert_receiver_request,
|
2261
|
-
_request_auth=_request_auth,
|
2262
|
-
_content_type=_content_type,
|
2263
|
-
_headers=_headers,
|
2264
|
-
_host_index=_host_index
|
2265
|
-
)
|
2266
|
-
|
2267
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2268
|
-
'200': "str",
|
2269
|
-
'500': "Error",
|
2270
|
-
}
|
2271
|
-
response_data = self.api_client.call_api(
|
2272
|
-
*_param,
|
2273
|
-
_request_timeout=_request_timeout
|
2274
|
-
)
|
2275
|
-
response_data.read()
|
2276
|
-
return self.api_client.response_deserialize(
|
2277
|
-
response_data=response_data,
|
2278
|
-
response_types_map=_response_types_map,
|
2279
|
-
).data
|
2280
|
-
|
2281
|
-
|
2282
|
-
@validate_call
|
2283
|
-
def update_alert_receiver_by_id_with_http_info(
|
2284
|
-
self,
|
2285
|
-
receiver_id: StrictStr,
|
2286
|
-
create_alert_receiver_request: Optional[CreateAlertReceiverRequest] = None,
|
2287
|
-
_request_timeout: Union[
|
2288
|
-
None,
|
2289
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2290
|
-
Tuple[
|
2291
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2292
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2293
|
-
]
|
2294
|
-
] = None,
|
2295
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2296
|
-
_content_type: Optional[StrictStr] = None,
|
2297
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2298
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2299
|
-
) -> ApiResponse[str]:
|
2300
|
-
"""update_alert_receiver_by_id
|
2301
|
-
|
2302
|
-
Update alert receiver by ID
|
2303
|
-
|
2304
|
-
:param receiver_id: (required)
|
2305
|
-
:type receiver_id: str
|
2306
|
-
:param create_alert_receiver_request:
|
2307
|
-
:type create_alert_receiver_request: CreateAlertReceiverRequest
|
2308
|
-
:param _request_timeout: timeout setting for this request. If one
|
2309
|
-
number provided, it will be total request
|
2310
|
-
timeout. It can also be a pair (tuple) of
|
2311
|
-
(connection, read) timeouts.
|
2312
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2313
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2314
|
-
request; this effectively ignores the
|
2315
|
-
authentication in the spec for a single request.
|
2316
|
-
:type _request_auth: dict, optional
|
2317
|
-
:param _content_type: force content-type for the request.
|
2318
|
-
:type _content_type: str, Optional
|
2319
|
-
:param _headers: set to override the headers for a single
|
2320
|
-
request; this effectively ignores the headers
|
2321
|
-
in the spec for a single request.
|
2322
|
-
:type _headers: dict, optional
|
2323
|
-
:param _host_index: set to override the host_index for a single
|
2324
|
-
request; this effectively ignores the host_index
|
2325
|
-
in the spec for a single request.
|
2326
|
-
:type _host_index: int, optional
|
2327
|
-
:return: Returns the result object.
|
2328
|
-
""" # noqa: E501
|
2329
|
-
|
2330
|
-
_param = self._update_alert_receiver_by_id_serialize(
|
2331
|
-
receiver_id=receiver_id,
|
2332
|
-
create_alert_receiver_request=create_alert_receiver_request,
|
2333
|
-
_request_auth=_request_auth,
|
2334
|
-
_content_type=_content_type,
|
2335
|
-
_headers=_headers,
|
2336
|
-
_host_index=_host_index
|
2337
|
-
)
|
2338
|
-
|
2339
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2340
|
-
'200': "str",
|
2341
|
-
'500': "Error",
|
2342
|
-
}
|
2343
|
-
response_data = self.api_client.call_api(
|
2344
|
-
*_param,
|
2345
|
-
_request_timeout=_request_timeout
|
2346
|
-
)
|
2347
|
-
response_data.read()
|
2348
|
-
return self.api_client.response_deserialize(
|
2349
|
-
response_data=response_data,
|
2350
|
-
response_types_map=_response_types_map,
|
2351
|
-
)
|
2352
|
-
|
2353
|
-
|
2354
|
-
@validate_call
|
2355
|
-
def update_alert_receiver_by_id_without_preload_content(
|
2356
|
-
self,
|
2357
|
-
receiver_id: StrictStr,
|
2358
|
-
create_alert_receiver_request: Optional[CreateAlertReceiverRequest] = None,
|
2359
|
-
_request_timeout: Union[
|
2360
|
-
None,
|
2361
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2362
|
-
Tuple[
|
2363
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2364
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2365
|
-
]
|
2366
|
-
] = None,
|
2367
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2368
|
-
_content_type: Optional[StrictStr] = None,
|
2369
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2370
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2371
|
-
) -> RESTResponseType:
|
2372
|
-
"""update_alert_receiver_by_id
|
2373
|
-
|
2374
|
-
Update alert receiver by ID
|
2375
|
-
|
2376
|
-
:param receiver_id: (required)
|
2377
|
-
:type receiver_id: str
|
2378
|
-
:param create_alert_receiver_request:
|
2379
|
-
:type create_alert_receiver_request: CreateAlertReceiverRequest
|
2380
|
-
:param _request_timeout: timeout setting for this request. If one
|
2381
|
-
number provided, it will be total request
|
2382
|
-
timeout. It can also be a pair (tuple) of
|
2383
|
-
(connection, read) timeouts.
|
2384
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2385
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2386
|
-
request; this effectively ignores the
|
2387
|
-
authentication in the spec for a single request.
|
2388
|
-
:type _request_auth: dict, optional
|
2389
|
-
:param _content_type: force content-type for the request.
|
2390
|
-
:type _content_type: str, Optional
|
2391
|
-
:param _headers: set to override the headers for a single
|
2392
|
-
request; this effectively ignores the headers
|
2393
|
-
in the spec for a single request.
|
2394
|
-
:type _headers: dict, optional
|
2395
|
-
:param _host_index: set to override the host_index for a single
|
2396
|
-
request; this effectively ignores the host_index
|
2397
|
-
in the spec for a single request.
|
2398
|
-
:type _host_index: int, optional
|
2399
|
-
:return: Returns the result object.
|
2400
|
-
""" # noqa: E501
|
2401
|
-
|
2402
|
-
_param = self._update_alert_receiver_by_id_serialize(
|
2403
|
-
receiver_id=receiver_id,
|
2404
|
-
create_alert_receiver_request=create_alert_receiver_request,
|
2405
|
-
_request_auth=_request_auth,
|
2406
|
-
_content_type=_content_type,
|
2407
|
-
_headers=_headers,
|
2408
|
-
_host_index=_host_index
|
2409
|
-
)
|
2410
|
-
|
2411
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2412
|
-
'200': "str",
|
2413
|
-
'500': "Error",
|
2414
|
-
}
|
2415
|
-
response_data = self.api_client.call_api(
|
2416
|
-
*_param,
|
2417
|
-
_request_timeout=_request_timeout
|
2418
|
-
)
|
2419
|
-
return response_data.response
|
2420
|
-
|
2421
|
-
|
2422
|
-
def _update_alert_receiver_by_id_serialize(
|
2423
|
-
self,
|
2424
|
-
receiver_id,
|
2425
|
-
create_alert_receiver_request,
|
2426
|
-
_request_auth,
|
2427
|
-
_content_type,
|
2428
|
-
_headers,
|
2429
|
-
_host_index,
|
2430
|
-
) -> RequestSerialized:
|
2431
|
-
|
2432
|
-
_host = None
|
2433
|
-
|
2434
|
-
_collection_formats: Dict[str, str] = {
|
2435
|
-
}
|
2436
|
-
|
2437
|
-
_path_params: Dict[str, str] = {}
|
2438
|
-
_query_params: List[Tuple[str, str]] = []
|
2439
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2440
|
-
_form_params: List[Tuple[str, str]] = []
|
2441
|
-
_files: Dict[str, str] = {}
|
2442
|
-
_body_params: Optional[bytes] = None
|
2443
|
-
|
2444
|
-
# process the path parameters
|
2445
|
-
if receiver_id is not None:
|
2446
|
-
_path_params['receiver_id'] = receiver_id
|
2447
|
-
# process the query parameters
|
2448
|
-
# process the header parameters
|
2449
|
-
# process the form parameters
|
2450
|
-
# process the body parameter
|
2451
|
-
if create_alert_receiver_request is not None:
|
2452
|
-
_body_params = create_alert_receiver_request
|
2453
|
-
|
2454
|
-
|
2455
|
-
# set the HTTP header `Accept`
|
2456
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
2457
|
-
[
|
2458
|
-
'application/json'
|
2459
|
-
]
|
2460
|
-
)
|
2461
|
-
|
2462
|
-
# set the HTTP header `Content-Type`
|
2463
|
-
if _content_type:
|
2464
|
-
_header_params['Content-Type'] = _content_type
|
2465
|
-
else:
|
2466
|
-
_default_content_type = (
|
2467
|
-
self.api_client.select_header_content_type(
|
2468
|
-
[
|
2469
|
-
'application/json'
|
2470
|
-
]
|
2471
|
-
)
|
2472
|
-
)
|
2473
|
-
if _default_content_type is not None:
|
2474
|
-
_header_params['Content-Type'] = _default_content_type
|
2475
|
-
|
2476
|
-
# authentication setting
|
2477
|
-
_auth_settings: List[str] = [
|
2478
|
-
]
|
2479
|
-
|
2480
|
-
return self.api_client.param_serialize(
|
2481
|
-
method='PUT',
|
2482
|
-
resource_path='/api/v1/alert/receiver/{receiver_id}',
|
2483
|
-
path_params=_path_params,
|
2484
|
-
query_params=_query_params,
|
2485
|
-
header_params=_header_params,
|
2486
|
-
body=_body_params,
|
2487
|
-
post_params=_form_params,
|
2488
|
-
files=_files,
|
2489
|
-
auth_settings=_auth_settings,
|
2490
|
-
collection_formats=_collection_formats,
|
2491
|
-
_host=_host,
|
2492
|
-
_request_auth=_request_auth
|
2493
|
-
)
|
2494
|
-
|
2495
|
-
|
2496
|
-
|
2497
|
-
|
2498
|
-
@validate_call
|
2499
|
-
def update_alert_rule_by_id(
|
2500
|
-
self,
|
2501
|
-
rule_id: StrictStr,
|
2502
|
-
create_alert_rule_request: Optional[CreateAlertRuleRequest] = None,
|
2503
|
-
_request_timeout: Union[
|
2504
|
-
None,
|
2505
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2506
|
-
Tuple[
|
2507
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2508
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2509
|
-
]
|
2510
|
-
] = None,
|
2511
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2512
|
-
_content_type: Optional[StrictStr] = None,
|
2513
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2514
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2515
|
-
) -> str:
|
2516
|
-
"""update_alert_rule_by_id
|
2517
|
-
|
2518
|
-
|
2519
|
-
:param rule_id: (required)
|
2520
|
-
:type rule_id: str
|
2521
|
-
:param create_alert_rule_request:
|
2522
|
-
:type create_alert_rule_request: CreateAlertRuleRequest
|
2523
|
-
:param _request_timeout: timeout setting for this request. If one
|
2524
|
-
number provided, it will be total request
|
2525
|
-
timeout. It can also be a pair (tuple) of
|
2526
|
-
(connection, read) timeouts.
|
2527
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2528
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2529
|
-
request; this effectively ignores the
|
2530
|
-
authentication in the spec for a single request.
|
2531
|
-
:type _request_auth: dict, optional
|
2532
|
-
:param _content_type: force content-type for the request.
|
2533
|
-
:type _content_type: str, Optional
|
2534
|
-
:param _headers: set to override the headers for a single
|
2535
|
-
request; this effectively ignores the headers
|
2536
|
-
in the spec for a single request.
|
2537
|
-
:type _headers: dict, optional
|
2538
|
-
:param _host_index: set to override the host_index for a single
|
2539
|
-
request; this effectively ignores the host_index
|
2540
|
-
in the spec for a single request.
|
2541
|
-
:type _host_index: int, optional
|
2542
|
-
:return: Returns the result object.
|
2543
|
-
""" # noqa: E501
|
2544
|
-
|
2545
|
-
_param = self._update_alert_rule_by_id_serialize(
|
2546
|
-
rule_id=rule_id,
|
2547
|
-
create_alert_rule_request=create_alert_rule_request,
|
2548
|
-
_request_auth=_request_auth,
|
2549
|
-
_content_type=_content_type,
|
2550
|
-
_headers=_headers,
|
2551
|
-
_host_index=_host_index
|
2552
|
-
)
|
2553
|
-
|
2554
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2555
|
-
'200': "str",
|
2556
|
-
'500': "Error",
|
2557
|
-
}
|
2558
|
-
response_data = self.api_client.call_api(
|
2559
|
-
*_param,
|
2560
|
-
_request_timeout=_request_timeout
|
2561
|
-
)
|
2562
|
-
response_data.read()
|
2563
|
-
return self.api_client.response_deserialize(
|
2564
|
-
response_data=response_data,
|
2565
|
-
response_types_map=_response_types_map,
|
2566
|
-
).data
|
2567
|
-
|
2568
|
-
|
2569
|
-
@validate_call
|
2570
|
-
def update_alert_rule_by_id_with_http_info(
|
2571
|
-
self,
|
2572
|
-
rule_id: StrictStr,
|
2573
|
-
create_alert_rule_request: Optional[CreateAlertRuleRequest] = None,
|
2574
|
-
_request_timeout: Union[
|
2575
|
-
None,
|
2576
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2577
|
-
Tuple[
|
2578
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2579
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2580
|
-
]
|
2581
|
-
] = None,
|
2582
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2583
|
-
_content_type: Optional[StrictStr] = None,
|
2584
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2585
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2586
|
-
) -> ApiResponse[str]:
|
2587
|
-
"""update_alert_rule_by_id
|
2588
|
-
|
2589
|
-
|
2590
|
-
:param rule_id: (required)
|
2591
|
-
:type rule_id: str
|
2592
|
-
:param create_alert_rule_request:
|
2593
|
-
:type create_alert_rule_request: CreateAlertRuleRequest
|
2594
|
-
:param _request_timeout: timeout setting for this request. If one
|
2595
|
-
number provided, it will be total request
|
2596
|
-
timeout. It can also be a pair (tuple) of
|
2597
|
-
(connection, read) timeouts.
|
2598
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2599
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2600
|
-
request; this effectively ignores the
|
2601
|
-
authentication in the spec for a single request.
|
2602
|
-
:type _request_auth: dict, optional
|
2603
|
-
:param _content_type: force content-type for the request.
|
2604
|
-
:type _content_type: str, Optional
|
2605
|
-
:param _headers: set to override the headers for a single
|
2606
|
-
request; this effectively ignores the headers
|
2607
|
-
in the spec for a single request.
|
2608
|
-
:type _headers: dict, optional
|
2609
|
-
:param _host_index: set to override the host_index for a single
|
2610
|
-
request; this effectively ignores the host_index
|
2611
|
-
in the spec for a single request.
|
2612
|
-
:type _host_index: int, optional
|
2613
|
-
:return: Returns the result object.
|
2614
|
-
""" # noqa: E501
|
2615
|
-
|
2616
|
-
_param = self._update_alert_rule_by_id_serialize(
|
2617
|
-
rule_id=rule_id,
|
2618
|
-
create_alert_rule_request=create_alert_rule_request,
|
2619
|
-
_request_auth=_request_auth,
|
2620
|
-
_content_type=_content_type,
|
2621
|
-
_headers=_headers,
|
2622
|
-
_host_index=_host_index
|
2623
|
-
)
|
2624
|
-
|
2625
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2626
|
-
'200': "str",
|
2627
|
-
'500': "Error",
|
2628
|
-
}
|
2629
|
-
response_data = self.api_client.call_api(
|
2630
|
-
*_param,
|
2631
|
-
_request_timeout=_request_timeout
|
2632
|
-
)
|
2633
|
-
response_data.read()
|
2634
|
-
return self.api_client.response_deserialize(
|
2635
|
-
response_data=response_data,
|
2636
|
-
response_types_map=_response_types_map,
|
2637
|
-
)
|
2638
|
-
|
2639
|
-
|
2640
|
-
@validate_call
|
2641
|
-
def update_alert_rule_by_id_without_preload_content(
|
2642
|
-
self,
|
2643
|
-
rule_id: StrictStr,
|
2644
|
-
create_alert_rule_request: Optional[CreateAlertRuleRequest] = None,
|
2645
|
-
_request_timeout: Union[
|
2646
|
-
None,
|
2647
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2648
|
-
Tuple[
|
2649
|
-
Annotated[StrictFloat, Field(gt=0)],
|
2650
|
-
Annotated[StrictFloat, Field(gt=0)]
|
2651
|
-
]
|
2652
|
-
] = None,
|
2653
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2654
|
-
_content_type: Optional[StrictStr] = None,
|
2655
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2656
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2657
|
-
) -> RESTResponseType:
|
2658
|
-
"""update_alert_rule_by_id
|
2659
|
-
|
2660
|
-
|
2661
|
-
:param rule_id: (required)
|
2662
|
-
:type rule_id: str
|
2663
|
-
:param create_alert_rule_request:
|
2664
|
-
:type create_alert_rule_request: CreateAlertRuleRequest
|
2665
|
-
:param _request_timeout: timeout setting for this request. If one
|
2666
|
-
number provided, it will be total request
|
2667
|
-
timeout. It can also be a pair (tuple) of
|
2668
|
-
(connection, read) timeouts.
|
2669
|
-
:type _request_timeout: int, tuple(int, int), optional
|
2670
|
-
:param _request_auth: set to override the auth_settings for an a single
|
2671
|
-
request; this effectively ignores the
|
2672
|
-
authentication in the spec for a single request.
|
2673
|
-
:type _request_auth: dict, optional
|
2674
|
-
:param _content_type: force content-type for the request.
|
2675
|
-
:type _content_type: str, Optional
|
2676
|
-
:param _headers: set to override the headers for a single
|
2677
|
-
request; this effectively ignores the headers
|
2678
|
-
in the spec for a single request.
|
2679
|
-
:type _headers: dict, optional
|
2680
|
-
:param _host_index: set to override the host_index for a single
|
2681
|
-
request; this effectively ignores the host_index
|
2682
|
-
in the spec for a single request.
|
2683
|
-
:type _host_index: int, optional
|
2684
|
-
:return: Returns the result object.
|
2685
|
-
""" # noqa: E501
|
2686
|
-
|
2687
|
-
_param = self._update_alert_rule_by_id_serialize(
|
2688
|
-
rule_id=rule_id,
|
2689
|
-
create_alert_rule_request=create_alert_rule_request,
|
2690
|
-
_request_auth=_request_auth,
|
2691
|
-
_content_type=_content_type,
|
2692
|
-
_headers=_headers,
|
2693
|
-
_host_index=_host_index
|
2694
|
-
)
|
2695
|
-
|
2696
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
2697
|
-
'200': "str",
|
2698
|
-
'500': "Error",
|
2699
|
-
}
|
2700
|
-
response_data = self.api_client.call_api(
|
2701
|
-
*_param,
|
2702
|
-
_request_timeout=_request_timeout
|
2703
|
-
)
|
2704
|
-
return response_data.response
|
2705
|
-
|
2706
|
-
|
2707
|
-
def _update_alert_rule_by_id_serialize(
|
2708
|
-
self,
|
2709
|
-
rule_id,
|
2710
|
-
create_alert_rule_request,
|
2711
|
-
_request_auth,
|
2712
|
-
_content_type,
|
2713
|
-
_headers,
|
2714
|
-
_host_index,
|
2715
|
-
) -> RequestSerialized:
|
2716
|
-
|
2717
|
-
_host = None
|
2718
|
-
|
2719
|
-
_collection_formats: Dict[str, str] = {
|
2720
|
-
}
|
2721
|
-
|
2722
|
-
_path_params: Dict[str, str] = {}
|
2723
|
-
_query_params: List[Tuple[str, str]] = []
|
2724
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2725
|
-
_form_params: List[Tuple[str, str]] = []
|
2726
|
-
_files: Dict[str, str] = {}
|
2727
|
-
_body_params: Optional[bytes] = None
|
2728
|
-
|
2729
|
-
# process the path parameters
|
2730
|
-
if rule_id is not None:
|
2731
|
-
_path_params['rule_id'] = rule_id
|
2732
|
-
# process the query parameters
|
2733
|
-
# process the header parameters
|
2734
|
-
# process the form parameters
|
2735
|
-
# process the body parameter
|
2736
|
-
if create_alert_rule_request is not None:
|
2737
|
-
_body_params = create_alert_rule_request
|
2738
|
-
|
2739
|
-
|
2740
|
-
# set the HTTP header `Accept`
|
2741
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
2742
|
-
[
|
2743
|
-
'application/json'
|
2744
|
-
]
|
2745
|
-
)
|
2746
|
-
|
2747
|
-
# set the HTTP header `Content-Type`
|
2748
|
-
if _content_type:
|
2749
|
-
_header_params['Content-Type'] = _content_type
|
2750
|
-
else:
|
2751
|
-
_default_content_type = (
|
2752
|
-
self.api_client.select_header_content_type(
|
2753
|
-
[
|
2754
|
-
'application/json'
|
2755
|
-
]
|
2756
|
-
)
|
2757
|
-
)
|
2758
|
-
if _default_content_type is not None:
|
2759
|
-
_header_params['Content-Type'] = _default_content_type
|
2760
|
-
|
2761
|
-
# authentication setting
|
2762
|
-
_auth_settings: List[str] = [
|
2763
|
-
]
|
2764
|
-
|
2765
|
-
return self.api_client.param_serialize(
|
2766
|
-
method='PUT',
|
2767
|
-
resource_path='/api/v1/alert/rule/{rule_id}',
|
2768
|
-
path_params=_path_params,
|
2769
|
-
query_params=_query_params,
|
2770
|
-
header_params=_header_params,
|
2771
|
-
body=_body_params,
|
2772
|
-
post_params=_form_params,
|
2773
|
-
files=_files,
|
2774
|
-
auth_settings=_auth_settings,
|
2775
|
-
collection_formats=_collection_formats,
|
2776
|
-
_host=_host,
|
2777
|
-
_request_auth=_request_auth
|
2778
|
-
)
|
2779
|
-
|
2780
|
-
|