ha-sdk-python 1.0.10__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.
- ha_sdk_python/__init__.py +490 -0
- ha_sdk_python/api/__init__.py +15 -0
- ha_sdk_python/api/backups_api.py +2434 -0
- ha_sdk_python/api/console_access_api.py +334 -0
- ha_sdk_python/api/dns_api.py +896 -0
- ha_sdk_python/api/firewall_api.py +1534 -0
- ha_sdk_python/api/monitoring_api.py +1234 -0
- ha_sdk_python/api/power_management_api.py +2434 -0
- ha_sdk_python/api/security_api.py +1243 -0
- ha_sdk_python/api/service_management_api.py +1797 -0
- ha_sdk_python/api/snapshots_api.py +1534 -0
- ha_sdk_python/api/user_management_api.py +331 -0
- ha_sdk_python/api/vps_management_api.py +2399 -0
- ha_sdk_python/api_client.py +805 -0
- ha_sdk_python/api_response.py +21 -0
- ha_sdk_python/configuration.py +593 -0
- ha_sdk_python/exceptions.py +218 -0
- ha_sdk_python/models/__init__.py +227 -0
- ha_sdk_python/models/backup_create_response_data.py +97 -0
- ha_sdk_python/models/backup_creation_info.py +95 -0
- ha_sdk_python/models/backup_item.py +95 -0
- ha_sdk_python/models/backup_mode.py +89 -0
- ha_sdk_python/models/backup_mode_type.py +38 -0
- ha_sdk_python/models/backup_schedule.py +98 -0
- ha_sdk_python/models/backup_schedule_list_response_data.py +97 -0
- ha_sdk_python/models/bad_request_error_response_content.py +89 -0
- ha_sdk_python/models/billing_cycle.py +37 -0
- ha_sdk_python/models/cancel_vps_request_content.py +90 -0
- ha_sdk_python/models/cancel_vps_response_content.py +94 -0
- ha_sdk_python/models/catalogue_config_option.py +105 -0
- ha_sdk_python/models/catalogue_config_suboption.py +96 -0
- ha_sdk_python/models/catalogue_currency.py +91 -0
- ha_sdk_python/models/catalogue_data.py +107 -0
- ha_sdk_python/models/catalogue_group.py +99 -0
- ha_sdk_python/models/catalogue_plan.py +108 -0
- ha_sdk_python/models/catalogue_product.py +131 -0
- ha_sdk_python/models/change_password_request_content.py +90 -0
- ha_sdk_python/models/change_password_response_content.py +94 -0
- ha_sdk_python/models/compression_method.py +89 -0
- ha_sdk_python/models/compression_type.py +39 -0
- ha_sdk_python/models/create_backup_request_content.py +93 -0
- ha_sdk_python/models/create_backup_response_content.py +94 -0
- ha_sdk_python/models/create_backup_schedule_request_content.py +108 -0
- ha_sdk_python/models/create_backup_schedule_response_content.py +94 -0
- ha_sdk_python/models/create_firewall_rule_request_content.py +115 -0
- ha_sdk_python/models/create_firewall_rule_response_content.py +94 -0
- ha_sdk_python/models/create_notification_request_content.py +111 -0
- ha_sdk_python/models/create_notification_response_content.py +94 -0
- ha_sdk_python/models/create_order_domain_item.py +101 -0
- ha_sdk_python/models/create_order_items.py +105 -0
- ha_sdk_python/models/create_order_product.py +108 -0
- ha_sdk_python/models/create_order_product_item.py +101 -0
- ha_sdk_python/models/create_order_request_content.py +97 -0
- ha_sdk_python/models/create_order_response_content.py +94 -0
- ha_sdk_python/models/create_order_response_data.py +126 -0
- ha_sdk_python/models/create_order_total.py +91 -0
- ha_sdk_python/models/create_power_task_request_content.py +160 -0
- ha_sdk_python/models/create_power_task_response_content.py +94 -0
- ha_sdk_python/models/create_rdns_record_request_content.py +96 -0
- ha_sdk_python/models/create_rdns_record_response_content.py +94 -0
- ha_sdk_python/models/create_rdns_record_response_data.py +91 -0
- ha_sdk_python/models/create_snapshot_request_content.py +91 -0
- ha_sdk_python/models/create_snapshot_response_content.py +94 -0
- ha_sdk_python/models/day_of_week.py +42 -0
- ha_sdk_python/models/delete_backup_request_content.py +89 -0
- ha_sdk_python/models/delete_backup_response_content.py +94 -0
- ha_sdk_python/models/delete_backup_schedule_request_content.py +89 -0
- ha_sdk_python/models/delete_backup_schedule_response_content.py +94 -0
- ha_sdk_python/models/delete_firewall_rule_request_content.py +89 -0
- ha_sdk_python/models/delete_firewall_rule_response_content.py +94 -0
- ha_sdk_python/models/delete_notification_request_content.py +89 -0
- ha_sdk_python/models/delete_notification_response_content.py +94 -0
- ha_sdk_python/models/delete_power_task_request_content.py +89 -0
- ha_sdk_python/models/delete_power_task_response_content.py +94 -0
- ha_sdk_python/models/delete_rdns_record_request_content.py +88 -0
- ha_sdk_python/models/delete_rdns_record_response_content.py +94 -0
- ha_sdk_python/models/delete_snapshot_request_content.py +89 -0
- ha_sdk_python/models/delete_snapshot_response_content.py +94 -0
- ha_sdk_python/models/edit_backup_schedule_request_content.py +110 -0
- ha_sdk_python/models/edit_backup_schedule_response_content.py +94 -0
- ha_sdk_python/models/firewall_list_response_data.py +125 -0
- ha_sdk_python/models/firewall_move_direction.py +39 -0
- ha_sdk_python/models/firewall_move_response_data.py +91 -0
- ha_sdk_python/models/firewall_option.py +89 -0
- ha_sdk_python/models/firewall_rule.py +113 -0
- ha_sdk_python/models/firewall_rule_action.py +38 -0
- ha_sdk_python/models/firewall_rule_type.py +38 -0
- ha_sdk_python/models/forbidden_error_response_content.py +89 -0
- ha_sdk_python/models/get_catalogue_request_content.py +89 -0
- ha_sdk_python/models/get_catalogue_response_content.py +94 -0
- ha_sdk_python/models/get_no_vnc_console_request_content.py +87 -0
- ha_sdk_python/models/get_no_vnc_console_response_content.py +94 -0
- ha_sdk_python/models/get_private_ssh_key_request_content.py +87 -0
- ha_sdk_python/models/get_private_ssh_key_response_content.py +94 -0
- ha_sdk_python/models/get_public_ssh_key_request_content.py +87 -0
- ha_sdk_python/models/get_public_ssh_key_response_content.py +94 -0
- ha_sdk_python/models/get_vps_config_request_content.py +87 -0
- ha_sdk_python/models/get_vps_config_response_content.py +94 -0
- ha_sdk_python/models/get_vps_details_request_content.py +87 -0
- ha_sdk_python/models/get_vps_details_response_content.py +94 -0
- ha_sdk_python/models/internal_service_error_response_content.py +89 -0
- ha_sdk_python/models/invalid_state_error_response_content.py +89 -0
- ha_sdk_python/models/list_backup_schedules_request_content.py +87 -0
- ha_sdk_python/models/list_backup_schedules_response_content.py +94 -0
- ha_sdk_python/models/list_backups_request_content.py +87 -0
- ha_sdk_python/models/list_backups_response_content.py +94 -0
- ha_sdk_python/models/list_firewall_rules_request_content.py +87 -0
- ha_sdk_python/models/list_firewall_rules_response_content.py +94 -0
- ha_sdk_python/models/list_isos_request_content.py +87 -0
- ha_sdk_python/models/list_isos_response_content.py +94 -0
- ha_sdk_python/models/list_isos_response_data.py +89 -0
- ha_sdk_python/models/list_notifications_request_content.py +87 -0
- ha_sdk_python/models/list_notifications_response_content.py +94 -0
- ha_sdk_python/models/list_orders_response_content.py +94 -0
- ha_sdk_python/models/list_orders_response_data.py +95 -0
- ha_sdk_python/models/list_power_tasks_request_content.py +87 -0
- ha_sdk_python/models/list_power_tasks_response_content.py +94 -0
- ha_sdk_python/models/list_rdns_records_response_content.py +94 -0
- ha_sdk_python/models/list_rdns_response_data.py +115 -0
- ha_sdk_python/models/list_reinstall_os_request_content.py +87 -0
- ha_sdk_python/models/list_reinstall_os_response_content.py +94 -0
- ha_sdk_python/models/list_reinstall_os_response_data.py +89 -0
- ha_sdk_python/models/list_snapshots_request_content.py +87 -0
- ha_sdk_python/models/list_snapshots_response_content.py +94 -0
- ha_sdk_python/models/list_vps_services_data.py +95 -0
- ha_sdk_python/models/list_vps_services_response_content.py +94 -0
- ha_sdk_python/models/mount_iso_request_content.py +91 -0
- ha_sdk_python/models/mount_iso_response_content.py +94 -0
- ha_sdk_python/models/move_firewall_rule_request_content.py +94 -0
- ha_sdk_python/models/move_firewall_rule_response_content.py +94 -0
- ha_sdk_python/models/no_vnc_console_details.py +95 -0
- ha_sdk_python/models/no_vnc_console_response_data.py +93 -0
- ha_sdk_python/models/notification.py +105 -0
- ha_sdk_python/models/notification_create_response_data.py +93 -0
- ha_sdk_python/models/notification_dialog_rules.py +95 -0
- ha_sdk_python/models/notification_list_response_data.py +103 -0
- ha_sdk_python/models/notification_status.py +43 -0
- ha_sdk_python/models/operation_status.py +37 -0
- ha_sdk_python/models/order.py +109 -0
- ha_sdk_python/models/order_last_attempt.py +93 -0
- ha_sdk_python/models/order_warning.py +89 -0
- ha_sdk_python/models/payment_error.py +89 -0
- ha_sdk_python/models/payment_status.py +38 -0
- ha_sdk_python/models/power_task.py +105 -0
- ha_sdk_python/models/power_task_action.py +38 -0
- ha_sdk_python/models/power_task_create_response_data.py +93 -0
- ha_sdk_python/models/power_task_dialog_rules.py +95 -0
- ha_sdk_python/models/power_task_job_type.py +38 -0
- ha_sdk_python/models/power_task_list_response_data.py +107 -0
- ha_sdk_python/models/public_ssh_key_response_data.py +93 -0
- ha_sdk_python/models/rdns_available_item.py +111 -0
- ha_sdk_python/models/rdns_pool.py +89 -0
- ha_sdk_python/models/rdns_record.py +109 -0
- ha_sdk_python/models/reboot_vps_request_content.py +87 -0
- ha_sdk_python/models/reboot_vps_response_content.py +94 -0
- ha_sdk_python/models/resource_not_found_error_response_content.py +89 -0
- ha_sdk_python/models/restore_backup_request_content.py +89 -0
- ha_sdk_python/models/restore_backup_response_content.py +94 -0
- ha_sdk_python/models/retry_payment_request_content.py +89 -0
- ha_sdk_python/models/retry_payment_response_content.py +94 -0
- ha_sdk_python/models/retry_payment_response_data.py +98 -0
- ha_sdk_python/models/retry_payment_total.py +91 -0
- ha_sdk_python/models/rollback_snapshot_request_content.py +89 -0
- ha_sdk_python/models/rollback_snapshot_response_content.py +94 -0
- ha_sdk_python/models/service_backups_response_data.py +131 -0
- ha_sdk_python/models/service_snapshots_response_data.py +101 -0
- ha_sdk_python/models/service_unavailable_error_response_content.py +89 -0
- ha_sdk_python/models/shutdown_vps_request_content.py +87 -0
- ha_sdk_python/models/shutdown_vps_response_content.py +94 -0
- ha_sdk_python/models/snapshot_create_response_data.py +89 -0
- ha_sdk_python/models/snapshot_item.py +95 -0
- ha_sdk_python/models/ssh_key_details.py +89 -0
- ha_sdk_python/models/start_vps_request_content.py +87 -0
- ha_sdk_python/models/start_vps_response_content.py +94 -0
- ha_sdk_python/models/stop_vps_request_content.py +87 -0
- ha_sdk_python/models/stop_vps_response_content.py +94 -0
- ha_sdk_python/models/too_many_requests_error_response_content.py +89 -0
- ha_sdk_python/models/trigger_reinstall_request_content.py +89 -0
- ha_sdk_python/models/trigger_reinstall_response_content.py +94 -0
- ha_sdk_python/models/trigger_reinstall_response_data.py +89 -0
- ha_sdk_python/models/unauthorized_error_response_content.py +89 -0
- ha_sdk_python/models/update_firewall_rule_request_content.py +94 -0
- ha_sdk_python/models/update_firewall_rule_response_content.py +94 -0
- ha_sdk_python/models/update_notification_request_content.py +113 -0
- ha_sdk_python/models/update_notification_response_content.py +94 -0
- ha_sdk_python/models/update_power_task_request_content.py +164 -0
- ha_sdk_python/models/update_power_task_response_content.py +94 -0
- ha_sdk_python/models/update_snapshot_request_content.py +91 -0
- ha_sdk_python/models/update_snapshot_response_content.py +94 -0
- ha_sdk_python/models/update_ssh_keys_request_content.py +97 -0
- ha_sdk_python/models/update_ssh_keys_response_content.py +94 -0
- ha_sdk_python/models/update_vps_config_request_content.py +99 -0
- ha_sdk_python/models/update_vps_config_response_content.py +94 -0
- ha_sdk_python/models/user_change_password_details.py +91 -0
- ha_sdk_python/models/user_change_password_request_content.py +92 -0
- ha_sdk_python/models/user_change_password_response_content.py +94 -0
- ha_sdk_python/models/user_change_password_response_data.py +95 -0
- ha_sdk_python/models/validate_pricing_base.py +89 -0
- ha_sdk_python/models/validate_pricing_breakdown.py +103 -0
- ha_sdk_python/models/validate_pricing_config_item.py +116 -0
- ha_sdk_python/models/validate_pricing_currency.py +93 -0
- ha_sdk_python/models/validate_pricing_discount.py +97 -0
- ha_sdk_python/models/validate_pricing_plan_config.py +97 -0
- ha_sdk_python/models/validate_pricing_plan_pricing.py +89 -0
- ha_sdk_python/models/validate_pricing_price_range.py +91 -0
- ha_sdk_python/models/validate_pricing_product.py +101 -0
- ha_sdk_python/models/validate_pricing_product_result.py +121 -0
- ha_sdk_python/models/validate_pricing_prorata.py +95 -0
- ha_sdk_python/models/validate_pricing_request_content.py +97 -0
- ha_sdk_python/models/validate_pricing_response_content.py +94 -0
- ha_sdk_python/models/validate_pricing_response_data.py +109 -0
- ha_sdk_python/models/validate_pricing_summary.py +101 -0
- ha_sdk_python/models/validate_pricing_summary_recurring.py +91 -0
- ha_sdk_python/models/validation_error_response_content.py +89 -0
- ha_sdk_python/models/vps_available_features.py +115 -0
- ha_sdk_python/models/vps_bandwidth_info.py +94 -0
- ha_sdk_python/models/vps_cancel_response_data.py +93 -0
- ha_sdk_python/models/vps_cancel_type.py +37 -0
- ha_sdk_python/models/vps_config_response_data.py +108 -0
- ha_sdk_python/models/vps_cpu_info.py +92 -0
- ha_sdk_python/models/vps_credentials.py +89 -0
- ha_sdk_python/models/vps_details_response.py +143 -0
- ha_sdk_python/models/vps_disk_info.py +96 -0
- ha_sdk_python/models/vps_memory_info.py +96 -0
- ha_sdk_python/models/vps_network_rate.py +92 -0
- ha_sdk_python/models/vps_os_info.py +89 -0
- ha_sdk_python/models/vps_service_info.py +97 -0
- ha_sdk_python/models/vps_simple_action_response_data.py +87 -0
- ha_sdk_python/models/vps_vm_info.py +102 -0
- ha_sdk_python/py.typed +0 -0
- ha_sdk_python/rest.py +263 -0
- ha_sdk_python/retryable_paths.py +26 -0
- ha_sdk_python-1.0.10.dist-info/METADATA +131 -0
- ha_sdk_python-1.0.10.dist-info/RECORD +237 -0
- ha_sdk_python-1.0.10.dist-info/WHEEL +5 -0
- ha_sdk_python-1.0.10.dist-info/licenses/LICENSE +21 -0
- ha_sdk_python-1.0.10.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1534 @@
|
|
|
1
|
+
"""
|
|
2
|
+
HostAfricaApi
|
|
3
|
+
|
|
4
|
+
HostAfrica API
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2026-01-01
|
|
7
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
8
|
+
|
|
9
|
+
Do not edit the class manually.
|
|
10
|
+
""" # noqa: E501
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import warnings
|
|
14
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
from typing_extensions import Annotated
|
|
17
|
+
|
|
18
|
+
from ha_sdk_python.models.create_snapshot_request_content import CreateSnapshotRequestContent
|
|
19
|
+
from ha_sdk_python.models.create_snapshot_response_content import CreateSnapshotResponseContent
|
|
20
|
+
from ha_sdk_python.models.delete_snapshot_request_content import DeleteSnapshotRequestContent
|
|
21
|
+
from ha_sdk_python.models.delete_snapshot_response_content import DeleteSnapshotResponseContent
|
|
22
|
+
from ha_sdk_python.models.list_snapshots_request_content import ListSnapshotsRequestContent
|
|
23
|
+
from ha_sdk_python.models.list_snapshots_response_content import ListSnapshotsResponseContent
|
|
24
|
+
from ha_sdk_python.models.rollback_snapshot_request_content import RollbackSnapshotRequestContent
|
|
25
|
+
from ha_sdk_python.models.rollback_snapshot_response_content import RollbackSnapshotResponseContent
|
|
26
|
+
from ha_sdk_python.models.update_snapshot_request_content import UpdateSnapshotRequestContent
|
|
27
|
+
from ha_sdk_python.models.update_snapshot_response_content import UpdateSnapshotResponseContent
|
|
28
|
+
|
|
29
|
+
from ha_sdk_python.api_client import ApiClient, RequestSerialized
|
|
30
|
+
from ha_sdk_python.api_response import ApiResponse
|
|
31
|
+
from ha_sdk_python.rest import RESTResponseType
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class SnapshotsApi:
|
|
35
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
36
|
+
Ref: https://openapi-generator.tech
|
|
37
|
+
|
|
38
|
+
Do not edit the class manually.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def __init__(self, api_client=None) -> None:
|
|
42
|
+
if api_client is None:
|
|
43
|
+
api_client = ApiClient.get_default()
|
|
44
|
+
self.api_client = api_client
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@validate_call
|
|
48
|
+
def create_snapshot(
|
|
49
|
+
self,
|
|
50
|
+
create_snapshot_request_content: CreateSnapshotRequestContent,
|
|
51
|
+
_request_timeout: Union[
|
|
52
|
+
None,
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Tuple[
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
57
|
+
]
|
|
58
|
+
] = None,
|
|
59
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_content_type: Optional[StrictStr] = None,
|
|
61
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
63
|
+
) -> CreateSnapshotResponseContent:
|
|
64
|
+
"""create_snapshot
|
|
65
|
+
|
|
66
|
+
Creates a new snapshot for a VPS service
|
|
67
|
+
|
|
68
|
+
:param create_snapshot_request_content: (required)
|
|
69
|
+
:type create_snapshot_request_content: CreateSnapshotRequestContent
|
|
70
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
71
|
+
number provided, it will be total request
|
|
72
|
+
timeout. It can also be a pair (tuple) of
|
|
73
|
+
(connection, read) timeouts.
|
|
74
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
75
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
76
|
+
request; this effectively ignores the
|
|
77
|
+
authentication in the spec for a single request.
|
|
78
|
+
:type _request_auth: dict, optional
|
|
79
|
+
:param _content_type: force content-type for the request.
|
|
80
|
+
:type _content_type: str, Optional
|
|
81
|
+
:param _headers: set to override the headers for a single
|
|
82
|
+
request; this effectively ignores the headers
|
|
83
|
+
in the spec for a single request.
|
|
84
|
+
:type _headers: dict, optional
|
|
85
|
+
:param _host_index: set to override the host_index for a single
|
|
86
|
+
request; this effectively ignores the host_index
|
|
87
|
+
in the spec for a single request.
|
|
88
|
+
:type _host_index: int, optional
|
|
89
|
+
:return: Returns the result object.
|
|
90
|
+
""" # noqa: E501
|
|
91
|
+
|
|
92
|
+
_param = self._create_snapshot_serialize(
|
|
93
|
+
create_snapshot_request_content=create_snapshot_request_content,
|
|
94
|
+
_request_auth=_request_auth,
|
|
95
|
+
_content_type=_content_type,
|
|
96
|
+
_headers=_headers,
|
|
97
|
+
_host_index=_host_index
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
101
|
+
'200': "CreateSnapshotResponseContent",
|
|
102
|
+
'400': "BadRequestErrorResponseContent",
|
|
103
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
104
|
+
'403': "ForbiddenErrorResponseContent",
|
|
105
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
106
|
+
'422': "ValidationErrorResponseContent",
|
|
107
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
108
|
+
'500': "InternalServiceErrorResponseContent",
|
|
109
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
110
|
+
}
|
|
111
|
+
response_data = self.api_client.call_api(
|
|
112
|
+
*_param,
|
|
113
|
+
_request_timeout=_request_timeout
|
|
114
|
+
)
|
|
115
|
+
response_data.read()
|
|
116
|
+
return self.api_client.response_deserialize(
|
|
117
|
+
response_data=response_data,
|
|
118
|
+
response_types_map=_response_types_map,
|
|
119
|
+
).data
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
@validate_call
|
|
123
|
+
def create_snapshot_with_http_info(
|
|
124
|
+
self,
|
|
125
|
+
create_snapshot_request_content: CreateSnapshotRequestContent,
|
|
126
|
+
_request_timeout: Union[
|
|
127
|
+
None,
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Tuple[
|
|
130
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
132
|
+
]
|
|
133
|
+
] = None,
|
|
134
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_content_type: Optional[StrictStr] = None,
|
|
136
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
137
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
138
|
+
) -> ApiResponse[CreateSnapshotResponseContent]:
|
|
139
|
+
"""create_snapshot
|
|
140
|
+
|
|
141
|
+
Creates a new snapshot for a VPS service
|
|
142
|
+
|
|
143
|
+
:param create_snapshot_request_content: (required)
|
|
144
|
+
:type create_snapshot_request_content: CreateSnapshotRequestContent
|
|
145
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
146
|
+
number provided, it will be total request
|
|
147
|
+
timeout. It can also be a pair (tuple) of
|
|
148
|
+
(connection, read) timeouts.
|
|
149
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
150
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
151
|
+
request; this effectively ignores the
|
|
152
|
+
authentication in the spec for a single request.
|
|
153
|
+
:type _request_auth: dict, optional
|
|
154
|
+
:param _content_type: force content-type for the request.
|
|
155
|
+
:type _content_type: str, Optional
|
|
156
|
+
:param _headers: set to override the headers for a single
|
|
157
|
+
request; this effectively ignores the headers
|
|
158
|
+
in the spec for a single request.
|
|
159
|
+
:type _headers: dict, optional
|
|
160
|
+
:param _host_index: set to override the host_index for a single
|
|
161
|
+
request; this effectively ignores the host_index
|
|
162
|
+
in the spec for a single request.
|
|
163
|
+
:type _host_index: int, optional
|
|
164
|
+
:return: Returns the result object.
|
|
165
|
+
""" # noqa: E501
|
|
166
|
+
|
|
167
|
+
_param = self._create_snapshot_serialize(
|
|
168
|
+
create_snapshot_request_content=create_snapshot_request_content,
|
|
169
|
+
_request_auth=_request_auth,
|
|
170
|
+
_content_type=_content_type,
|
|
171
|
+
_headers=_headers,
|
|
172
|
+
_host_index=_host_index
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
176
|
+
'200': "CreateSnapshotResponseContent",
|
|
177
|
+
'400': "BadRequestErrorResponseContent",
|
|
178
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
179
|
+
'403': "ForbiddenErrorResponseContent",
|
|
180
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
181
|
+
'422': "ValidationErrorResponseContent",
|
|
182
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
183
|
+
'500': "InternalServiceErrorResponseContent",
|
|
184
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
185
|
+
}
|
|
186
|
+
response_data = self.api_client.call_api(
|
|
187
|
+
*_param,
|
|
188
|
+
_request_timeout=_request_timeout
|
|
189
|
+
)
|
|
190
|
+
response_data.read()
|
|
191
|
+
return self.api_client.response_deserialize(
|
|
192
|
+
response_data=response_data,
|
|
193
|
+
response_types_map=_response_types_map,
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
@validate_call
|
|
198
|
+
def create_snapshot_without_preload_content(
|
|
199
|
+
self,
|
|
200
|
+
create_snapshot_request_content: CreateSnapshotRequestContent,
|
|
201
|
+
_request_timeout: Union[
|
|
202
|
+
None,
|
|
203
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
204
|
+
Tuple[
|
|
205
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
206
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
207
|
+
]
|
|
208
|
+
] = None,
|
|
209
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
210
|
+
_content_type: Optional[StrictStr] = None,
|
|
211
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
212
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
213
|
+
) -> RESTResponseType:
|
|
214
|
+
"""create_snapshot
|
|
215
|
+
|
|
216
|
+
Creates a new snapshot for a VPS service
|
|
217
|
+
|
|
218
|
+
:param create_snapshot_request_content: (required)
|
|
219
|
+
:type create_snapshot_request_content: CreateSnapshotRequestContent
|
|
220
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
221
|
+
number provided, it will be total request
|
|
222
|
+
timeout. It can also be a pair (tuple) of
|
|
223
|
+
(connection, read) timeouts.
|
|
224
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
225
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
226
|
+
request; this effectively ignores the
|
|
227
|
+
authentication in the spec for a single request.
|
|
228
|
+
:type _request_auth: dict, optional
|
|
229
|
+
:param _content_type: force content-type for the request.
|
|
230
|
+
:type _content_type: str, Optional
|
|
231
|
+
:param _headers: set to override the headers for a single
|
|
232
|
+
request; this effectively ignores the headers
|
|
233
|
+
in the spec for a single request.
|
|
234
|
+
:type _headers: dict, optional
|
|
235
|
+
:param _host_index: set to override the host_index for a single
|
|
236
|
+
request; this effectively ignores the host_index
|
|
237
|
+
in the spec for a single request.
|
|
238
|
+
:type _host_index: int, optional
|
|
239
|
+
:return: Returns the result object.
|
|
240
|
+
""" # noqa: E501
|
|
241
|
+
|
|
242
|
+
_param = self._create_snapshot_serialize(
|
|
243
|
+
create_snapshot_request_content=create_snapshot_request_content,
|
|
244
|
+
_request_auth=_request_auth,
|
|
245
|
+
_content_type=_content_type,
|
|
246
|
+
_headers=_headers,
|
|
247
|
+
_host_index=_host_index
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
251
|
+
'200': "CreateSnapshotResponseContent",
|
|
252
|
+
'400': "BadRequestErrorResponseContent",
|
|
253
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
254
|
+
'403': "ForbiddenErrorResponseContent",
|
|
255
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
256
|
+
'422': "ValidationErrorResponseContent",
|
|
257
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
258
|
+
'500': "InternalServiceErrorResponseContent",
|
|
259
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
260
|
+
}
|
|
261
|
+
response_data = self.api_client.call_api(
|
|
262
|
+
*_param,
|
|
263
|
+
_request_timeout=_request_timeout
|
|
264
|
+
)
|
|
265
|
+
return response_data.response
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
def _create_snapshot_serialize(
|
|
269
|
+
self,
|
|
270
|
+
create_snapshot_request_content,
|
|
271
|
+
_request_auth,
|
|
272
|
+
_content_type,
|
|
273
|
+
_headers,
|
|
274
|
+
_host_index,
|
|
275
|
+
) -> RequestSerialized:
|
|
276
|
+
|
|
277
|
+
_host = None
|
|
278
|
+
|
|
279
|
+
_collection_formats: Dict[str, str] = {
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
_path_params: Dict[str, str] = {}
|
|
283
|
+
_query_params: List[Tuple[str, str]] = []
|
|
284
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
285
|
+
_form_params: List[Tuple[str, str]] = []
|
|
286
|
+
_files: Dict[
|
|
287
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
288
|
+
] = {}
|
|
289
|
+
_body_params: Optional[bytes] = None
|
|
290
|
+
|
|
291
|
+
# process the path parameters
|
|
292
|
+
# process the query parameters
|
|
293
|
+
# process the header parameters
|
|
294
|
+
# process the form parameters
|
|
295
|
+
# process the body parameter
|
|
296
|
+
if create_snapshot_request_content is not None:
|
|
297
|
+
_body_params = create_snapshot_request_content
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
# set the HTTP header `Accept`
|
|
301
|
+
if 'Accept' not in _header_params:
|
|
302
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
303
|
+
[
|
|
304
|
+
'application/json'
|
|
305
|
+
]
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
# set the HTTP header `Content-Type`
|
|
309
|
+
if _content_type:
|
|
310
|
+
_header_params['Content-Type'] = _content_type
|
|
311
|
+
else:
|
|
312
|
+
_default_content_type = (
|
|
313
|
+
self.api_client.select_header_content_type(
|
|
314
|
+
[
|
|
315
|
+
'application/json'
|
|
316
|
+
]
|
|
317
|
+
)
|
|
318
|
+
)
|
|
319
|
+
if _default_content_type is not None:
|
|
320
|
+
_header_params['Content-Type'] = _default_content_type
|
|
321
|
+
|
|
322
|
+
# authentication setting
|
|
323
|
+
_auth_settings: List[str] = [
|
|
324
|
+
'BearerAuth'
|
|
325
|
+
]
|
|
326
|
+
|
|
327
|
+
return self.api_client.param_serialize(
|
|
328
|
+
method='POST',
|
|
329
|
+
resource_path='/vps/create-snapshot',
|
|
330
|
+
path_params=_path_params,
|
|
331
|
+
query_params=_query_params,
|
|
332
|
+
header_params=_header_params,
|
|
333
|
+
body=_body_params,
|
|
334
|
+
post_params=_form_params,
|
|
335
|
+
files=_files,
|
|
336
|
+
auth_settings=_auth_settings,
|
|
337
|
+
collection_formats=_collection_formats,
|
|
338
|
+
_host=_host,
|
|
339
|
+
_request_auth=_request_auth
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
@validate_call
|
|
346
|
+
def delete_snapshot(
|
|
347
|
+
self,
|
|
348
|
+
delete_snapshot_request_content: DeleteSnapshotRequestContent,
|
|
349
|
+
_request_timeout: Union[
|
|
350
|
+
None,
|
|
351
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
352
|
+
Tuple[
|
|
353
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
354
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
355
|
+
]
|
|
356
|
+
] = None,
|
|
357
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
358
|
+
_content_type: Optional[StrictStr] = None,
|
|
359
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
360
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
361
|
+
) -> DeleteSnapshotResponseContent:
|
|
362
|
+
"""delete_snapshot
|
|
363
|
+
|
|
364
|
+
Deletes a specific snapshot from a VPS service
|
|
365
|
+
|
|
366
|
+
:param delete_snapshot_request_content: (required)
|
|
367
|
+
:type delete_snapshot_request_content: DeleteSnapshotRequestContent
|
|
368
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
369
|
+
number provided, it will be total request
|
|
370
|
+
timeout. It can also be a pair (tuple) of
|
|
371
|
+
(connection, read) timeouts.
|
|
372
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
373
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
374
|
+
request; this effectively ignores the
|
|
375
|
+
authentication in the spec for a single request.
|
|
376
|
+
:type _request_auth: dict, optional
|
|
377
|
+
:param _content_type: force content-type for the request.
|
|
378
|
+
:type _content_type: str, Optional
|
|
379
|
+
:param _headers: set to override the headers for a single
|
|
380
|
+
request; this effectively ignores the headers
|
|
381
|
+
in the spec for a single request.
|
|
382
|
+
:type _headers: dict, optional
|
|
383
|
+
:param _host_index: set to override the host_index for a single
|
|
384
|
+
request; this effectively ignores the host_index
|
|
385
|
+
in the spec for a single request.
|
|
386
|
+
:type _host_index: int, optional
|
|
387
|
+
:return: Returns the result object.
|
|
388
|
+
""" # noqa: E501
|
|
389
|
+
|
|
390
|
+
_param = self._delete_snapshot_serialize(
|
|
391
|
+
delete_snapshot_request_content=delete_snapshot_request_content,
|
|
392
|
+
_request_auth=_request_auth,
|
|
393
|
+
_content_type=_content_type,
|
|
394
|
+
_headers=_headers,
|
|
395
|
+
_host_index=_host_index
|
|
396
|
+
)
|
|
397
|
+
|
|
398
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
399
|
+
'200': "DeleteSnapshotResponseContent",
|
|
400
|
+
'400': "BadRequestErrorResponseContent",
|
|
401
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
402
|
+
'403': "ForbiddenErrorResponseContent",
|
|
403
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
404
|
+
'422': "ValidationErrorResponseContent",
|
|
405
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
406
|
+
'500': "InternalServiceErrorResponseContent",
|
|
407
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
408
|
+
}
|
|
409
|
+
response_data = self.api_client.call_api(
|
|
410
|
+
*_param,
|
|
411
|
+
_request_timeout=_request_timeout
|
|
412
|
+
)
|
|
413
|
+
response_data.read()
|
|
414
|
+
return self.api_client.response_deserialize(
|
|
415
|
+
response_data=response_data,
|
|
416
|
+
response_types_map=_response_types_map,
|
|
417
|
+
).data
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
@validate_call
|
|
421
|
+
def delete_snapshot_with_http_info(
|
|
422
|
+
self,
|
|
423
|
+
delete_snapshot_request_content: DeleteSnapshotRequestContent,
|
|
424
|
+
_request_timeout: Union[
|
|
425
|
+
None,
|
|
426
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
427
|
+
Tuple[
|
|
428
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
429
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
430
|
+
]
|
|
431
|
+
] = None,
|
|
432
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
433
|
+
_content_type: Optional[StrictStr] = None,
|
|
434
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
435
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
436
|
+
) -> ApiResponse[DeleteSnapshotResponseContent]:
|
|
437
|
+
"""delete_snapshot
|
|
438
|
+
|
|
439
|
+
Deletes a specific snapshot from a VPS service
|
|
440
|
+
|
|
441
|
+
:param delete_snapshot_request_content: (required)
|
|
442
|
+
:type delete_snapshot_request_content: DeleteSnapshotRequestContent
|
|
443
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
444
|
+
number provided, it will be total request
|
|
445
|
+
timeout. It can also be a pair (tuple) of
|
|
446
|
+
(connection, read) timeouts.
|
|
447
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
448
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
449
|
+
request; this effectively ignores the
|
|
450
|
+
authentication in the spec for a single request.
|
|
451
|
+
:type _request_auth: dict, optional
|
|
452
|
+
:param _content_type: force content-type for the request.
|
|
453
|
+
:type _content_type: str, Optional
|
|
454
|
+
:param _headers: set to override the headers for a single
|
|
455
|
+
request; this effectively ignores the headers
|
|
456
|
+
in the spec for a single request.
|
|
457
|
+
:type _headers: dict, optional
|
|
458
|
+
:param _host_index: set to override the host_index for a single
|
|
459
|
+
request; this effectively ignores the host_index
|
|
460
|
+
in the spec for a single request.
|
|
461
|
+
:type _host_index: int, optional
|
|
462
|
+
:return: Returns the result object.
|
|
463
|
+
""" # noqa: E501
|
|
464
|
+
|
|
465
|
+
_param = self._delete_snapshot_serialize(
|
|
466
|
+
delete_snapshot_request_content=delete_snapshot_request_content,
|
|
467
|
+
_request_auth=_request_auth,
|
|
468
|
+
_content_type=_content_type,
|
|
469
|
+
_headers=_headers,
|
|
470
|
+
_host_index=_host_index
|
|
471
|
+
)
|
|
472
|
+
|
|
473
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
474
|
+
'200': "DeleteSnapshotResponseContent",
|
|
475
|
+
'400': "BadRequestErrorResponseContent",
|
|
476
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
477
|
+
'403': "ForbiddenErrorResponseContent",
|
|
478
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
479
|
+
'422': "ValidationErrorResponseContent",
|
|
480
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
481
|
+
'500': "InternalServiceErrorResponseContent",
|
|
482
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
483
|
+
}
|
|
484
|
+
response_data = self.api_client.call_api(
|
|
485
|
+
*_param,
|
|
486
|
+
_request_timeout=_request_timeout
|
|
487
|
+
)
|
|
488
|
+
response_data.read()
|
|
489
|
+
return self.api_client.response_deserialize(
|
|
490
|
+
response_data=response_data,
|
|
491
|
+
response_types_map=_response_types_map,
|
|
492
|
+
)
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
@validate_call
|
|
496
|
+
def delete_snapshot_without_preload_content(
|
|
497
|
+
self,
|
|
498
|
+
delete_snapshot_request_content: DeleteSnapshotRequestContent,
|
|
499
|
+
_request_timeout: Union[
|
|
500
|
+
None,
|
|
501
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
502
|
+
Tuple[
|
|
503
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
504
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
505
|
+
]
|
|
506
|
+
] = None,
|
|
507
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
508
|
+
_content_type: Optional[StrictStr] = None,
|
|
509
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
510
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
511
|
+
) -> RESTResponseType:
|
|
512
|
+
"""delete_snapshot
|
|
513
|
+
|
|
514
|
+
Deletes a specific snapshot from a VPS service
|
|
515
|
+
|
|
516
|
+
:param delete_snapshot_request_content: (required)
|
|
517
|
+
:type delete_snapshot_request_content: DeleteSnapshotRequestContent
|
|
518
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
519
|
+
number provided, it will be total request
|
|
520
|
+
timeout. It can also be a pair (tuple) of
|
|
521
|
+
(connection, read) timeouts.
|
|
522
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
523
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
524
|
+
request; this effectively ignores the
|
|
525
|
+
authentication in the spec for a single request.
|
|
526
|
+
:type _request_auth: dict, optional
|
|
527
|
+
:param _content_type: force content-type for the request.
|
|
528
|
+
:type _content_type: str, Optional
|
|
529
|
+
:param _headers: set to override the headers for a single
|
|
530
|
+
request; this effectively ignores the headers
|
|
531
|
+
in the spec for a single request.
|
|
532
|
+
:type _headers: dict, optional
|
|
533
|
+
:param _host_index: set to override the host_index for a single
|
|
534
|
+
request; this effectively ignores the host_index
|
|
535
|
+
in the spec for a single request.
|
|
536
|
+
:type _host_index: int, optional
|
|
537
|
+
:return: Returns the result object.
|
|
538
|
+
""" # noqa: E501
|
|
539
|
+
|
|
540
|
+
_param = self._delete_snapshot_serialize(
|
|
541
|
+
delete_snapshot_request_content=delete_snapshot_request_content,
|
|
542
|
+
_request_auth=_request_auth,
|
|
543
|
+
_content_type=_content_type,
|
|
544
|
+
_headers=_headers,
|
|
545
|
+
_host_index=_host_index
|
|
546
|
+
)
|
|
547
|
+
|
|
548
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
549
|
+
'200': "DeleteSnapshotResponseContent",
|
|
550
|
+
'400': "BadRequestErrorResponseContent",
|
|
551
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
552
|
+
'403': "ForbiddenErrorResponseContent",
|
|
553
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
554
|
+
'422': "ValidationErrorResponseContent",
|
|
555
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
556
|
+
'500': "InternalServiceErrorResponseContent",
|
|
557
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
558
|
+
}
|
|
559
|
+
response_data = self.api_client.call_api(
|
|
560
|
+
*_param,
|
|
561
|
+
_request_timeout=_request_timeout
|
|
562
|
+
)
|
|
563
|
+
return response_data.response
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
def _delete_snapshot_serialize(
|
|
567
|
+
self,
|
|
568
|
+
delete_snapshot_request_content,
|
|
569
|
+
_request_auth,
|
|
570
|
+
_content_type,
|
|
571
|
+
_headers,
|
|
572
|
+
_host_index,
|
|
573
|
+
) -> RequestSerialized:
|
|
574
|
+
|
|
575
|
+
_host = None
|
|
576
|
+
|
|
577
|
+
_collection_formats: Dict[str, str] = {
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
_path_params: Dict[str, str] = {}
|
|
581
|
+
_query_params: List[Tuple[str, str]] = []
|
|
582
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
583
|
+
_form_params: List[Tuple[str, str]] = []
|
|
584
|
+
_files: Dict[
|
|
585
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
586
|
+
] = {}
|
|
587
|
+
_body_params: Optional[bytes] = None
|
|
588
|
+
|
|
589
|
+
# process the path parameters
|
|
590
|
+
# process the query parameters
|
|
591
|
+
# process the header parameters
|
|
592
|
+
# process the form parameters
|
|
593
|
+
# process the body parameter
|
|
594
|
+
if delete_snapshot_request_content is not None:
|
|
595
|
+
_body_params = delete_snapshot_request_content
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
# set the HTTP header `Accept`
|
|
599
|
+
if 'Accept' not in _header_params:
|
|
600
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
601
|
+
[
|
|
602
|
+
'application/json'
|
|
603
|
+
]
|
|
604
|
+
)
|
|
605
|
+
|
|
606
|
+
# set the HTTP header `Content-Type`
|
|
607
|
+
if _content_type:
|
|
608
|
+
_header_params['Content-Type'] = _content_type
|
|
609
|
+
else:
|
|
610
|
+
_default_content_type = (
|
|
611
|
+
self.api_client.select_header_content_type(
|
|
612
|
+
[
|
|
613
|
+
'application/json'
|
|
614
|
+
]
|
|
615
|
+
)
|
|
616
|
+
)
|
|
617
|
+
if _default_content_type is not None:
|
|
618
|
+
_header_params['Content-Type'] = _default_content_type
|
|
619
|
+
|
|
620
|
+
# authentication setting
|
|
621
|
+
_auth_settings: List[str] = [
|
|
622
|
+
'BearerAuth'
|
|
623
|
+
]
|
|
624
|
+
|
|
625
|
+
return self.api_client.param_serialize(
|
|
626
|
+
method='POST',
|
|
627
|
+
resource_path='/vps/delete-snapshot',
|
|
628
|
+
path_params=_path_params,
|
|
629
|
+
query_params=_query_params,
|
|
630
|
+
header_params=_header_params,
|
|
631
|
+
body=_body_params,
|
|
632
|
+
post_params=_form_params,
|
|
633
|
+
files=_files,
|
|
634
|
+
auth_settings=_auth_settings,
|
|
635
|
+
collection_formats=_collection_formats,
|
|
636
|
+
_host=_host,
|
|
637
|
+
_request_auth=_request_auth
|
|
638
|
+
)
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
@validate_call
|
|
644
|
+
def list_snapshots(
|
|
645
|
+
self,
|
|
646
|
+
list_snapshots_request_content: ListSnapshotsRequestContent,
|
|
647
|
+
_request_timeout: Union[
|
|
648
|
+
None,
|
|
649
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
650
|
+
Tuple[
|
|
651
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
652
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
653
|
+
]
|
|
654
|
+
] = None,
|
|
655
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
656
|
+
_content_type: Optional[StrictStr] = None,
|
|
657
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
658
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
659
|
+
) -> ListSnapshotsResponseContent:
|
|
660
|
+
"""list_snapshots
|
|
661
|
+
|
|
662
|
+
Retrieves the list of snapshots for a VPS service
|
|
663
|
+
|
|
664
|
+
:param list_snapshots_request_content: (required)
|
|
665
|
+
:type list_snapshots_request_content: ListSnapshotsRequestContent
|
|
666
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
667
|
+
number provided, it will be total request
|
|
668
|
+
timeout. It can also be a pair (tuple) of
|
|
669
|
+
(connection, read) timeouts.
|
|
670
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
671
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
672
|
+
request; this effectively ignores the
|
|
673
|
+
authentication in the spec for a single request.
|
|
674
|
+
:type _request_auth: dict, optional
|
|
675
|
+
:param _content_type: force content-type for the request.
|
|
676
|
+
:type _content_type: str, Optional
|
|
677
|
+
:param _headers: set to override the headers for a single
|
|
678
|
+
request; this effectively ignores the headers
|
|
679
|
+
in the spec for a single request.
|
|
680
|
+
:type _headers: dict, optional
|
|
681
|
+
:param _host_index: set to override the host_index for a single
|
|
682
|
+
request; this effectively ignores the host_index
|
|
683
|
+
in the spec for a single request.
|
|
684
|
+
:type _host_index: int, optional
|
|
685
|
+
:return: Returns the result object.
|
|
686
|
+
""" # noqa: E501
|
|
687
|
+
|
|
688
|
+
_param = self._list_snapshots_serialize(
|
|
689
|
+
list_snapshots_request_content=list_snapshots_request_content,
|
|
690
|
+
_request_auth=_request_auth,
|
|
691
|
+
_content_type=_content_type,
|
|
692
|
+
_headers=_headers,
|
|
693
|
+
_host_index=_host_index
|
|
694
|
+
)
|
|
695
|
+
|
|
696
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
697
|
+
'200': "ListSnapshotsResponseContent",
|
|
698
|
+
'400': "BadRequestErrorResponseContent",
|
|
699
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
700
|
+
'403': "ForbiddenErrorResponseContent",
|
|
701
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
702
|
+
'422': "ValidationErrorResponseContent",
|
|
703
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
704
|
+
'500': "InternalServiceErrorResponseContent",
|
|
705
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
706
|
+
}
|
|
707
|
+
response_data = self.api_client.call_api(
|
|
708
|
+
*_param,
|
|
709
|
+
_request_timeout=_request_timeout
|
|
710
|
+
)
|
|
711
|
+
response_data.read()
|
|
712
|
+
return self.api_client.response_deserialize(
|
|
713
|
+
response_data=response_data,
|
|
714
|
+
response_types_map=_response_types_map,
|
|
715
|
+
).data
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
@validate_call
|
|
719
|
+
def list_snapshots_with_http_info(
|
|
720
|
+
self,
|
|
721
|
+
list_snapshots_request_content: ListSnapshotsRequestContent,
|
|
722
|
+
_request_timeout: Union[
|
|
723
|
+
None,
|
|
724
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
725
|
+
Tuple[
|
|
726
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
727
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
728
|
+
]
|
|
729
|
+
] = None,
|
|
730
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
731
|
+
_content_type: Optional[StrictStr] = None,
|
|
732
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
733
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
734
|
+
) -> ApiResponse[ListSnapshotsResponseContent]:
|
|
735
|
+
"""list_snapshots
|
|
736
|
+
|
|
737
|
+
Retrieves the list of snapshots for a VPS service
|
|
738
|
+
|
|
739
|
+
:param list_snapshots_request_content: (required)
|
|
740
|
+
:type list_snapshots_request_content: ListSnapshotsRequestContent
|
|
741
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
742
|
+
number provided, it will be total request
|
|
743
|
+
timeout. It can also be a pair (tuple) of
|
|
744
|
+
(connection, read) timeouts.
|
|
745
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
746
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
747
|
+
request; this effectively ignores the
|
|
748
|
+
authentication in the spec for a single request.
|
|
749
|
+
:type _request_auth: dict, optional
|
|
750
|
+
:param _content_type: force content-type for the request.
|
|
751
|
+
:type _content_type: str, Optional
|
|
752
|
+
:param _headers: set to override the headers for a single
|
|
753
|
+
request; this effectively ignores the headers
|
|
754
|
+
in the spec for a single request.
|
|
755
|
+
:type _headers: dict, optional
|
|
756
|
+
:param _host_index: set to override the host_index for a single
|
|
757
|
+
request; this effectively ignores the host_index
|
|
758
|
+
in the spec for a single request.
|
|
759
|
+
:type _host_index: int, optional
|
|
760
|
+
:return: Returns the result object.
|
|
761
|
+
""" # noqa: E501
|
|
762
|
+
|
|
763
|
+
_param = self._list_snapshots_serialize(
|
|
764
|
+
list_snapshots_request_content=list_snapshots_request_content,
|
|
765
|
+
_request_auth=_request_auth,
|
|
766
|
+
_content_type=_content_type,
|
|
767
|
+
_headers=_headers,
|
|
768
|
+
_host_index=_host_index
|
|
769
|
+
)
|
|
770
|
+
|
|
771
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
772
|
+
'200': "ListSnapshotsResponseContent",
|
|
773
|
+
'400': "BadRequestErrorResponseContent",
|
|
774
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
775
|
+
'403': "ForbiddenErrorResponseContent",
|
|
776
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
777
|
+
'422': "ValidationErrorResponseContent",
|
|
778
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
779
|
+
'500': "InternalServiceErrorResponseContent",
|
|
780
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
781
|
+
}
|
|
782
|
+
response_data = self.api_client.call_api(
|
|
783
|
+
*_param,
|
|
784
|
+
_request_timeout=_request_timeout
|
|
785
|
+
)
|
|
786
|
+
response_data.read()
|
|
787
|
+
return self.api_client.response_deserialize(
|
|
788
|
+
response_data=response_data,
|
|
789
|
+
response_types_map=_response_types_map,
|
|
790
|
+
)
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
@validate_call
|
|
794
|
+
def list_snapshots_without_preload_content(
|
|
795
|
+
self,
|
|
796
|
+
list_snapshots_request_content: ListSnapshotsRequestContent,
|
|
797
|
+
_request_timeout: Union[
|
|
798
|
+
None,
|
|
799
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
800
|
+
Tuple[
|
|
801
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
802
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
803
|
+
]
|
|
804
|
+
] = None,
|
|
805
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
806
|
+
_content_type: Optional[StrictStr] = None,
|
|
807
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
808
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
809
|
+
) -> RESTResponseType:
|
|
810
|
+
"""list_snapshots
|
|
811
|
+
|
|
812
|
+
Retrieves the list of snapshots for a VPS service
|
|
813
|
+
|
|
814
|
+
:param list_snapshots_request_content: (required)
|
|
815
|
+
:type list_snapshots_request_content: ListSnapshotsRequestContent
|
|
816
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
817
|
+
number provided, it will be total request
|
|
818
|
+
timeout. It can also be a pair (tuple) of
|
|
819
|
+
(connection, read) timeouts.
|
|
820
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
821
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
822
|
+
request; this effectively ignores the
|
|
823
|
+
authentication in the spec for a single request.
|
|
824
|
+
:type _request_auth: dict, optional
|
|
825
|
+
:param _content_type: force content-type for the request.
|
|
826
|
+
:type _content_type: str, Optional
|
|
827
|
+
:param _headers: set to override the headers for a single
|
|
828
|
+
request; this effectively ignores the headers
|
|
829
|
+
in the spec for a single request.
|
|
830
|
+
:type _headers: dict, optional
|
|
831
|
+
:param _host_index: set to override the host_index for a single
|
|
832
|
+
request; this effectively ignores the host_index
|
|
833
|
+
in the spec for a single request.
|
|
834
|
+
:type _host_index: int, optional
|
|
835
|
+
:return: Returns the result object.
|
|
836
|
+
""" # noqa: E501
|
|
837
|
+
|
|
838
|
+
_param = self._list_snapshots_serialize(
|
|
839
|
+
list_snapshots_request_content=list_snapshots_request_content,
|
|
840
|
+
_request_auth=_request_auth,
|
|
841
|
+
_content_type=_content_type,
|
|
842
|
+
_headers=_headers,
|
|
843
|
+
_host_index=_host_index
|
|
844
|
+
)
|
|
845
|
+
|
|
846
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
847
|
+
'200': "ListSnapshotsResponseContent",
|
|
848
|
+
'400': "BadRequestErrorResponseContent",
|
|
849
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
850
|
+
'403': "ForbiddenErrorResponseContent",
|
|
851
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
852
|
+
'422': "ValidationErrorResponseContent",
|
|
853
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
854
|
+
'500': "InternalServiceErrorResponseContent",
|
|
855
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
856
|
+
}
|
|
857
|
+
response_data = self.api_client.call_api(
|
|
858
|
+
*_param,
|
|
859
|
+
_request_timeout=_request_timeout
|
|
860
|
+
)
|
|
861
|
+
return response_data.response
|
|
862
|
+
|
|
863
|
+
|
|
864
|
+
def _list_snapshots_serialize(
|
|
865
|
+
self,
|
|
866
|
+
list_snapshots_request_content,
|
|
867
|
+
_request_auth,
|
|
868
|
+
_content_type,
|
|
869
|
+
_headers,
|
|
870
|
+
_host_index,
|
|
871
|
+
) -> RequestSerialized:
|
|
872
|
+
|
|
873
|
+
_host = None
|
|
874
|
+
|
|
875
|
+
_collection_formats: Dict[str, str] = {
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
_path_params: Dict[str, str] = {}
|
|
879
|
+
_query_params: List[Tuple[str, str]] = []
|
|
880
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
881
|
+
_form_params: List[Tuple[str, str]] = []
|
|
882
|
+
_files: Dict[
|
|
883
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
884
|
+
] = {}
|
|
885
|
+
_body_params: Optional[bytes] = None
|
|
886
|
+
|
|
887
|
+
# process the path parameters
|
|
888
|
+
# process the query parameters
|
|
889
|
+
# process the header parameters
|
|
890
|
+
# process the form parameters
|
|
891
|
+
# process the body parameter
|
|
892
|
+
if list_snapshots_request_content is not None:
|
|
893
|
+
_body_params = list_snapshots_request_content
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
# set the HTTP header `Accept`
|
|
897
|
+
if 'Accept' not in _header_params:
|
|
898
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
899
|
+
[
|
|
900
|
+
'application/json'
|
|
901
|
+
]
|
|
902
|
+
)
|
|
903
|
+
|
|
904
|
+
# set the HTTP header `Content-Type`
|
|
905
|
+
if _content_type:
|
|
906
|
+
_header_params['Content-Type'] = _content_type
|
|
907
|
+
else:
|
|
908
|
+
_default_content_type = (
|
|
909
|
+
self.api_client.select_header_content_type(
|
|
910
|
+
[
|
|
911
|
+
'application/json'
|
|
912
|
+
]
|
|
913
|
+
)
|
|
914
|
+
)
|
|
915
|
+
if _default_content_type is not None:
|
|
916
|
+
_header_params['Content-Type'] = _default_content_type
|
|
917
|
+
|
|
918
|
+
# authentication setting
|
|
919
|
+
_auth_settings: List[str] = [
|
|
920
|
+
'BearerAuth'
|
|
921
|
+
]
|
|
922
|
+
|
|
923
|
+
return self.api_client.param_serialize(
|
|
924
|
+
method='POST',
|
|
925
|
+
resource_path='/vps/list-snapshots',
|
|
926
|
+
path_params=_path_params,
|
|
927
|
+
query_params=_query_params,
|
|
928
|
+
header_params=_header_params,
|
|
929
|
+
body=_body_params,
|
|
930
|
+
post_params=_form_params,
|
|
931
|
+
files=_files,
|
|
932
|
+
auth_settings=_auth_settings,
|
|
933
|
+
collection_formats=_collection_formats,
|
|
934
|
+
_host=_host,
|
|
935
|
+
_request_auth=_request_auth
|
|
936
|
+
)
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
@validate_call
|
|
942
|
+
def rollback_snapshot(
|
|
943
|
+
self,
|
|
944
|
+
rollback_snapshot_request_content: RollbackSnapshotRequestContent,
|
|
945
|
+
_request_timeout: Union[
|
|
946
|
+
None,
|
|
947
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
948
|
+
Tuple[
|
|
949
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
950
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
951
|
+
]
|
|
952
|
+
] = None,
|
|
953
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
954
|
+
_content_type: Optional[StrictStr] = None,
|
|
955
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
956
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
957
|
+
) -> RollbackSnapshotResponseContent:
|
|
958
|
+
"""rollback_snapshot
|
|
959
|
+
|
|
960
|
+
[Under development] Rolls back a VPS to a previous snapshot state
|
|
961
|
+
|
|
962
|
+
:param rollback_snapshot_request_content: (required)
|
|
963
|
+
:type rollback_snapshot_request_content: RollbackSnapshotRequestContent
|
|
964
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
965
|
+
number provided, it will be total request
|
|
966
|
+
timeout. It can also be a pair (tuple) of
|
|
967
|
+
(connection, read) timeouts.
|
|
968
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
969
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
970
|
+
request; this effectively ignores the
|
|
971
|
+
authentication in the spec for a single request.
|
|
972
|
+
:type _request_auth: dict, optional
|
|
973
|
+
:param _content_type: force content-type for the request.
|
|
974
|
+
:type _content_type: str, Optional
|
|
975
|
+
:param _headers: set to override the headers for a single
|
|
976
|
+
request; this effectively ignores the headers
|
|
977
|
+
in the spec for a single request.
|
|
978
|
+
:type _headers: dict, optional
|
|
979
|
+
:param _host_index: set to override the host_index for a single
|
|
980
|
+
request; this effectively ignores the host_index
|
|
981
|
+
in the spec for a single request.
|
|
982
|
+
:type _host_index: int, optional
|
|
983
|
+
:return: Returns the result object.
|
|
984
|
+
""" # noqa: E501
|
|
985
|
+
|
|
986
|
+
_param = self._rollback_snapshot_serialize(
|
|
987
|
+
rollback_snapshot_request_content=rollback_snapshot_request_content,
|
|
988
|
+
_request_auth=_request_auth,
|
|
989
|
+
_content_type=_content_type,
|
|
990
|
+
_headers=_headers,
|
|
991
|
+
_host_index=_host_index
|
|
992
|
+
)
|
|
993
|
+
|
|
994
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
995
|
+
'200': "RollbackSnapshotResponseContent",
|
|
996
|
+
'400': "BadRequestErrorResponseContent",
|
|
997
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
998
|
+
'403': "ForbiddenErrorResponseContent",
|
|
999
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
1000
|
+
'422': "ValidationErrorResponseContent",
|
|
1001
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
1002
|
+
'500': "InternalServiceErrorResponseContent",
|
|
1003
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
1004
|
+
}
|
|
1005
|
+
response_data = self.api_client.call_api(
|
|
1006
|
+
*_param,
|
|
1007
|
+
_request_timeout=_request_timeout
|
|
1008
|
+
)
|
|
1009
|
+
response_data.read()
|
|
1010
|
+
return self.api_client.response_deserialize(
|
|
1011
|
+
response_data=response_data,
|
|
1012
|
+
response_types_map=_response_types_map,
|
|
1013
|
+
).data
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
@validate_call
|
|
1017
|
+
def rollback_snapshot_with_http_info(
|
|
1018
|
+
self,
|
|
1019
|
+
rollback_snapshot_request_content: RollbackSnapshotRequestContent,
|
|
1020
|
+
_request_timeout: Union[
|
|
1021
|
+
None,
|
|
1022
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1023
|
+
Tuple[
|
|
1024
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1025
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1026
|
+
]
|
|
1027
|
+
] = None,
|
|
1028
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1029
|
+
_content_type: Optional[StrictStr] = None,
|
|
1030
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1031
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1032
|
+
) -> ApiResponse[RollbackSnapshotResponseContent]:
|
|
1033
|
+
"""rollback_snapshot
|
|
1034
|
+
|
|
1035
|
+
[Under development] Rolls back a VPS to a previous snapshot state
|
|
1036
|
+
|
|
1037
|
+
:param rollback_snapshot_request_content: (required)
|
|
1038
|
+
:type rollback_snapshot_request_content: RollbackSnapshotRequestContent
|
|
1039
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1040
|
+
number provided, it will be total request
|
|
1041
|
+
timeout. It can also be a pair (tuple) of
|
|
1042
|
+
(connection, read) timeouts.
|
|
1043
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1044
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1045
|
+
request; this effectively ignores the
|
|
1046
|
+
authentication in the spec for a single request.
|
|
1047
|
+
:type _request_auth: dict, optional
|
|
1048
|
+
:param _content_type: force content-type for the request.
|
|
1049
|
+
:type _content_type: str, Optional
|
|
1050
|
+
:param _headers: set to override the headers for a single
|
|
1051
|
+
request; this effectively ignores the headers
|
|
1052
|
+
in the spec for a single request.
|
|
1053
|
+
:type _headers: dict, optional
|
|
1054
|
+
:param _host_index: set to override the host_index for a single
|
|
1055
|
+
request; this effectively ignores the host_index
|
|
1056
|
+
in the spec for a single request.
|
|
1057
|
+
:type _host_index: int, optional
|
|
1058
|
+
:return: Returns the result object.
|
|
1059
|
+
""" # noqa: E501
|
|
1060
|
+
|
|
1061
|
+
_param = self._rollback_snapshot_serialize(
|
|
1062
|
+
rollback_snapshot_request_content=rollback_snapshot_request_content,
|
|
1063
|
+
_request_auth=_request_auth,
|
|
1064
|
+
_content_type=_content_type,
|
|
1065
|
+
_headers=_headers,
|
|
1066
|
+
_host_index=_host_index
|
|
1067
|
+
)
|
|
1068
|
+
|
|
1069
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1070
|
+
'200': "RollbackSnapshotResponseContent",
|
|
1071
|
+
'400': "BadRequestErrorResponseContent",
|
|
1072
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
1073
|
+
'403': "ForbiddenErrorResponseContent",
|
|
1074
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
1075
|
+
'422': "ValidationErrorResponseContent",
|
|
1076
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
1077
|
+
'500': "InternalServiceErrorResponseContent",
|
|
1078
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
1079
|
+
}
|
|
1080
|
+
response_data = self.api_client.call_api(
|
|
1081
|
+
*_param,
|
|
1082
|
+
_request_timeout=_request_timeout
|
|
1083
|
+
)
|
|
1084
|
+
response_data.read()
|
|
1085
|
+
return self.api_client.response_deserialize(
|
|
1086
|
+
response_data=response_data,
|
|
1087
|
+
response_types_map=_response_types_map,
|
|
1088
|
+
)
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
@validate_call
|
|
1092
|
+
def rollback_snapshot_without_preload_content(
|
|
1093
|
+
self,
|
|
1094
|
+
rollback_snapshot_request_content: RollbackSnapshotRequestContent,
|
|
1095
|
+
_request_timeout: Union[
|
|
1096
|
+
None,
|
|
1097
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1098
|
+
Tuple[
|
|
1099
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1100
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1101
|
+
]
|
|
1102
|
+
] = None,
|
|
1103
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1104
|
+
_content_type: Optional[StrictStr] = None,
|
|
1105
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1106
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1107
|
+
) -> RESTResponseType:
|
|
1108
|
+
"""rollback_snapshot
|
|
1109
|
+
|
|
1110
|
+
[Under development] Rolls back a VPS to a previous snapshot state
|
|
1111
|
+
|
|
1112
|
+
:param rollback_snapshot_request_content: (required)
|
|
1113
|
+
:type rollback_snapshot_request_content: RollbackSnapshotRequestContent
|
|
1114
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1115
|
+
number provided, it will be total request
|
|
1116
|
+
timeout. It can also be a pair (tuple) of
|
|
1117
|
+
(connection, read) timeouts.
|
|
1118
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1119
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1120
|
+
request; this effectively ignores the
|
|
1121
|
+
authentication in the spec for a single request.
|
|
1122
|
+
:type _request_auth: dict, optional
|
|
1123
|
+
:param _content_type: force content-type for the request.
|
|
1124
|
+
:type _content_type: str, Optional
|
|
1125
|
+
:param _headers: set to override the headers for a single
|
|
1126
|
+
request; this effectively ignores the headers
|
|
1127
|
+
in the spec for a single request.
|
|
1128
|
+
:type _headers: dict, optional
|
|
1129
|
+
:param _host_index: set to override the host_index for a single
|
|
1130
|
+
request; this effectively ignores the host_index
|
|
1131
|
+
in the spec for a single request.
|
|
1132
|
+
:type _host_index: int, optional
|
|
1133
|
+
:return: Returns the result object.
|
|
1134
|
+
""" # noqa: E501
|
|
1135
|
+
|
|
1136
|
+
_param = self._rollback_snapshot_serialize(
|
|
1137
|
+
rollback_snapshot_request_content=rollback_snapshot_request_content,
|
|
1138
|
+
_request_auth=_request_auth,
|
|
1139
|
+
_content_type=_content_type,
|
|
1140
|
+
_headers=_headers,
|
|
1141
|
+
_host_index=_host_index
|
|
1142
|
+
)
|
|
1143
|
+
|
|
1144
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1145
|
+
'200': "RollbackSnapshotResponseContent",
|
|
1146
|
+
'400': "BadRequestErrorResponseContent",
|
|
1147
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
1148
|
+
'403': "ForbiddenErrorResponseContent",
|
|
1149
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
1150
|
+
'422': "ValidationErrorResponseContent",
|
|
1151
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
1152
|
+
'500': "InternalServiceErrorResponseContent",
|
|
1153
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
1154
|
+
}
|
|
1155
|
+
response_data = self.api_client.call_api(
|
|
1156
|
+
*_param,
|
|
1157
|
+
_request_timeout=_request_timeout
|
|
1158
|
+
)
|
|
1159
|
+
return response_data.response
|
|
1160
|
+
|
|
1161
|
+
|
|
1162
|
+
def _rollback_snapshot_serialize(
|
|
1163
|
+
self,
|
|
1164
|
+
rollback_snapshot_request_content,
|
|
1165
|
+
_request_auth,
|
|
1166
|
+
_content_type,
|
|
1167
|
+
_headers,
|
|
1168
|
+
_host_index,
|
|
1169
|
+
) -> RequestSerialized:
|
|
1170
|
+
|
|
1171
|
+
_host = None
|
|
1172
|
+
|
|
1173
|
+
_collection_formats: Dict[str, str] = {
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
_path_params: Dict[str, str] = {}
|
|
1177
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1178
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1179
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1180
|
+
_files: Dict[
|
|
1181
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1182
|
+
] = {}
|
|
1183
|
+
_body_params: Optional[bytes] = None
|
|
1184
|
+
|
|
1185
|
+
# process the path parameters
|
|
1186
|
+
# process the query parameters
|
|
1187
|
+
# process the header parameters
|
|
1188
|
+
# process the form parameters
|
|
1189
|
+
# process the body parameter
|
|
1190
|
+
if rollback_snapshot_request_content is not None:
|
|
1191
|
+
_body_params = rollback_snapshot_request_content
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
# set the HTTP header `Accept`
|
|
1195
|
+
if 'Accept' not in _header_params:
|
|
1196
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1197
|
+
[
|
|
1198
|
+
'application/json'
|
|
1199
|
+
]
|
|
1200
|
+
)
|
|
1201
|
+
|
|
1202
|
+
# set the HTTP header `Content-Type`
|
|
1203
|
+
if _content_type:
|
|
1204
|
+
_header_params['Content-Type'] = _content_type
|
|
1205
|
+
else:
|
|
1206
|
+
_default_content_type = (
|
|
1207
|
+
self.api_client.select_header_content_type(
|
|
1208
|
+
[
|
|
1209
|
+
'application/json'
|
|
1210
|
+
]
|
|
1211
|
+
)
|
|
1212
|
+
)
|
|
1213
|
+
if _default_content_type is not None:
|
|
1214
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1215
|
+
|
|
1216
|
+
# authentication setting
|
|
1217
|
+
_auth_settings: List[str] = [
|
|
1218
|
+
'BearerAuth'
|
|
1219
|
+
]
|
|
1220
|
+
|
|
1221
|
+
return self.api_client.param_serialize(
|
|
1222
|
+
method='POST',
|
|
1223
|
+
resource_path='/vps/rollback-snapshot',
|
|
1224
|
+
path_params=_path_params,
|
|
1225
|
+
query_params=_query_params,
|
|
1226
|
+
header_params=_header_params,
|
|
1227
|
+
body=_body_params,
|
|
1228
|
+
post_params=_form_params,
|
|
1229
|
+
files=_files,
|
|
1230
|
+
auth_settings=_auth_settings,
|
|
1231
|
+
collection_formats=_collection_formats,
|
|
1232
|
+
_host=_host,
|
|
1233
|
+
_request_auth=_request_auth
|
|
1234
|
+
)
|
|
1235
|
+
|
|
1236
|
+
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
@validate_call
|
|
1240
|
+
def update_snapshot(
|
|
1241
|
+
self,
|
|
1242
|
+
update_snapshot_request_content: UpdateSnapshotRequestContent,
|
|
1243
|
+
_request_timeout: Union[
|
|
1244
|
+
None,
|
|
1245
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1246
|
+
Tuple[
|
|
1247
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1248
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1249
|
+
]
|
|
1250
|
+
] = None,
|
|
1251
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1252
|
+
_content_type: Optional[StrictStr] = None,
|
|
1253
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1254
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1255
|
+
) -> UpdateSnapshotResponseContent:
|
|
1256
|
+
"""update_snapshot
|
|
1257
|
+
|
|
1258
|
+
Updates a snapshot's metadata
|
|
1259
|
+
|
|
1260
|
+
:param update_snapshot_request_content: (required)
|
|
1261
|
+
:type update_snapshot_request_content: UpdateSnapshotRequestContent
|
|
1262
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1263
|
+
number provided, it will be total request
|
|
1264
|
+
timeout. It can also be a pair (tuple) of
|
|
1265
|
+
(connection, read) timeouts.
|
|
1266
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1267
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1268
|
+
request; this effectively ignores the
|
|
1269
|
+
authentication in the spec for a single request.
|
|
1270
|
+
:type _request_auth: dict, optional
|
|
1271
|
+
:param _content_type: force content-type for the request.
|
|
1272
|
+
:type _content_type: str, Optional
|
|
1273
|
+
:param _headers: set to override the headers for a single
|
|
1274
|
+
request; this effectively ignores the headers
|
|
1275
|
+
in the spec for a single request.
|
|
1276
|
+
:type _headers: dict, optional
|
|
1277
|
+
:param _host_index: set to override the host_index for a single
|
|
1278
|
+
request; this effectively ignores the host_index
|
|
1279
|
+
in the spec for a single request.
|
|
1280
|
+
:type _host_index: int, optional
|
|
1281
|
+
:return: Returns the result object.
|
|
1282
|
+
""" # noqa: E501
|
|
1283
|
+
|
|
1284
|
+
_param = self._update_snapshot_serialize(
|
|
1285
|
+
update_snapshot_request_content=update_snapshot_request_content,
|
|
1286
|
+
_request_auth=_request_auth,
|
|
1287
|
+
_content_type=_content_type,
|
|
1288
|
+
_headers=_headers,
|
|
1289
|
+
_host_index=_host_index
|
|
1290
|
+
)
|
|
1291
|
+
|
|
1292
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1293
|
+
'200': "UpdateSnapshotResponseContent",
|
|
1294
|
+
'400': "BadRequestErrorResponseContent",
|
|
1295
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
1296
|
+
'403': "ForbiddenErrorResponseContent",
|
|
1297
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
1298
|
+
'422': "ValidationErrorResponseContent",
|
|
1299
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
1300
|
+
'500': "InternalServiceErrorResponseContent",
|
|
1301
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
1302
|
+
}
|
|
1303
|
+
response_data = self.api_client.call_api(
|
|
1304
|
+
*_param,
|
|
1305
|
+
_request_timeout=_request_timeout
|
|
1306
|
+
)
|
|
1307
|
+
response_data.read()
|
|
1308
|
+
return self.api_client.response_deserialize(
|
|
1309
|
+
response_data=response_data,
|
|
1310
|
+
response_types_map=_response_types_map,
|
|
1311
|
+
).data
|
|
1312
|
+
|
|
1313
|
+
|
|
1314
|
+
@validate_call
|
|
1315
|
+
def update_snapshot_with_http_info(
|
|
1316
|
+
self,
|
|
1317
|
+
update_snapshot_request_content: UpdateSnapshotRequestContent,
|
|
1318
|
+
_request_timeout: Union[
|
|
1319
|
+
None,
|
|
1320
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1321
|
+
Tuple[
|
|
1322
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1323
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1324
|
+
]
|
|
1325
|
+
] = None,
|
|
1326
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1327
|
+
_content_type: Optional[StrictStr] = None,
|
|
1328
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1329
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1330
|
+
) -> ApiResponse[UpdateSnapshotResponseContent]:
|
|
1331
|
+
"""update_snapshot
|
|
1332
|
+
|
|
1333
|
+
Updates a snapshot's metadata
|
|
1334
|
+
|
|
1335
|
+
:param update_snapshot_request_content: (required)
|
|
1336
|
+
:type update_snapshot_request_content: UpdateSnapshotRequestContent
|
|
1337
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1338
|
+
number provided, it will be total request
|
|
1339
|
+
timeout. It can also be a pair (tuple) of
|
|
1340
|
+
(connection, read) timeouts.
|
|
1341
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1342
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1343
|
+
request; this effectively ignores the
|
|
1344
|
+
authentication in the spec for a single request.
|
|
1345
|
+
:type _request_auth: dict, optional
|
|
1346
|
+
:param _content_type: force content-type for the request.
|
|
1347
|
+
:type _content_type: str, Optional
|
|
1348
|
+
:param _headers: set to override the headers for a single
|
|
1349
|
+
request; this effectively ignores the headers
|
|
1350
|
+
in the spec for a single request.
|
|
1351
|
+
:type _headers: dict, optional
|
|
1352
|
+
:param _host_index: set to override the host_index for a single
|
|
1353
|
+
request; this effectively ignores the host_index
|
|
1354
|
+
in the spec for a single request.
|
|
1355
|
+
:type _host_index: int, optional
|
|
1356
|
+
:return: Returns the result object.
|
|
1357
|
+
""" # noqa: E501
|
|
1358
|
+
|
|
1359
|
+
_param = self._update_snapshot_serialize(
|
|
1360
|
+
update_snapshot_request_content=update_snapshot_request_content,
|
|
1361
|
+
_request_auth=_request_auth,
|
|
1362
|
+
_content_type=_content_type,
|
|
1363
|
+
_headers=_headers,
|
|
1364
|
+
_host_index=_host_index
|
|
1365
|
+
)
|
|
1366
|
+
|
|
1367
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1368
|
+
'200': "UpdateSnapshotResponseContent",
|
|
1369
|
+
'400': "BadRequestErrorResponseContent",
|
|
1370
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
1371
|
+
'403': "ForbiddenErrorResponseContent",
|
|
1372
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
1373
|
+
'422': "ValidationErrorResponseContent",
|
|
1374
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
1375
|
+
'500': "InternalServiceErrorResponseContent",
|
|
1376
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
1377
|
+
}
|
|
1378
|
+
response_data = self.api_client.call_api(
|
|
1379
|
+
*_param,
|
|
1380
|
+
_request_timeout=_request_timeout
|
|
1381
|
+
)
|
|
1382
|
+
response_data.read()
|
|
1383
|
+
return self.api_client.response_deserialize(
|
|
1384
|
+
response_data=response_data,
|
|
1385
|
+
response_types_map=_response_types_map,
|
|
1386
|
+
)
|
|
1387
|
+
|
|
1388
|
+
|
|
1389
|
+
@validate_call
|
|
1390
|
+
def update_snapshot_without_preload_content(
|
|
1391
|
+
self,
|
|
1392
|
+
update_snapshot_request_content: UpdateSnapshotRequestContent,
|
|
1393
|
+
_request_timeout: Union[
|
|
1394
|
+
None,
|
|
1395
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1396
|
+
Tuple[
|
|
1397
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1398
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1399
|
+
]
|
|
1400
|
+
] = None,
|
|
1401
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1402
|
+
_content_type: Optional[StrictStr] = None,
|
|
1403
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1404
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1405
|
+
) -> RESTResponseType:
|
|
1406
|
+
"""update_snapshot
|
|
1407
|
+
|
|
1408
|
+
Updates a snapshot's metadata
|
|
1409
|
+
|
|
1410
|
+
:param update_snapshot_request_content: (required)
|
|
1411
|
+
:type update_snapshot_request_content: UpdateSnapshotRequestContent
|
|
1412
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1413
|
+
number provided, it will be total request
|
|
1414
|
+
timeout. It can also be a pair (tuple) of
|
|
1415
|
+
(connection, read) timeouts.
|
|
1416
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1417
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1418
|
+
request; this effectively ignores the
|
|
1419
|
+
authentication in the spec for a single request.
|
|
1420
|
+
:type _request_auth: dict, optional
|
|
1421
|
+
:param _content_type: force content-type for the request.
|
|
1422
|
+
:type _content_type: str, Optional
|
|
1423
|
+
:param _headers: set to override the headers for a single
|
|
1424
|
+
request; this effectively ignores the headers
|
|
1425
|
+
in the spec for a single request.
|
|
1426
|
+
:type _headers: dict, optional
|
|
1427
|
+
:param _host_index: set to override the host_index for a single
|
|
1428
|
+
request; this effectively ignores the host_index
|
|
1429
|
+
in the spec for a single request.
|
|
1430
|
+
:type _host_index: int, optional
|
|
1431
|
+
:return: Returns the result object.
|
|
1432
|
+
""" # noqa: E501
|
|
1433
|
+
|
|
1434
|
+
_param = self._update_snapshot_serialize(
|
|
1435
|
+
update_snapshot_request_content=update_snapshot_request_content,
|
|
1436
|
+
_request_auth=_request_auth,
|
|
1437
|
+
_content_type=_content_type,
|
|
1438
|
+
_headers=_headers,
|
|
1439
|
+
_host_index=_host_index
|
|
1440
|
+
)
|
|
1441
|
+
|
|
1442
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1443
|
+
'200': "UpdateSnapshotResponseContent",
|
|
1444
|
+
'400': "BadRequestErrorResponseContent",
|
|
1445
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
1446
|
+
'403': "ForbiddenErrorResponseContent",
|
|
1447
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
1448
|
+
'422': "ValidationErrorResponseContent",
|
|
1449
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
1450
|
+
'500': "InternalServiceErrorResponseContent",
|
|
1451
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
1452
|
+
}
|
|
1453
|
+
response_data = self.api_client.call_api(
|
|
1454
|
+
*_param,
|
|
1455
|
+
_request_timeout=_request_timeout
|
|
1456
|
+
)
|
|
1457
|
+
return response_data.response
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
def _update_snapshot_serialize(
|
|
1461
|
+
self,
|
|
1462
|
+
update_snapshot_request_content,
|
|
1463
|
+
_request_auth,
|
|
1464
|
+
_content_type,
|
|
1465
|
+
_headers,
|
|
1466
|
+
_host_index,
|
|
1467
|
+
) -> RequestSerialized:
|
|
1468
|
+
|
|
1469
|
+
_host = None
|
|
1470
|
+
|
|
1471
|
+
_collection_formats: Dict[str, str] = {
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
_path_params: Dict[str, str] = {}
|
|
1475
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1476
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1477
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1478
|
+
_files: Dict[
|
|
1479
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1480
|
+
] = {}
|
|
1481
|
+
_body_params: Optional[bytes] = None
|
|
1482
|
+
|
|
1483
|
+
# process the path parameters
|
|
1484
|
+
# process the query parameters
|
|
1485
|
+
# process the header parameters
|
|
1486
|
+
# process the form parameters
|
|
1487
|
+
# process the body parameter
|
|
1488
|
+
if update_snapshot_request_content is not None:
|
|
1489
|
+
_body_params = update_snapshot_request_content
|
|
1490
|
+
|
|
1491
|
+
|
|
1492
|
+
# set the HTTP header `Accept`
|
|
1493
|
+
if 'Accept' not in _header_params:
|
|
1494
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1495
|
+
[
|
|
1496
|
+
'application/json'
|
|
1497
|
+
]
|
|
1498
|
+
)
|
|
1499
|
+
|
|
1500
|
+
# set the HTTP header `Content-Type`
|
|
1501
|
+
if _content_type:
|
|
1502
|
+
_header_params['Content-Type'] = _content_type
|
|
1503
|
+
else:
|
|
1504
|
+
_default_content_type = (
|
|
1505
|
+
self.api_client.select_header_content_type(
|
|
1506
|
+
[
|
|
1507
|
+
'application/json'
|
|
1508
|
+
]
|
|
1509
|
+
)
|
|
1510
|
+
)
|
|
1511
|
+
if _default_content_type is not None:
|
|
1512
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1513
|
+
|
|
1514
|
+
# authentication setting
|
|
1515
|
+
_auth_settings: List[str] = [
|
|
1516
|
+
'BearerAuth'
|
|
1517
|
+
]
|
|
1518
|
+
|
|
1519
|
+
return self.api_client.param_serialize(
|
|
1520
|
+
method='POST',
|
|
1521
|
+
resource_path='/vps/update-snapshot',
|
|
1522
|
+
path_params=_path_params,
|
|
1523
|
+
query_params=_query_params,
|
|
1524
|
+
header_params=_header_params,
|
|
1525
|
+
body=_body_params,
|
|
1526
|
+
post_params=_form_params,
|
|
1527
|
+
files=_files,
|
|
1528
|
+
auth_settings=_auth_settings,
|
|
1529
|
+
collection_formats=_collection_formats,
|
|
1530
|
+
_host=_host,
|
|
1531
|
+
_request_auth=_request_auth
|
|
1532
|
+
)
|
|
1533
|
+
|
|
1534
|
+
|