hostinger-api 1.0.0__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.
- hostinger_api/__init__.py +105 -0
- hostinger_api/api/__init__.py +21 -0
- hostinger_api/api/billing_catalog_api.py +282 -0
- hostinger_api/api/billing_orders_api.py +313 -0
- hostinger_api/api/billing_payment_methods_api.py +819 -0
- hostinger_api/api/billing_subscriptions_api.py +584 -0
- hostinger_api/api/domains_portfolio_api.py +282 -0
- hostinger_api/api/vps_actions_api.py +599 -0
- hostinger_api/api/vps_backups_api.py +882 -0
- hostinger_api/api/vps_data_centers_api.py +282 -0
- hostinger_api/api/vps_firewall_api.py +2872 -0
- hostinger_api/api/vps_malware_scanner_api.py +842 -0
- hostinger_api/api/vps_post_install_scripts_api.py +1419 -0
- hostinger_api/api/vps_public_keys_api.py +1154 -0
- hostinger_api/api/vps_recovery_api.py +597 -0
- hostinger_api/api/vps_snapshots_api.py +1100 -0
- hostinger_api/api/vps_virtual_machine_api.py +3714 -0
- hostinger_api/api/vpsos_templates_api.py +551 -0
- hostinger_api/api/vpsptr_records_api.py +565 -0
- hostinger_api/api_client.py +795 -0
- hostinger_api/api_response.py +21 -0
- hostinger_api/configuration.py +579 -0
- hostinger_api/exceptions.py +214 -0
- hostinger_api/models/__init__.py +72 -0
- hostinger_api/models/billing_v1_catalog_catalog_item_price_resource.py +107 -0
- hostinger_api/models/billing_v1_catalog_catalog_item_resource.py +99 -0
- hostinger_api/models/billing_v1_order_order_billing_address_resource.py +145 -0
- hostinger_api/models/billing_v1_order_order_resource.py +116 -0
- hostinger_api/models/billing_v1_order_store_request.py +97 -0
- hostinger_api/models/billing_v1_order_store_request_items_inner.py +87 -0
- hostinger_api/models/billing_v1_payment_method_payment_method_resource.py +102 -0
- hostinger_api/models/billing_v1_subscription_cancel_request.py +117 -0
- hostinger_api/models/billing_v1_subscription_subscription_resource.py +130 -0
- hostinger_api/models/common_schema_error_response_schema.py +87 -0
- hostinger_api/models/common_schema_pagination_meta_schema.py +89 -0
- hostinger_api/models/common_schema_unauthorized_response_schema.py +87 -0
- hostinger_api/models/common_schema_unprocessable_content_response_schema.py +93 -0
- hostinger_api/models/common_schema_unprocessable_content_response_schema_errors.py +87 -0
- hostinger_api/models/common_success_empty_resource.py +85 -0
- hostinger_api/models/domains_v1_domain_domain_resource.py +126 -0
- hostinger_api/models/vps_get_action_list_v1200_response.py +99 -0
- hostinger_api/models/vps_get_backup_list_v1200_response.py +99 -0
- hostinger_api/models/vps_get_firewall_list_v1200_response.py +99 -0
- hostinger_api/models/vps_get_post_install_script_list_v1200_response.py +99 -0
- hostinger_api/models/vps_get_public_key_list_v1200_response.py +99 -0
- hostinger_api/models/vpsv1_action_action_resource.py +104 -0
- hostinger_api/models/vpsv1_backup_backup_resource.py +90 -0
- hostinger_api/models/vpsv1_data_center_data_center_resource.py +113 -0
- hostinger_api/models/vpsv1_firewall_firewall_resource.py +104 -0
- hostinger_api/models/vpsv1_firewall_firewall_rule_resource.py +115 -0
- hostinger_api/models/vpsv1_firewall_rules_store_request.py +105 -0
- hostinger_api/models/vpsv1_firewall_store_request.py +85 -0
- hostinger_api/models/vpsv1_ip_address_ip_address_resource.py +94 -0
- hostinger_api/models/vpsv1_malware_metrics_resource.py +101 -0
- hostinger_api/models/vpsv1_metrics_metrics_collection.py +149 -0
- hostinger_api/models/vpsv1_metrics_metrics_collection_cpu_usage.py +127 -0
- hostinger_api/models/vpsv1_metrics_metrics_collection_disk_space.py +127 -0
- hostinger_api/models/vpsv1_metrics_metrics_collection_incoming_traffic.py +127 -0
- hostinger_api/models/vpsv1_metrics_metrics_collection_outgoing_traffic.py +127 -0
- hostinger_api/models/vpsv1_metrics_metrics_collection_ram_usage.py +127 -0
- hostinger_api/models/vpsv1_metrics_metrics_collection_uptime.py +127 -0
- hostinger_api/models/vpsv1_metrics_metrics_resource.py +87 -0
- hostinger_api/models/vpsv1_post_install_script_post_install_script_resource.py +94 -0
- hostinger_api/models/vpsv1_post_install_script_store_request.py +87 -0
- hostinger_api/models/vpsv1_public_key_attach_request.py +85 -0
- hostinger_api/models/vpsv1_public_key_public_key_resource.py +89 -0
- hostinger_api/models/vpsv1_public_key_store_request.py +87 -0
- hostinger_api/models/vpsv1_snapshot_snapshot_resource.py +90 -0
- hostinger_api/models/vpsv1_template_template_resource.py +96 -0
- hostinger_api/models/vpsv1_virtual_machine_hostname_update_request.py +85 -0
- hostinger_api/models/vpsv1_virtual_machine_metric_get_request.py +88 -0
- hostinger_api/models/vpsv1_virtual_machine_nameservers_update_request.py +87 -0
- hostinger_api/models/vpsv1_virtual_machine_panel_password_update_request.py +86 -0
- hostinger_api/models/vpsv1_virtual_machine_recovery_start_request.py +85 -0
- hostinger_api/models/vpsv1_virtual_machine_recreate_request.py +90 -0
- hostinger_api/models/vpsv1_virtual_machine_root_password_update_request.py +86 -0
- hostinger_api/models/vpsv1_virtual_machine_setup_request.py +108 -0
- hostinger_api/models/vpsv1_virtual_machine_setup_request_public_key.py +87 -0
- hostinger_api/models/vpsv1_virtual_machine_virtual_machine_resource.py +190 -0
- hostinger_api/models/vpsv1_virtual_machine_virtual_machine_resource_ipv4.py +131 -0
- hostinger_api/models/vpsv1_virtual_machine_virtual_machine_resource_ipv6.py +131 -0
- hostinger_api/models/vpsv1_virtual_machine_virtual_machine_resource_template.py +127 -0
- hostinger_api/py.typed +0 -0
- hostinger_api/rest.py +256 -0
- hostinger_api-1.0.0.dist-info/METADATA +26 -0
- hostinger_api-1.0.0.dist-info/RECORD +88 -0
- hostinger_api-1.0.0.dist-info/WHEEL +5 -0
- hostinger_api-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,842 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hostinger API Python SDK
|
|
5
|
+
|
|
6
|
+
API Version: 0.0.1-beta
|
|
7
|
+
|
|
8
|
+
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
|
+
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
10
|
+
""" # noqa: E501
|
|
11
|
+
|
|
12
|
+
import warnings
|
|
13
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
14
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
15
|
+
from typing_extensions import Annotated
|
|
16
|
+
|
|
17
|
+
from pydantic import Field, StrictInt
|
|
18
|
+
from typing_extensions import Annotated
|
|
19
|
+
from hostinger_api.models.vpsv1_action_action_resource import VPSV1ActionActionResource
|
|
20
|
+
from hostinger_api.models.vpsv1_malware_metrics_resource import VPSV1MalwareMetricsResource
|
|
21
|
+
|
|
22
|
+
from hostinger_api.api_client import ApiClient, RequestSerialized
|
|
23
|
+
from hostinger_api.api_response import ApiResponse
|
|
24
|
+
from hostinger_api.rest import RESTResponseType
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class VPSMalwareScannerApi:
|
|
28
|
+
|
|
29
|
+
def __init__(self, api_client=None) -> None:
|
|
30
|
+
if api_client is None:
|
|
31
|
+
api_client = ApiClient.get_default()
|
|
32
|
+
self.api_client = api_client
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@validate_call
|
|
36
|
+
def get_scan_metrics_v1(
|
|
37
|
+
self,
|
|
38
|
+
virtual_machine_id: Annotated[StrictInt, Field(description="Virtual Machine ID")],
|
|
39
|
+
_request_timeout: Union[
|
|
40
|
+
None,
|
|
41
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
42
|
+
Tuple[
|
|
43
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
44
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
45
|
+
]
|
|
46
|
+
] = None,
|
|
47
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
48
|
+
_content_type: Optional[StrictStr] = None,
|
|
49
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
50
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
51
|
+
) -> VPSV1MalwareMetricsResource:
|
|
52
|
+
"""Get scan metrics
|
|
53
|
+
|
|
54
|
+
This endpoint retrieves the scan metrics for the [Monarx](https://www.monarx.com/) malware scanner installed on a specified virtual machine. The scan metrics provide detailed information about the malware scans performed by Monarx, including the number of scans, detected threats, and other relevant statistics. This information is useful for monitoring the security status of the virtual machine and assessing the effectiveness of the malware scanner.
|
|
55
|
+
|
|
56
|
+
:param virtual_machine_id: Virtual Machine ID (required)
|
|
57
|
+
:type virtual_machine_id: int
|
|
58
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
59
|
+
number provided, it will be total request
|
|
60
|
+
timeout. It can also be a pair (tuple) of
|
|
61
|
+
(connection, read) timeouts.
|
|
62
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
63
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
64
|
+
request; this effectively ignores the
|
|
65
|
+
authentication in the spec for a single request.
|
|
66
|
+
:type _request_auth: dict, optional
|
|
67
|
+
:param _content_type: force content-type for the request.
|
|
68
|
+
:type _content_type: str, Optional
|
|
69
|
+
:param _headers: set to override the headers for a single
|
|
70
|
+
request; this effectively ignores the headers
|
|
71
|
+
in the spec for a single request.
|
|
72
|
+
:type _headers: dict, optional
|
|
73
|
+
:param _host_index: set to override the host_index for a single
|
|
74
|
+
request; this effectively ignores the host_index
|
|
75
|
+
in the spec for a single request.
|
|
76
|
+
:type _host_index: int, optional
|
|
77
|
+
:return: Returns the result object.
|
|
78
|
+
""" # noqa: E501
|
|
79
|
+
|
|
80
|
+
_param = self._get_scan_metrics_v1_serialize(
|
|
81
|
+
virtual_machine_id=virtual_machine_id,
|
|
82
|
+
_request_auth=_request_auth,
|
|
83
|
+
_content_type=_content_type,
|
|
84
|
+
_headers=_headers,
|
|
85
|
+
_host_index=_host_index
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
89
|
+
'200': "VPSV1MalwareMetricsResource",
|
|
90
|
+
'422': "CommonSchemaUnprocessableContentResponseSchema",
|
|
91
|
+
'401': "CommonSchemaUnauthorizedResponseSchema",
|
|
92
|
+
'500': "CommonSchemaErrorResponseSchema",
|
|
93
|
+
}
|
|
94
|
+
response_data = self.api_client.call_api(
|
|
95
|
+
*_param,
|
|
96
|
+
_request_timeout=_request_timeout
|
|
97
|
+
)
|
|
98
|
+
response_data.read()
|
|
99
|
+
return self.api_client.response_deserialize(
|
|
100
|
+
response_data=response_data,
|
|
101
|
+
response_types_map=_response_types_map,
|
|
102
|
+
).data
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
@validate_call
|
|
106
|
+
def get_scan_metrics_v1_with_http_info(
|
|
107
|
+
self,
|
|
108
|
+
virtual_machine_id: Annotated[StrictInt, Field(description="Virtual Machine ID")],
|
|
109
|
+
_request_timeout: Union[
|
|
110
|
+
None,
|
|
111
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
112
|
+
Tuple[
|
|
113
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
114
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
115
|
+
]
|
|
116
|
+
] = None,
|
|
117
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
118
|
+
_content_type: Optional[StrictStr] = None,
|
|
119
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
120
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
121
|
+
) -> ApiResponse[VPSV1MalwareMetricsResource]:
|
|
122
|
+
"""Get scan metrics
|
|
123
|
+
|
|
124
|
+
This endpoint retrieves the scan metrics for the [Monarx](https://www.monarx.com/) malware scanner installed on a specified virtual machine. The scan metrics provide detailed information about the malware scans performed by Monarx, including the number of scans, detected threats, and other relevant statistics. This information is useful for monitoring the security status of the virtual machine and assessing the effectiveness of the malware scanner.
|
|
125
|
+
|
|
126
|
+
:param virtual_machine_id: Virtual Machine ID (required)
|
|
127
|
+
:type virtual_machine_id: int
|
|
128
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
129
|
+
number provided, it will be total request
|
|
130
|
+
timeout. It can also be a pair (tuple) of
|
|
131
|
+
(connection, read) timeouts.
|
|
132
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
133
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
134
|
+
request; this effectively ignores the
|
|
135
|
+
authentication in the spec for a single request.
|
|
136
|
+
:type _request_auth: dict, optional
|
|
137
|
+
:param _content_type: force content-type for the request.
|
|
138
|
+
:type _content_type: str, Optional
|
|
139
|
+
:param _headers: set to override the headers for a single
|
|
140
|
+
request; this effectively ignores the headers
|
|
141
|
+
in the spec for a single request.
|
|
142
|
+
:type _headers: dict, optional
|
|
143
|
+
:param _host_index: set to override the host_index for a single
|
|
144
|
+
request; this effectively ignores the host_index
|
|
145
|
+
in the spec for a single request.
|
|
146
|
+
:type _host_index: int, optional
|
|
147
|
+
:return: Returns the result object.
|
|
148
|
+
""" # noqa: E501
|
|
149
|
+
|
|
150
|
+
_param = self._get_scan_metrics_v1_serialize(
|
|
151
|
+
virtual_machine_id=virtual_machine_id,
|
|
152
|
+
_request_auth=_request_auth,
|
|
153
|
+
_content_type=_content_type,
|
|
154
|
+
_headers=_headers,
|
|
155
|
+
_host_index=_host_index
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
159
|
+
'200': "VPSV1MalwareMetricsResource",
|
|
160
|
+
'422': "CommonSchemaUnprocessableContentResponseSchema",
|
|
161
|
+
'401': "CommonSchemaUnauthorizedResponseSchema",
|
|
162
|
+
'500': "CommonSchemaErrorResponseSchema",
|
|
163
|
+
}
|
|
164
|
+
response_data = self.api_client.call_api(
|
|
165
|
+
*_param,
|
|
166
|
+
_request_timeout=_request_timeout
|
|
167
|
+
)
|
|
168
|
+
response_data.read()
|
|
169
|
+
return self.api_client.response_deserialize(
|
|
170
|
+
response_data=response_data,
|
|
171
|
+
response_types_map=_response_types_map,
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
@validate_call
|
|
176
|
+
def get_scan_metrics_v1_without_preload_content(
|
|
177
|
+
self,
|
|
178
|
+
virtual_machine_id: Annotated[StrictInt, Field(description="Virtual Machine ID")],
|
|
179
|
+
_request_timeout: Union[
|
|
180
|
+
None,
|
|
181
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
182
|
+
Tuple[
|
|
183
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
184
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
185
|
+
]
|
|
186
|
+
] = None,
|
|
187
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
188
|
+
_content_type: Optional[StrictStr] = None,
|
|
189
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
190
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
191
|
+
) -> RESTResponseType:
|
|
192
|
+
"""Get scan metrics
|
|
193
|
+
|
|
194
|
+
This endpoint retrieves the scan metrics for the [Monarx](https://www.monarx.com/) malware scanner installed on a specified virtual machine. The scan metrics provide detailed information about the malware scans performed by Monarx, including the number of scans, detected threats, and other relevant statistics. This information is useful for monitoring the security status of the virtual machine and assessing the effectiveness of the malware scanner.
|
|
195
|
+
|
|
196
|
+
:param virtual_machine_id: Virtual Machine ID (required)
|
|
197
|
+
:type virtual_machine_id: int
|
|
198
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
199
|
+
number provided, it will be total request
|
|
200
|
+
timeout. It can also be a pair (tuple) of
|
|
201
|
+
(connection, read) timeouts.
|
|
202
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
203
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
204
|
+
request; this effectively ignores the
|
|
205
|
+
authentication in the spec for a single request.
|
|
206
|
+
:type _request_auth: dict, optional
|
|
207
|
+
:param _content_type: force content-type for the request.
|
|
208
|
+
:type _content_type: str, Optional
|
|
209
|
+
:param _headers: set to override the headers for a single
|
|
210
|
+
request; this effectively ignores the headers
|
|
211
|
+
in the spec for a single request.
|
|
212
|
+
:type _headers: dict, optional
|
|
213
|
+
:param _host_index: set to override the host_index for a single
|
|
214
|
+
request; this effectively ignores the host_index
|
|
215
|
+
in the spec for a single request.
|
|
216
|
+
:type _host_index: int, optional
|
|
217
|
+
:return: Returns the result object.
|
|
218
|
+
""" # noqa: E501
|
|
219
|
+
|
|
220
|
+
_param = self._get_scan_metrics_v1_serialize(
|
|
221
|
+
virtual_machine_id=virtual_machine_id,
|
|
222
|
+
_request_auth=_request_auth,
|
|
223
|
+
_content_type=_content_type,
|
|
224
|
+
_headers=_headers,
|
|
225
|
+
_host_index=_host_index
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
229
|
+
'200': "VPSV1MalwareMetricsResource",
|
|
230
|
+
'422': "CommonSchemaUnprocessableContentResponseSchema",
|
|
231
|
+
'401': "CommonSchemaUnauthorizedResponseSchema",
|
|
232
|
+
'500': "CommonSchemaErrorResponseSchema",
|
|
233
|
+
}
|
|
234
|
+
response_data = self.api_client.call_api(
|
|
235
|
+
*_param,
|
|
236
|
+
_request_timeout=_request_timeout
|
|
237
|
+
)
|
|
238
|
+
return response_data.response
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def _get_scan_metrics_v1_serialize(
|
|
242
|
+
self,
|
|
243
|
+
virtual_machine_id,
|
|
244
|
+
_request_auth,
|
|
245
|
+
_content_type,
|
|
246
|
+
_headers,
|
|
247
|
+
_host_index,
|
|
248
|
+
) -> RequestSerialized:
|
|
249
|
+
|
|
250
|
+
_host = None
|
|
251
|
+
|
|
252
|
+
_collection_formats: Dict[str, str] = {
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
_path_params: Dict[str, str] = {}
|
|
256
|
+
_query_params: List[Tuple[str, str]] = []
|
|
257
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
258
|
+
_form_params: List[Tuple[str, str]] = []
|
|
259
|
+
_files: Dict[
|
|
260
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
261
|
+
] = {}
|
|
262
|
+
_body_params: Optional[bytes] = None
|
|
263
|
+
|
|
264
|
+
# process the path parameters
|
|
265
|
+
if virtual_machine_id is not None:
|
|
266
|
+
_path_params['virtualMachineId'] = virtual_machine_id
|
|
267
|
+
# process the query parameters
|
|
268
|
+
# process the header parameters
|
|
269
|
+
# process the form parameters
|
|
270
|
+
# process the body parameter
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
# set the HTTP header `Accept`
|
|
274
|
+
if 'Accept' not in _header_params:
|
|
275
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
276
|
+
[
|
|
277
|
+
'application/json'
|
|
278
|
+
]
|
|
279
|
+
)
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
# authentication setting
|
|
283
|
+
_auth_settings: List[str] = [
|
|
284
|
+
'apiToken'
|
|
285
|
+
]
|
|
286
|
+
|
|
287
|
+
return self.api_client.param_serialize(
|
|
288
|
+
method='GET',
|
|
289
|
+
resource_path='/api/vps/v1/virtual-machines/{virtualMachineId}/monarx',
|
|
290
|
+
path_params=_path_params,
|
|
291
|
+
query_params=_query_params,
|
|
292
|
+
header_params=_header_params,
|
|
293
|
+
body=_body_params,
|
|
294
|
+
post_params=_form_params,
|
|
295
|
+
files=_files,
|
|
296
|
+
auth_settings=_auth_settings,
|
|
297
|
+
collection_formats=_collection_formats,
|
|
298
|
+
_host=_host,
|
|
299
|
+
_request_auth=_request_auth
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
@validate_call
|
|
306
|
+
def install_monarx_v1(
|
|
307
|
+
self,
|
|
308
|
+
virtual_machine_id: Annotated[StrictInt, Field(description="Virtual Machine ID")],
|
|
309
|
+
_request_timeout: Union[
|
|
310
|
+
None,
|
|
311
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
312
|
+
Tuple[
|
|
313
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
314
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
315
|
+
]
|
|
316
|
+
] = None,
|
|
317
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
318
|
+
_content_type: Optional[StrictStr] = None,
|
|
319
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
320
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
321
|
+
) -> VPSV1ActionActionResource:
|
|
322
|
+
"""Install Monarx
|
|
323
|
+
|
|
324
|
+
This endpoint installs the Monarx malware scanner on a specified virtual machine. [Monarx](https://www.monarx.com/) is a security tool designed to detect and prevent malware infections on virtual machines. By installing Monarx, users can enhance the security of their virtual machines, ensuring that they are protected against malicious software.
|
|
325
|
+
|
|
326
|
+
:param virtual_machine_id: Virtual Machine ID (required)
|
|
327
|
+
:type virtual_machine_id: int
|
|
328
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
329
|
+
number provided, it will be total request
|
|
330
|
+
timeout. It can also be a pair (tuple) of
|
|
331
|
+
(connection, read) timeouts.
|
|
332
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
333
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
334
|
+
request; this effectively ignores the
|
|
335
|
+
authentication in the spec for a single request.
|
|
336
|
+
:type _request_auth: dict, optional
|
|
337
|
+
:param _content_type: force content-type for the request.
|
|
338
|
+
:type _content_type: str, Optional
|
|
339
|
+
:param _headers: set to override the headers for a single
|
|
340
|
+
request; this effectively ignores the headers
|
|
341
|
+
in the spec for a single request.
|
|
342
|
+
:type _headers: dict, optional
|
|
343
|
+
:param _host_index: set to override the host_index for a single
|
|
344
|
+
request; this effectively ignores the host_index
|
|
345
|
+
in the spec for a single request.
|
|
346
|
+
:type _host_index: int, optional
|
|
347
|
+
:return: Returns the result object.
|
|
348
|
+
""" # noqa: E501
|
|
349
|
+
|
|
350
|
+
_param = self._install_monarx_v1_serialize(
|
|
351
|
+
virtual_machine_id=virtual_machine_id,
|
|
352
|
+
_request_auth=_request_auth,
|
|
353
|
+
_content_type=_content_type,
|
|
354
|
+
_headers=_headers,
|
|
355
|
+
_host_index=_host_index
|
|
356
|
+
)
|
|
357
|
+
|
|
358
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
359
|
+
'200': "VPSV1ActionActionResource",
|
|
360
|
+
'422': "CommonSchemaUnprocessableContentResponseSchema",
|
|
361
|
+
'401': "CommonSchemaUnauthorizedResponseSchema",
|
|
362
|
+
'500': "CommonSchemaErrorResponseSchema",
|
|
363
|
+
}
|
|
364
|
+
response_data = self.api_client.call_api(
|
|
365
|
+
*_param,
|
|
366
|
+
_request_timeout=_request_timeout
|
|
367
|
+
)
|
|
368
|
+
response_data.read()
|
|
369
|
+
return self.api_client.response_deserialize(
|
|
370
|
+
response_data=response_data,
|
|
371
|
+
response_types_map=_response_types_map,
|
|
372
|
+
).data
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
@validate_call
|
|
376
|
+
def install_monarx_v1_with_http_info(
|
|
377
|
+
self,
|
|
378
|
+
virtual_machine_id: Annotated[StrictInt, Field(description="Virtual Machine ID")],
|
|
379
|
+
_request_timeout: Union[
|
|
380
|
+
None,
|
|
381
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
382
|
+
Tuple[
|
|
383
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
384
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
385
|
+
]
|
|
386
|
+
] = None,
|
|
387
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
388
|
+
_content_type: Optional[StrictStr] = None,
|
|
389
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
390
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
391
|
+
) -> ApiResponse[VPSV1ActionActionResource]:
|
|
392
|
+
"""Install Monarx
|
|
393
|
+
|
|
394
|
+
This endpoint installs the Monarx malware scanner on a specified virtual machine. [Monarx](https://www.monarx.com/) is a security tool designed to detect and prevent malware infections on virtual machines. By installing Monarx, users can enhance the security of their virtual machines, ensuring that they are protected against malicious software.
|
|
395
|
+
|
|
396
|
+
:param virtual_machine_id: Virtual Machine ID (required)
|
|
397
|
+
:type virtual_machine_id: int
|
|
398
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
399
|
+
number provided, it will be total request
|
|
400
|
+
timeout. It can also be a pair (tuple) of
|
|
401
|
+
(connection, read) timeouts.
|
|
402
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
403
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
404
|
+
request; this effectively ignores the
|
|
405
|
+
authentication in the spec for a single request.
|
|
406
|
+
:type _request_auth: dict, optional
|
|
407
|
+
:param _content_type: force content-type for the request.
|
|
408
|
+
:type _content_type: str, Optional
|
|
409
|
+
:param _headers: set to override the headers for a single
|
|
410
|
+
request; this effectively ignores the headers
|
|
411
|
+
in the spec for a single request.
|
|
412
|
+
:type _headers: dict, optional
|
|
413
|
+
:param _host_index: set to override the host_index for a single
|
|
414
|
+
request; this effectively ignores the host_index
|
|
415
|
+
in the spec for a single request.
|
|
416
|
+
:type _host_index: int, optional
|
|
417
|
+
:return: Returns the result object.
|
|
418
|
+
""" # noqa: E501
|
|
419
|
+
|
|
420
|
+
_param = self._install_monarx_v1_serialize(
|
|
421
|
+
virtual_machine_id=virtual_machine_id,
|
|
422
|
+
_request_auth=_request_auth,
|
|
423
|
+
_content_type=_content_type,
|
|
424
|
+
_headers=_headers,
|
|
425
|
+
_host_index=_host_index
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
429
|
+
'200': "VPSV1ActionActionResource",
|
|
430
|
+
'422': "CommonSchemaUnprocessableContentResponseSchema",
|
|
431
|
+
'401': "CommonSchemaUnauthorizedResponseSchema",
|
|
432
|
+
'500': "CommonSchemaErrorResponseSchema",
|
|
433
|
+
}
|
|
434
|
+
response_data = self.api_client.call_api(
|
|
435
|
+
*_param,
|
|
436
|
+
_request_timeout=_request_timeout
|
|
437
|
+
)
|
|
438
|
+
response_data.read()
|
|
439
|
+
return self.api_client.response_deserialize(
|
|
440
|
+
response_data=response_data,
|
|
441
|
+
response_types_map=_response_types_map,
|
|
442
|
+
)
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
@validate_call
|
|
446
|
+
def install_monarx_v1_without_preload_content(
|
|
447
|
+
self,
|
|
448
|
+
virtual_machine_id: Annotated[StrictInt, Field(description="Virtual Machine ID")],
|
|
449
|
+
_request_timeout: Union[
|
|
450
|
+
None,
|
|
451
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
452
|
+
Tuple[
|
|
453
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
454
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
455
|
+
]
|
|
456
|
+
] = None,
|
|
457
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
458
|
+
_content_type: Optional[StrictStr] = None,
|
|
459
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
460
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
461
|
+
) -> RESTResponseType:
|
|
462
|
+
"""Install Monarx
|
|
463
|
+
|
|
464
|
+
This endpoint installs the Monarx malware scanner on a specified virtual machine. [Monarx](https://www.monarx.com/) is a security tool designed to detect and prevent malware infections on virtual machines. By installing Monarx, users can enhance the security of their virtual machines, ensuring that they are protected against malicious software.
|
|
465
|
+
|
|
466
|
+
:param virtual_machine_id: Virtual Machine ID (required)
|
|
467
|
+
:type virtual_machine_id: int
|
|
468
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
469
|
+
number provided, it will be total request
|
|
470
|
+
timeout. It can also be a pair (tuple) of
|
|
471
|
+
(connection, read) timeouts.
|
|
472
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
473
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
474
|
+
request; this effectively ignores the
|
|
475
|
+
authentication in the spec for a single request.
|
|
476
|
+
:type _request_auth: dict, optional
|
|
477
|
+
:param _content_type: force content-type for the request.
|
|
478
|
+
:type _content_type: str, Optional
|
|
479
|
+
:param _headers: set to override the headers for a single
|
|
480
|
+
request; this effectively ignores the headers
|
|
481
|
+
in the spec for a single request.
|
|
482
|
+
:type _headers: dict, optional
|
|
483
|
+
:param _host_index: set to override the host_index for a single
|
|
484
|
+
request; this effectively ignores the host_index
|
|
485
|
+
in the spec for a single request.
|
|
486
|
+
:type _host_index: int, optional
|
|
487
|
+
:return: Returns the result object.
|
|
488
|
+
""" # noqa: E501
|
|
489
|
+
|
|
490
|
+
_param = self._install_monarx_v1_serialize(
|
|
491
|
+
virtual_machine_id=virtual_machine_id,
|
|
492
|
+
_request_auth=_request_auth,
|
|
493
|
+
_content_type=_content_type,
|
|
494
|
+
_headers=_headers,
|
|
495
|
+
_host_index=_host_index
|
|
496
|
+
)
|
|
497
|
+
|
|
498
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
499
|
+
'200': "VPSV1ActionActionResource",
|
|
500
|
+
'422': "CommonSchemaUnprocessableContentResponseSchema",
|
|
501
|
+
'401': "CommonSchemaUnauthorizedResponseSchema",
|
|
502
|
+
'500': "CommonSchemaErrorResponseSchema",
|
|
503
|
+
}
|
|
504
|
+
response_data = self.api_client.call_api(
|
|
505
|
+
*_param,
|
|
506
|
+
_request_timeout=_request_timeout
|
|
507
|
+
)
|
|
508
|
+
return response_data.response
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
def _install_monarx_v1_serialize(
|
|
512
|
+
self,
|
|
513
|
+
virtual_machine_id,
|
|
514
|
+
_request_auth,
|
|
515
|
+
_content_type,
|
|
516
|
+
_headers,
|
|
517
|
+
_host_index,
|
|
518
|
+
) -> RequestSerialized:
|
|
519
|
+
|
|
520
|
+
_host = None
|
|
521
|
+
|
|
522
|
+
_collection_formats: Dict[str, str] = {
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
_path_params: Dict[str, str] = {}
|
|
526
|
+
_query_params: List[Tuple[str, str]] = []
|
|
527
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
528
|
+
_form_params: List[Tuple[str, str]] = []
|
|
529
|
+
_files: Dict[
|
|
530
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
531
|
+
] = {}
|
|
532
|
+
_body_params: Optional[bytes] = None
|
|
533
|
+
|
|
534
|
+
# process the path parameters
|
|
535
|
+
if virtual_machine_id is not None:
|
|
536
|
+
_path_params['virtualMachineId'] = virtual_machine_id
|
|
537
|
+
# process the query parameters
|
|
538
|
+
# process the header parameters
|
|
539
|
+
# process the form parameters
|
|
540
|
+
# process the body parameter
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
# set the HTTP header `Accept`
|
|
544
|
+
if 'Accept' not in _header_params:
|
|
545
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
546
|
+
[
|
|
547
|
+
'application/json'
|
|
548
|
+
]
|
|
549
|
+
)
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
# authentication setting
|
|
553
|
+
_auth_settings: List[str] = [
|
|
554
|
+
'apiToken'
|
|
555
|
+
]
|
|
556
|
+
|
|
557
|
+
return self.api_client.param_serialize(
|
|
558
|
+
method='POST',
|
|
559
|
+
resource_path='/api/vps/v1/virtual-machines/{virtualMachineId}/monarx',
|
|
560
|
+
path_params=_path_params,
|
|
561
|
+
query_params=_query_params,
|
|
562
|
+
header_params=_header_params,
|
|
563
|
+
body=_body_params,
|
|
564
|
+
post_params=_form_params,
|
|
565
|
+
files=_files,
|
|
566
|
+
auth_settings=_auth_settings,
|
|
567
|
+
collection_formats=_collection_formats,
|
|
568
|
+
_host=_host,
|
|
569
|
+
_request_auth=_request_auth
|
|
570
|
+
)
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
@validate_call
|
|
576
|
+
def uninstall_monarx_v1(
|
|
577
|
+
self,
|
|
578
|
+
virtual_machine_id: Annotated[StrictInt, Field(description="Virtual Machine ID")],
|
|
579
|
+
_request_timeout: Union[
|
|
580
|
+
None,
|
|
581
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
582
|
+
Tuple[
|
|
583
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
584
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
585
|
+
]
|
|
586
|
+
] = None,
|
|
587
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
588
|
+
_content_type: Optional[StrictStr] = None,
|
|
589
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
590
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
591
|
+
) -> VPSV1ActionActionResource:
|
|
592
|
+
"""Uninstall Monarx
|
|
593
|
+
|
|
594
|
+
This endpoint uninstalls the Monarx malware scanner on a specified virtual machine. If Monarx is not installed, the request will still be processed without any effect.
|
|
595
|
+
|
|
596
|
+
:param virtual_machine_id: Virtual Machine ID (required)
|
|
597
|
+
:type virtual_machine_id: int
|
|
598
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
599
|
+
number provided, it will be total request
|
|
600
|
+
timeout. It can also be a pair (tuple) of
|
|
601
|
+
(connection, read) timeouts.
|
|
602
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
603
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
604
|
+
request; this effectively ignores the
|
|
605
|
+
authentication in the spec for a single request.
|
|
606
|
+
:type _request_auth: dict, optional
|
|
607
|
+
:param _content_type: force content-type for the request.
|
|
608
|
+
:type _content_type: str, Optional
|
|
609
|
+
:param _headers: set to override the headers for a single
|
|
610
|
+
request; this effectively ignores the headers
|
|
611
|
+
in the spec for a single request.
|
|
612
|
+
:type _headers: dict, optional
|
|
613
|
+
:param _host_index: set to override the host_index for a single
|
|
614
|
+
request; this effectively ignores the host_index
|
|
615
|
+
in the spec for a single request.
|
|
616
|
+
:type _host_index: int, optional
|
|
617
|
+
:return: Returns the result object.
|
|
618
|
+
""" # noqa: E501
|
|
619
|
+
|
|
620
|
+
_param = self._uninstall_monarx_v1_serialize(
|
|
621
|
+
virtual_machine_id=virtual_machine_id,
|
|
622
|
+
_request_auth=_request_auth,
|
|
623
|
+
_content_type=_content_type,
|
|
624
|
+
_headers=_headers,
|
|
625
|
+
_host_index=_host_index
|
|
626
|
+
)
|
|
627
|
+
|
|
628
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
629
|
+
'200': "VPSV1ActionActionResource",
|
|
630
|
+
'422': "CommonSchemaUnprocessableContentResponseSchema",
|
|
631
|
+
'401': "CommonSchemaUnauthorizedResponseSchema",
|
|
632
|
+
'500': "CommonSchemaErrorResponseSchema",
|
|
633
|
+
}
|
|
634
|
+
response_data = self.api_client.call_api(
|
|
635
|
+
*_param,
|
|
636
|
+
_request_timeout=_request_timeout
|
|
637
|
+
)
|
|
638
|
+
response_data.read()
|
|
639
|
+
return self.api_client.response_deserialize(
|
|
640
|
+
response_data=response_data,
|
|
641
|
+
response_types_map=_response_types_map,
|
|
642
|
+
).data
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
@validate_call
|
|
646
|
+
def uninstall_monarx_v1_with_http_info(
|
|
647
|
+
self,
|
|
648
|
+
virtual_machine_id: Annotated[StrictInt, Field(description="Virtual Machine ID")],
|
|
649
|
+
_request_timeout: Union[
|
|
650
|
+
None,
|
|
651
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
652
|
+
Tuple[
|
|
653
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
654
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
655
|
+
]
|
|
656
|
+
] = None,
|
|
657
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
658
|
+
_content_type: Optional[StrictStr] = None,
|
|
659
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
660
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
661
|
+
) -> ApiResponse[VPSV1ActionActionResource]:
|
|
662
|
+
"""Uninstall Monarx
|
|
663
|
+
|
|
664
|
+
This endpoint uninstalls the Monarx malware scanner on a specified virtual machine. If Monarx is not installed, the request will still be processed without any effect.
|
|
665
|
+
|
|
666
|
+
:param virtual_machine_id: Virtual Machine ID (required)
|
|
667
|
+
:type virtual_machine_id: int
|
|
668
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
669
|
+
number provided, it will be total request
|
|
670
|
+
timeout. It can also be a pair (tuple) of
|
|
671
|
+
(connection, read) timeouts.
|
|
672
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
673
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
674
|
+
request; this effectively ignores the
|
|
675
|
+
authentication in the spec for a single request.
|
|
676
|
+
:type _request_auth: dict, optional
|
|
677
|
+
:param _content_type: force content-type for the request.
|
|
678
|
+
:type _content_type: str, Optional
|
|
679
|
+
:param _headers: set to override the headers for a single
|
|
680
|
+
request; this effectively ignores the headers
|
|
681
|
+
in the spec for a single request.
|
|
682
|
+
:type _headers: dict, optional
|
|
683
|
+
:param _host_index: set to override the host_index for a single
|
|
684
|
+
request; this effectively ignores the host_index
|
|
685
|
+
in the spec for a single request.
|
|
686
|
+
:type _host_index: int, optional
|
|
687
|
+
:return: Returns the result object.
|
|
688
|
+
""" # noqa: E501
|
|
689
|
+
|
|
690
|
+
_param = self._uninstall_monarx_v1_serialize(
|
|
691
|
+
virtual_machine_id=virtual_machine_id,
|
|
692
|
+
_request_auth=_request_auth,
|
|
693
|
+
_content_type=_content_type,
|
|
694
|
+
_headers=_headers,
|
|
695
|
+
_host_index=_host_index
|
|
696
|
+
)
|
|
697
|
+
|
|
698
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
699
|
+
'200': "VPSV1ActionActionResource",
|
|
700
|
+
'422': "CommonSchemaUnprocessableContentResponseSchema",
|
|
701
|
+
'401': "CommonSchemaUnauthorizedResponseSchema",
|
|
702
|
+
'500': "CommonSchemaErrorResponseSchema",
|
|
703
|
+
}
|
|
704
|
+
response_data = self.api_client.call_api(
|
|
705
|
+
*_param,
|
|
706
|
+
_request_timeout=_request_timeout
|
|
707
|
+
)
|
|
708
|
+
response_data.read()
|
|
709
|
+
return self.api_client.response_deserialize(
|
|
710
|
+
response_data=response_data,
|
|
711
|
+
response_types_map=_response_types_map,
|
|
712
|
+
)
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
@validate_call
|
|
716
|
+
def uninstall_monarx_v1_without_preload_content(
|
|
717
|
+
self,
|
|
718
|
+
virtual_machine_id: Annotated[StrictInt, Field(description="Virtual Machine ID")],
|
|
719
|
+
_request_timeout: Union[
|
|
720
|
+
None,
|
|
721
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
722
|
+
Tuple[
|
|
723
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
724
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
725
|
+
]
|
|
726
|
+
] = None,
|
|
727
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
728
|
+
_content_type: Optional[StrictStr] = None,
|
|
729
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
730
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
731
|
+
) -> RESTResponseType:
|
|
732
|
+
"""Uninstall Monarx
|
|
733
|
+
|
|
734
|
+
This endpoint uninstalls the Monarx malware scanner on a specified virtual machine. If Monarx is not installed, the request will still be processed without any effect.
|
|
735
|
+
|
|
736
|
+
:param virtual_machine_id: Virtual Machine ID (required)
|
|
737
|
+
:type virtual_machine_id: int
|
|
738
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
739
|
+
number provided, it will be total request
|
|
740
|
+
timeout. It can also be a pair (tuple) of
|
|
741
|
+
(connection, read) timeouts.
|
|
742
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
743
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
744
|
+
request; this effectively ignores the
|
|
745
|
+
authentication in the spec for a single request.
|
|
746
|
+
:type _request_auth: dict, optional
|
|
747
|
+
:param _content_type: force content-type for the request.
|
|
748
|
+
:type _content_type: str, Optional
|
|
749
|
+
:param _headers: set to override the headers for a single
|
|
750
|
+
request; this effectively ignores the headers
|
|
751
|
+
in the spec for a single request.
|
|
752
|
+
:type _headers: dict, optional
|
|
753
|
+
:param _host_index: set to override the host_index for a single
|
|
754
|
+
request; this effectively ignores the host_index
|
|
755
|
+
in the spec for a single request.
|
|
756
|
+
:type _host_index: int, optional
|
|
757
|
+
:return: Returns the result object.
|
|
758
|
+
""" # noqa: E501
|
|
759
|
+
|
|
760
|
+
_param = self._uninstall_monarx_v1_serialize(
|
|
761
|
+
virtual_machine_id=virtual_machine_id,
|
|
762
|
+
_request_auth=_request_auth,
|
|
763
|
+
_content_type=_content_type,
|
|
764
|
+
_headers=_headers,
|
|
765
|
+
_host_index=_host_index
|
|
766
|
+
)
|
|
767
|
+
|
|
768
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
769
|
+
'200': "VPSV1ActionActionResource",
|
|
770
|
+
'422': "CommonSchemaUnprocessableContentResponseSchema",
|
|
771
|
+
'401': "CommonSchemaUnauthorizedResponseSchema",
|
|
772
|
+
'500': "CommonSchemaErrorResponseSchema",
|
|
773
|
+
}
|
|
774
|
+
response_data = self.api_client.call_api(
|
|
775
|
+
*_param,
|
|
776
|
+
_request_timeout=_request_timeout
|
|
777
|
+
)
|
|
778
|
+
return response_data.response
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
def _uninstall_monarx_v1_serialize(
|
|
782
|
+
self,
|
|
783
|
+
virtual_machine_id,
|
|
784
|
+
_request_auth,
|
|
785
|
+
_content_type,
|
|
786
|
+
_headers,
|
|
787
|
+
_host_index,
|
|
788
|
+
) -> RequestSerialized:
|
|
789
|
+
|
|
790
|
+
_host = None
|
|
791
|
+
|
|
792
|
+
_collection_formats: Dict[str, str] = {
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
_path_params: Dict[str, str] = {}
|
|
796
|
+
_query_params: List[Tuple[str, str]] = []
|
|
797
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
798
|
+
_form_params: List[Tuple[str, str]] = []
|
|
799
|
+
_files: Dict[
|
|
800
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
801
|
+
] = {}
|
|
802
|
+
_body_params: Optional[bytes] = None
|
|
803
|
+
|
|
804
|
+
# process the path parameters
|
|
805
|
+
if virtual_machine_id is not None:
|
|
806
|
+
_path_params['virtualMachineId'] = virtual_machine_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
|
+
if 'Accept' not in _header_params:
|
|
815
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
816
|
+
[
|
|
817
|
+
'application/json'
|
|
818
|
+
]
|
|
819
|
+
)
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
# authentication setting
|
|
823
|
+
_auth_settings: List[str] = [
|
|
824
|
+
'apiToken'
|
|
825
|
+
]
|
|
826
|
+
|
|
827
|
+
return self.api_client.param_serialize(
|
|
828
|
+
method='DELETE',
|
|
829
|
+
resource_path='/api/vps/v1/virtual-machines/{virtualMachineId}/monarx',
|
|
830
|
+
path_params=_path_params,
|
|
831
|
+
query_params=_query_params,
|
|
832
|
+
header_params=_header_params,
|
|
833
|
+
body=_body_params,
|
|
834
|
+
post_params=_form_params,
|
|
835
|
+
files=_files,
|
|
836
|
+
auth_settings=_auth_settings,
|
|
837
|
+
collection_formats=_collection_formats,
|
|
838
|
+
_host=_host,
|
|
839
|
+
_request_auth=_request_auth
|
|
840
|
+
)
|
|
841
|
+
|
|
842
|
+
|