cogbox_toolbox_api_client_async 0.190.1__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.
- cogbox_toolbox_api_client_async/__init__.py +386 -0
- cogbox_toolbox_api_client_async/api/__init__.py +46 -0
- cogbox_toolbox_api_client_async/api/computer_use_api.py +9075 -0
- cogbox_toolbox_api_client_async/api/file_system_api.py +3583 -0
- cogbox_toolbox_api_client_async/api/git_api.py +2969 -0
- cogbox_toolbox_api_client_async/api/info_api.py +773 -0
- cogbox_toolbox_api_client_async/api/interpreter_api.py +1075 -0
- cogbox_toolbox_api_client_async/api/lsp_api.py +1971 -0
- cogbox_toolbox_api_client_async/api/port_api.py +543 -0
- cogbox_toolbox_api_client_async/api/process_api.py +4865 -0
- cogbox_toolbox_api_client_async/api/server_api.py +298 -0
- cogbox_toolbox_api_client_async/api_client.py +812 -0
- cogbox_toolbox_api_client_async/api_response.py +21 -0
- cogbox_toolbox_api_client_async/configuration.py +624 -0
- cogbox_toolbox_api_client_async/exceptions.py +218 -0
- cogbox_toolbox_api_client_async/models/__init__.py +224 -0
- cogbox_toolbox_api_client_async/models/accessibility_bounds.py +108 -0
- cogbox_toolbox_api_client_async/models/accessibility_invoke_request.py +104 -0
- cogbox_toolbox_api_client_async/models/accessibility_node_request.py +102 -0
- cogbox_toolbox_api_client_async/models/accessibility_nodes_response.py +112 -0
- cogbox_toolbox_api_client_async/models/accessibility_set_value_request.py +104 -0
- cogbox_toolbox_api_client_async/models/accessibility_tree_response.py +108 -0
- cogbox_toolbox_api_client_async/models/chart.py +132 -0
- cogbox_toolbox_api_client_async/models/chart_element.py +134 -0
- cogbox_toolbox_api_client_async/models/code_run_artifacts.py +110 -0
- cogbox_toolbox_api_client_async/models/code_run_request.py +110 -0
- cogbox_toolbox_api_client_async/models/code_run_response.py +110 -0
- cogbox_toolbox_api_client_async/models/command.py +106 -0
- cogbox_toolbox_api_client_async/models/completion_context.py +104 -0
- cogbox_toolbox_api_client_async/models/completion_item.py +114 -0
- cogbox_toolbox_api_client_async/models/completion_list.py +112 -0
- cogbox_toolbox_api_client_async/models/computer_use_accessibility_node.py +129 -0
- cogbox_toolbox_api_client_async/models/computer_use_start_response.py +117 -0
- cogbox_toolbox_api_client_async/models/computer_use_status_response.py +102 -0
- cogbox_toolbox_api_client_async/models/computer_use_stop_response.py +117 -0
- cogbox_toolbox_api_client_async/models/create_context_request.py +104 -0
- cogbox_toolbox_api_client_async/models/create_session_request.py +102 -0
- cogbox_toolbox_api_client_async/models/display_info.py +112 -0
- cogbox_toolbox_api_client_async/models/display_info_response.py +110 -0
- cogbox_toolbox_api_client_async/models/execute_request.py +108 -0
- cogbox_toolbox_api_client_async/models/execute_response.py +104 -0
- cogbox_toolbox_api_client_async/models/file_info.py +118 -0
- cogbox_toolbox_api_client_async/models/file_status.py +109 -0
- cogbox_toolbox_api_client_async/models/files_download_request.py +102 -0
- cogbox_toolbox_api_client_async/models/find_accessibility_nodes_request.py +114 -0
- cogbox_toolbox_api_client_async/models/git_add_request.py +104 -0
- cogbox_toolbox_api_client_async/models/git_branch_request.py +104 -0
- cogbox_toolbox_api_client_async/models/git_checkout_request.py +104 -0
- cogbox_toolbox_api_client_async/models/git_clone_request.py +114 -0
- cogbox_toolbox_api_client_async/models/git_commit_info.py +110 -0
- cogbox_toolbox_api_client_async/models/git_commit_request.py +110 -0
- cogbox_toolbox_api_client_async/models/git_commit_response.py +102 -0
- cogbox_toolbox_api_client_async/models/git_delete_branch_request.py +104 -0
- cogbox_toolbox_api_client_async/models/git_repo_request.py +106 -0
- cogbox_toolbox_api_client_async/models/git_status.py +118 -0
- cogbox_toolbox_api_client_async/models/initialize_request.py +102 -0
- cogbox_toolbox_api_client_async/models/interpreter_context.py +110 -0
- cogbox_toolbox_api_client_async/models/is_port_in_use_response.py +102 -0
- cogbox_toolbox_api_client_async/models/keyboard_hotkey_request.py +102 -0
- cogbox_toolbox_api_client_async/models/keyboard_press_request.py +104 -0
- cogbox_toolbox_api_client_async/models/keyboard_type_request.py +104 -0
- cogbox_toolbox_api_client_async/models/list_branch_response.py +102 -0
- cogbox_toolbox_api_client_async/models/list_contexts_response.py +110 -0
- cogbox_toolbox_api_client_async/models/list_recordings_response.py +110 -0
- cogbox_toolbox_api_client_async/models/lsp_completion_params.py +118 -0
- cogbox_toolbox_api_client_async/models/lsp_document_request.py +106 -0
- cogbox_toolbox_api_client_async/models/lsp_location.py +108 -0
- cogbox_toolbox_api_client_async/models/lsp_position.py +104 -0
- cogbox_toolbox_api_client_async/models/lsp_range.py +111 -0
- cogbox_toolbox_api_client_async/models/lsp_server_request.py +104 -0
- cogbox_toolbox_api_client_async/models/lsp_symbol.py +110 -0
- cogbox_toolbox_api_client_async/models/match.py +106 -0
- cogbox_toolbox_api_client_async/models/mouse_click_request.py +108 -0
- cogbox_toolbox_api_client_async/models/mouse_click_response.py +104 -0
- cogbox_toolbox_api_client_async/models/mouse_drag_request.py +110 -0
- cogbox_toolbox_api_client_async/models/mouse_drag_response.py +104 -0
- cogbox_toolbox_api_client_async/models/mouse_move_request.py +104 -0
- cogbox_toolbox_api_client_async/models/mouse_position_response.py +104 -0
- cogbox_toolbox_api_client_async/models/mouse_scroll_request.py +109 -0
- cogbox_toolbox_api_client_async/models/port_list.py +102 -0
- cogbox_toolbox_api_client_async/models/position.py +104 -0
- cogbox_toolbox_api_client_async/models/process_errors_response.py +104 -0
- cogbox_toolbox_api_client_async/models/process_logs_response.py +104 -0
- cogbox_toolbox_api_client_async/models/process_restart_response.py +104 -0
- cogbox_toolbox_api_client_async/models/process_status.py +108 -0
- cogbox_toolbox_api_client_async/models/process_status_response.py +104 -0
- cogbox_toolbox_api_client_async/models/pty_create_request.py +112 -0
- cogbox_toolbox_api_client_async/models/pty_create_response.py +102 -0
- cogbox_toolbox_api_client_async/models/pty_list_response.py +110 -0
- cogbox_toolbox_api_client_async/models/pty_resize_request.py +105 -0
- cogbox_toolbox_api_client_async/models/pty_session_info.py +116 -0
- cogbox_toolbox_api_client_async/models/recording.py +116 -0
- cogbox_toolbox_api_client_async/models/replace_request.py +106 -0
- cogbox_toolbox_api_client_async/models/replace_result.py +106 -0
- cogbox_toolbox_api_client_async/models/screenshot_response.py +110 -0
- cogbox_toolbox_api_client_async/models/scroll_response.py +102 -0
- cogbox_toolbox_api_client_async/models/search_files_response.py +102 -0
- cogbox_toolbox_api_client_async/models/session.py +112 -0
- cogbox_toolbox_api_client_async/models/session_command_logs_response.py +106 -0
- cogbox_toolbox_api_client_async/models/session_execute_request.py +108 -0
- cogbox_toolbox_api_client_async/models/session_execute_response.py +110 -0
- cogbox_toolbox_api_client_async/models/session_send_input_request.py +102 -0
- cogbox_toolbox_api_client_async/models/start_recording_request.py +102 -0
- cogbox_toolbox_api_client_async/models/status.py +48 -0
- cogbox_toolbox_api_client_async/models/stop_recording_request.py +102 -0
- cogbox_toolbox_api_client_async/models/user_home_dir_response.py +102 -0
- cogbox_toolbox_api_client_async/models/window_info.py +114 -0
- cogbox_toolbox_api_client_async/models/windows_response.py +110 -0
- cogbox_toolbox_api_client_async/models/work_dir_response.py +102 -0
- cogbox_toolbox_api_client_async/py.typed +0 -0
- cogbox_toolbox_api_client_async/rest.py +226 -0
- cogbox_toolbox_api_client_async-0.190.1.dist-info/METADATA +20 -0
- cogbox_toolbox_api_client_async-0.190.1.dist-info/RECORD +116 -0
- cogbox_toolbox_api_client_async-0.190.1.dist-info/WHEEL +5 -0
- cogbox_toolbox_api_client_async-0.190.1.dist-info/licenses/LICENSE +190 -0
- cogbox_toolbox_api_client_async-0.190.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,4865 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Cogbox Toolbox API
|
|
3
|
+
|
|
4
|
+
Cogbox Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Cogbox API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Cogbox Cloud: `https://proxy.cogbox.pazity.com/toolbox/{sandboxId}`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v0.0.0-dev
|
|
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 pydantic import Field, StrictBool, StrictStr
|
|
19
|
+
from typing import Any, Dict, List, Optional
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from cogbox_toolbox_api_client_async.models.code_run_request import CodeRunRequest
|
|
22
|
+
from cogbox_toolbox_api_client_async.models.code_run_response import CodeRunResponse
|
|
23
|
+
from cogbox_toolbox_api_client_async.models.command import Command
|
|
24
|
+
from cogbox_toolbox_api_client_async.models.create_session_request import CreateSessionRequest
|
|
25
|
+
from cogbox_toolbox_api_client_async.models.execute_request import ExecuteRequest
|
|
26
|
+
from cogbox_toolbox_api_client_async.models.execute_response import ExecuteResponse
|
|
27
|
+
from cogbox_toolbox_api_client_async.models.pty_create_request import PtyCreateRequest
|
|
28
|
+
from cogbox_toolbox_api_client_async.models.pty_create_response import PtyCreateResponse
|
|
29
|
+
from cogbox_toolbox_api_client_async.models.pty_list_response import PtyListResponse
|
|
30
|
+
from cogbox_toolbox_api_client_async.models.pty_resize_request import PtyResizeRequest
|
|
31
|
+
from cogbox_toolbox_api_client_async.models.pty_session_info import PtySessionInfo
|
|
32
|
+
from cogbox_toolbox_api_client_async.models.session import Session
|
|
33
|
+
from cogbox_toolbox_api_client_async.models.session_command_logs_response import SessionCommandLogsResponse
|
|
34
|
+
from cogbox_toolbox_api_client_async.models.session_execute_request import SessionExecuteRequest
|
|
35
|
+
from cogbox_toolbox_api_client_async.models.session_execute_response import SessionExecuteResponse
|
|
36
|
+
from cogbox_toolbox_api_client_async.models.session_send_input_request import SessionSendInputRequest
|
|
37
|
+
|
|
38
|
+
from cogbox_toolbox_api_client_async.api_client import ApiClient, RequestSerialized
|
|
39
|
+
from cogbox_toolbox_api_client_async.api_response import ApiResponse
|
|
40
|
+
from cogbox_toolbox_api_client_async.rest import RESTResponseType
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class ProcessApi:
|
|
44
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
45
|
+
Ref: https://openapi-generator.tech
|
|
46
|
+
|
|
47
|
+
Do not edit the class manually.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
def __init__(self, api_client=None) -> None:
|
|
51
|
+
if api_client is None:
|
|
52
|
+
api_client = ApiClient.get_default()
|
|
53
|
+
self.api_client = api_client
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
@validate_call
|
|
57
|
+
async def code_run(
|
|
58
|
+
self,
|
|
59
|
+
request: Annotated[CodeRunRequest, Field(description="Code execution request")],
|
|
60
|
+
_request_timeout: Union[
|
|
61
|
+
None,
|
|
62
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
63
|
+
Tuple[
|
|
64
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
65
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
66
|
+
]
|
|
67
|
+
] = None,
|
|
68
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
69
|
+
_content_type: Optional[StrictStr] = None,
|
|
70
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
71
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
72
|
+
) -> CodeRunResponse:
|
|
73
|
+
"""Execute code
|
|
74
|
+
|
|
75
|
+
Execute Python, JavaScript, or TypeScript code and return output, exit code, and artifacts
|
|
76
|
+
|
|
77
|
+
:param request: Code execution request (required)
|
|
78
|
+
:type request: CodeRunRequest
|
|
79
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
80
|
+
number provided, it will be total request
|
|
81
|
+
timeout. It can also be a pair (tuple) of
|
|
82
|
+
(connection, read) timeouts.
|
|
83
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
84
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
85
|
+
request; this effectively ignores the
|
|
86
|
+
authentication in the spec for a single request.
|
|
87
|
+
:type _request_auth: dict, optional
|
|
88
|
+
:param _content_type: force content-type for the request.
|
|
89
|
+
:type _content_type: str, Optional
|
|
90
|
+
:param _headers: set to override the headers for a single
|
|
91
|
+
request; this effectively ignores the headers
|
|
92
|
+
in the spec for a single request.
|
|
93
|
+
:type _headers: dict, optional
|
|
94
|
+
:param _host_index: set to override the host_index for a single
|
|
95
|
+
request; this effectively ignores the host_index
|
|
96
|
+
in the spec for a single request.
|
|
97
|
+
:type _host_index: int, optional
|
|
98
|
+
:return: Returns the result object.
|
|
99
|
+
""" # noqa: E501
|
|
100
|
+
|
|
101
|
+
_param = self._code_run_serialize(
|
|
102
|
+
request=request,
|
|
103
|
+
_request_auth=_request_auth,
|
|
104
|
+
_content_type=_content_type,
|
|
105
|
+
_headers=_headers,
|
|
106
|
+
_host_index=_host_index
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
110
|
+
'200': "CodeRunResponse",
|
|
111
|
+
}
|
|
112
|
+
response_data = await self.api_client.call_api(
|
|
113
|
+
*_param,
|
|
114
|
+
_request_timeout=_request_timeout
|
|
115
|
+
)
|
|
116
|
+
await response_data.read()
|
|
117
|
+
return self.api_client.response_deserialize(
|
|
118
|
+
response_data=response_data,
|
|
119
|
+
response_types_map=_response_types_map,
|
|
120
|
+
).data
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
@validate_call
|
|
124
|
+
async def code_run_with_http_info(
|
|
125
|
+
self,
|
|
126
|
+
request: Annotated[CodeRunRequest, Field(description="Code execution request")],
|
|
127
|
+
_request_timeout: Union[
|
|
128
|
+
None,
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
130
|
+
Tuple[
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
132
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
133
|
+
]
|
|
134
|
+
] = None,
|
|
135
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
136
|
+
_content_type: Optional[StrictStr] = None,
|
|
137
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
138
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
139
|
+
) -> ApiResponse[CodeRunResponse]:
|
|
140
|
+
"""Execute code
|
|
141
|
+
|
|
142
|
+
Execute Python, JavaScript, or TypeScript code and return output, exit code, and artifacts
|
|
143
|
+
|
|
144
|
+
:param request: Code execution request (required)
|
|
145
|
+
:type request: CodeRunRequest
|
|
146
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
147
|
+
number provided, it will be total request
|
|
148
|
+
timeout. It can also be a pair (tuple) of
|
|
149
|
+
(connection, read) timeouts.
|
|
150
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
151
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
152
|
+
request; this effectively ignores the
|
|
153
|
+
authentication in the spec for a single request.
|
|
154
|
+
:type _request_auth: dict, optional
|
|
155
|
+
:param _content_type: force content-type for the request.
|
|
156
|
+
:type _content_type: str, Optional
|
|
157
|
+
:param _headers: set to override the headers for a single
|
|
158
|
+
request; this effectively ignores the headers
|
|
159
|
+
in the spec for a single request.
|
|
160
|
+
:type _headers: dict, optional
|
|
161
|
+
:param _host_index: set to override the host_index for a single
|
|
162
|
+
request; this effectively ignores the host_index
|
|
163
|
+
in the spec for a single request.
|
|
164
|
+
:type _host_index: int, optional
|
|
165
|
+
:return: Returns the result object.
|
|
166
|
+
""" # noqa: E501
|
|
167
|
+
|
|
168
|
+
_param = self._code_run_serialize(
|
|
169
|
+
request=request,
|
|
170
|
+
_request_auth=_request_auth,
|
|
171
|
+
_content_type=_content_type,
|
|
172
|
+
_headers=_headers,
|
|
173
|
+
_host_index=_host_index
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
177
|
+
'200': "CodeRunResponse",
|
|
178
|
+
}
|
|
179
|
+
response_data = await self.api_client.call_api(
|
|
180
|
+
*_param,
|
|
181
|
+
_request_timeout=_request_timeout
|
|
182
|
+
)
|
|
183
|
+
await response_data.read()
|
|
184
|
+
return self.api_client.response_deserialize(
|
|
185
|
+
response_data=response_data,
|
|
186
|
+
response_types_map=_response_types_map,
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
@validate_call
|
|
191
|
+
async def code_run_without_preload_content(
|
|
192
|
+
self,
|
|
193
|
+
request: Annotated[CodeRunRequest, Field(description="Code execution request")],
|
|
194
|
+
_request_timeout: Union[
|
|
195
|
+
None,
|
|
196
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
197
|
+
Tuple[
|
|
198
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
199
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
200
|
+
]
|
|
201
|
+
] = None,
|
|
202
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
203
|
+
_content_type: Optional[StrictStr] = None,
|
|
204
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
205
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
206
|
+
) -> RESTResponseType:
|
|
207
|
+
"""Execute code
|
|
208
|
+
|
|
209
|
+
Execute Python, JavaScript, or TypeScript code and return output, exit code, and artifacts
|
|
210
|
+
|
|
211
|
+
:param request: Code execution request (required)
|
|
212
|
+
:type request: CodeRunRequest
|
|
213
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
214
|
+
number provided, it will be total request
|
|
215
|
+
timeout. It can also be a pair (tuple) of
|
|
216
|
+
(connection, read) timeouts.
|
|
217
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
218
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
219
|
+
request; this effectively ignores the
|
|
220
|
+
authentication in the spec for a single request.
|
|
221
|
+
:type _request_auth: dict, optional
|
|
222
|
+
:param _content_type: force content-type for the request.
|
|
223
|
+
:type _content_type: str, Optional
|
|
224
|
+
:param _headers: set to override the headers for a single
|
|
225
|
+
request; this effectively ignores the headers
|
|
226
|
+
in the spec for a single request.
|
|
227
|
+
:type _headers: dict, optional
|
|
228
|
+
:param _host_index: set to override the host_index for a single
|
|
229
|
+
request; this effectively ignores the host_index
|
|
230
|
+
in the spec for a single request.
|
|
231
|
+
:type _host_index: int, optional
|
|
232
|
+
:return: Returns the result object.
|
|
233
|
+
""" # noqa: E501
|
|
234
|
+
|
|
235
|
+
_param = self._code_run_serialize(
|
|
236
|
+
request=request,
|
|
237
|
+
_request_auth=_request_auth,
|
|
238
|
+
_content_type=_content_type,
|
|
239
|
+
_headers=_headers,
|
|
240
|
+
_host_index=_host_index
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
244
|
+
'200': "CodeRunResponse",
|
|
245
|
+
}
|
|
246
|
+
response_data = await self.api_client.call_api(
|
|
247
|
+
*_param,
|
|
248
|
+
_request_timeout=_request_timeout
|
|
249
|
+
)
|
|
250
|
+
return response_data.response
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
def _code_run_serialize(
|
|
254
|
+
self,
|
|
255
|
+
request,
|
|
256
|
+
_request_auth,
|
|
257
|
+
_content_type,
|
|
258
|
+
_headers,
|
|
259
|
+
_host_index,
|
|
260
|
+
) -> RequestSerialized:
|
|
261
|
+
|
|
262
|
+
_host = None
|
|
263
|
+
|
|
264
|
+
_collection_formats: Dict[str, str] = {
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
_path_params: Dict[str, str] = {}
|
|
268
|
+
_query_params: List[Tuple[str, str]] = []
|
|
269
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
270
|
+
_form_params: List[Tuple[str, str]] = []
|
|
271
|
+
_files: Dict[
|
|
272
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
273
|
+
] = {}
|
|
274
|
+
_body_params: Optional[bytes] = None
|
|
275
|
+
|
|
276
|
+
# process the path parameters
|
|
277
|
+
# process the query parameters
|
|
278
|
+
# process the header parameters
|
|
279
|
+
# process the form parameters
|
|
280
|
+
# process the body parameter
|
|
281
|
+
if request is not None:
|
|
282
|
+
_body_params = request
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
# set the HTTP header `Accept`
|
|
286
|
+
if 'Accept' not in _header_params:
|
|
287
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
288
|
+
[
|
|
289
|
+
'application/json'
|
|
290
|
+
]
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
# set the HTTP header `Content-Type`
|
|
294
|
+
if _content_type:
|
|
295
|
+
_header_params['Content-Type'] = _content_type
|
|
296
|
+
else:
|
|
297
|
+
_default_content_type = (
|
|
298
|
+
self.api_client.select_header_content_type(
|
|
299
|
+
[
|
|
300
|
+
'application/json'
|
|
301
|
+
]
|
|
302
|
+
)
|
|
303
|
+
)
|
|
304
|
+
if _default_content_type is not None:
|
|
305
|
+
_header_params['Content-Type'] = _default_content_type
|
|
306
|
+
|
|
307
|
+
# authentication setting
|
|
308
|
+
_auth_settings: List[str] = [
|
|
309
|
+
]
|
|
310
|
+
|
|
311
|
+
return self.api_client.param_serialize(
|
|
312
|
+
method='POST',
|
|
313
|
+
resource_path='/process/code-run',
|
|
314
|
+
path_params=_path_params,
|
|
315
|
+
query_params=_query_params,
|
|
316
|
+
header_params=_header_params,
|
|
317
|
+
body=_body_params,
|
|
318
|
+
post_params=_form_params,
|
|
319
|
+
files=_files,
|
|
320
|
+
auth_settings=_auth_settings,
|
|
321
|
+
collection_formats=_collection_formats,
|
|
322
|
+
_host=_host,
|
|
323
|
+
_request_auth=_request_auth
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
@validate_call
|
|
330
|
+
async def connect_pty_session(
|
|
331
|
+
self,
|
|
332
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
333
|
+
_request_timeout: Union[
|
|
334
|
+
None,
|
|
335
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
336
|
+
Tuple[
|
|
337
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
338
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
339
|
+
]
|
|
340
|
+
] = None,
|
|
341
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
342
|
+
_content_type: Optional[StrictStr] = None,
|
|
343
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
344
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
345
|
+
) -> None:
|
|
346
|
+
"""Connect to PTY session via WebSocket
|
|
347
|
+
|
|
348
|
+
Establish a WebSocket connection to interact with a pseudo-terminal session
|
|
349
|
+
|
|
350
|
+
:param session_id: PTY session ID (required)
|
|
351
|
+
:type session_id: str
|
|
352
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
353
|
+
number provided, it will be total request
|
|
354
|
+
timeout. It can also be a pair (tuple) of
|
|
355
|
+
(connection, read) timeouts.
|
|
356
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
357
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
358
|
+
request; this effectively ignores the
|
|
359
|
+
authentication in the spec for a single request.
|
|
360
|
+
:type _request_auth: dict, optional
|
|
361
|
+
:param _content_type: force content-type for the request.
|
|
362
|
+
:type _content_type: str, Optional
|
|
363
|
+
:param _headers: set to override the headers for a single
|
|
364
|
+
request; this effectively ignores the headers
|
|
365
|
+
in the spec for a single request.
|
|
366
|
+
:type _headers: dict, optional
|
|
367
|
+
:param _host_index: set to override the host_index for a single
|
|
368
|
+
request; this effectively ignores the host_index
|
|
369
|
+
in the spec for a single request.
|
|
370
|
+
:type _host_index: int, optional
|
|
371
|
+
:return: Returns the result object.
|
|
372
|
+
""" # noqa: E501
|
|
373
|
+
|
|
374
|
+
_param = self._connect_pty_session_serialize(
|
|
375
|
+
session_id=session_id,
|
|
376
|
+
_request_auth=_request_auth,
|
|
377
|
+
_content_type=_content_type,
|
|
378
|
+
_headers=_headers,
|
|
379
|
+
_host_index=_host_index
|
|
380
|
+
)
|
|
381
|
+
|
|
382
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
383
|
+
'101': None,
|
|
384
|
+
}
|
|
385
|
+
response_data = await self.api_client.call_api(
|
|
386
|
+
*_param,
|
|
387
|
+
_request_timeout=_request_timeout
|
|
388
|
+
)
|
|
389
|
+
await response_data.read()
|
|
390
|
+
return self.api_client.response_deserialize(
|
|
391
|
+
response_data=response_data,
|
|
392
|
+
response_types_map=_response_types_map,
|
|
393
|
+
).data
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
@validate_call
|
|
397
|
+
async def connect_pty_session_with_http_info(
|
|
398
|
+
self,
|
|
399
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
400
|
+
_request_timeout: Union[
|
|
401
|
+
None,
|
|
402
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
403
|
+
Tuple[
|
|
404
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
405
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
406
|
+
]
|
|
407
|
+
] = None,
|
|
408
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
409
|
+
_content_type: Optional[StrictStr] = None,
|
|
410
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
411
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
412
|
+
) -> ApiResponse[None]:
|
|
413
|
+
"""Connect to PTY session via WebSocket
|
|
414
|
+
|
|
415
|
+
Establish a WebSocket connection to interact with a pseudo-terminal session
|
|
416
|
+
|
|
417
|
+
:param session_id: PTY session ID (required)
|
|
418
|
+
:type session_id: str
|
|
419
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
420
|
+
number provided, it will be total request
|
|
421
|
+
timeout. It can also be a pair (tuple) of
|
|
422
|
+
(connection, read) timeouts.
|
|
423
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
424
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
425
|
+
request; this effectively ignores the
|
|
426
|
+
authentication in the spec for a single request.
|
|
427
|
+
:type _request_auth: dict, optional
|
|
428
|
+
:param _content_type: force content-type for the request.
|
|
429
|
+
:type _content_type: str, Optional
|
|
430
|
+
:param _headers: set to override the headers for a single
|
|
431
|
+
request; this effectively ignores the headers
|
|
432
|
+
in the spec for a single request.
|
|
433
|
+
:type _headers: dict, optional
|
|
434
|
+
:param _host_index: set to override the host_index for a single
|
|
435
|
+
request; this effectively ignores the host_index
|
|
436
|
+
in the spec for a single request.
|
|
437
|
+
:type _host_index: int, optional
|
|
438
|
+
:return: Returns the result object.
|
|
439
|
+
""" # noqa: E501
|
|
440
|
+
|
|
441
|
+
_param = self._connect_pty_session_serialize(
|
|
442
|
+
session_id=session_id,
|
|
443
|
+
_request_auth=_request_auth,
|
|
444
|
+
_content_type=_content_type,
|
|
445
|
+
_headers=_headers,
|
|
446
|
+
_host_index=_host_index
|
|
447
|
+
)
|
|
448
|
+
|
|
449
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
450
|
+
'101': None,
|
|
451
|
+
}
|
|
452
|
+
response_data = await self.api_client.call_api(
|
|
453
|
+
*_param,
|
|
454
|
+
_request_timeout=_request_timeout
|
|
455
|
+
)
|
|
456
|
+
await response_data.read()
|
|
457
|
+
return self.api_client.response_deserialize(
|
|
458
|
+
response_data=response_data,
|
|
459
|
+
response_types_map=_response_types_map,
|
|
460
|
+
)
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
@validate_call
|
|
464
|
+
async def connect_pty_session_without_preload_content(
|
|
465
|
+
self,
|
|
466
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
467
|
+
_request_timeout: Union[
|
|
468
|
+
None,
|
|
469
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
470
|
+
Tuple[
|
|
471
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
472
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
473
|
+
]
|
|
474
|
+
] = None,
|
|
475
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
476
|
+
_content_type: Optional[StrictStr] = None,
|
|
477
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
478
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
479
|
+
) -> RESTResponseType:
|
|
480
|
+
"""Connect to PTY session via WebSocket
|
|
481
|
+
|
|
482
|
+
Establish a WebSocket connection to interact with a pseudo-terminal session
|
|
483
|
+
|
|
484
|
+
:param session_id: PTY session ID (required)
|
|
485
|
+
:type session_id: str
|
|
486
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
487
|
+
number provided, it will be total request
|
|
488
|
+
timeout. It can also be a pair (tuple) of
|
|
489
|
+
(connection, read) timeouts.
|
|
490
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
491
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
492
|
+
request; this effectively ignores the
|
|
493
|
+
authentication in the spec for a single request.
|
|
494
|
+
:type _request_auth: dict, optional
|
|
495
|
+
:param _content_type: force content-type for the request.
|
|
496
|
+
:type _content_type: str, Optional
|
|
497
|
+
:param _headers: set to override the headers for a single
|
|
498
|
+
request; this effectively ignores the headers
|
|
499
|
+
in the spec for a single request.
|
|
500
|
+
:type _headers: dict, optional
|
|
501
|
+
:param _host_index: set to override the host_index for a single
|
|
502
|
+
request; this effectively ignores the host_index
|
|
503
|
+
in the spec for a single request.
|
|
504
|
+
:type _host_index: int, optional
|
|
505
|
+
:return: Returns the result object.
|
|
506
|
+
""" # noqa: E501
|
|
507
|
+
|
|
508
|
+
_param = self._connect_pty_session_serialize(
|
|
509
|
+
session_id=session_id,
|
|
510
|
+
_request_auth=_request_auth,
|
|
511
|
+
_content_type=_content_type,
|
|
512
|
+
_headers=_headers,
|
|
513
|
+
_host_index=_host_index
|
|
514
|
+
)
|
|
515
|
+
|
|
516
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
517
|
+
'101': None,
|
|
518
|
+
}
|
|
519
|
+
response_data = await self.api_client.call_api(
|
|
520
|
+
*_param,
|
|
521
|
+
_request_timeout=_request_timeout
|
|
522
|
+
)
|
|
523
|
+
return response_data.response
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
def _connect_pty_session_serialize(
|
|
527
|
+
self,
|
|
528
|
+
session_id,
|
|
529
|
+
_request_auth,
|
|
530
|
+
_content_type,
|
|
531
|
+
_headers,
|
|
532
|
+
_host_index,
|
|
533
|
+
) -> RequestSerialized:
|
|
534
|
+
|
|
535
|
+
_host = None
|
|
536
|
+
|
|
537
|
+
_collection_formats: Dict[str, str] = {
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
_path_params: Dict[str, str] = {}
|
|
541
|
+
_query_params: List[Tuple[str, str]] = []
|
|
542
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
543
|
+
_form_params: List[Tuple[str, str]] = []
|
|
544
|
+
_files: Dict[
|
|
545
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
546
|
+
] = {}
|
|
547
|
+
_body_params: Optional[bytes] = None
|
|
548
|
+
|
|
549
|
+
# process the path parameters
|
|
550
|
+
if session_id is not None:
|
|
551
|
+
_path_params['sessionId'] = session_id
|
|
552
|
+
# process the query parameters
|
|
553
|
+
# process the header parameters
|
|
554
|
+
# process the form parameters
|
|
555
|
+
# process the body parameter
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
# authentication setting
|
|
561
|
+
_auth_settings: List[str] = [
|
|
562
|
+
]
|
|
563
|
+
|
|
564
|
+
return self.api_client.param_serialize(
|
|
565
|
+
method='GET',
|
|
566
|
+
resource_path='/process/pty/{sessionId}/connect',
|
|
567
|
+
path_params=_path_params,
|
|
568
|
+
query_params=_query_params,
|
|
569
|
+
header_params=_header_params,
|
|
570
|
+
body=_body_params,
|
|
571
|
+
post_params=_form_params,
|
|
572
|
+
files=_files,
|
|
573
|
+
auth_settings=_auth_settings,
|
|
574
|
+
collection_formats=_collection_formats,
|
|
575
|
+
_host=_host,
|
|
576
|
+
_request_auth=_request_auth
|
|
577
|
+
)
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
@validate_call
|
|
583
|
+
async def create_pty_session(
|
|
584
|
+
self,
|
|
585
|
+
request: Annotated[PtyCreateRequest, Field(description="PTY session creation request")],
|
|
586
|
+
_request_timeout: Union[
|
|
587
|
+
None,
|
|
588
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
589
|
+
Tuple[
|
|
590
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
591
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
592
|
+
]
|
|
593
|
+
] = None,
|
|
594
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
595
|
+
_content_type: Optional[StrictStr] = None,
|
|
596
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
597
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
598
|
+
) -> PtyCreateResponse:
|
|
599
|
+
"""Create a new PTY session
|
|
600
|
+
|
|
601
|
+
Create a new pseudo-terminal session with specified configuration
|
|
602
|
+
|
|
603
|
+
:param request: PTY session creation request (required)
|
|
604
|
+
:type request: PtyCreateRequest
|
|
605
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
606
|
+
number provided, it will be total request
|
|
607
|
+
timeout. It can also be a pair (tuple) of
|
|
608
|
+
(connection, read) timeouts.
|
|
609
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
610
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
611
|
+
request; this effectively ignores the
|
|
612
|
+
authentication in the spec for a single request.
|
|
613
|
+
:type _request_auth: dict, optional
|
|
614
|
+
:param _content_type: force content-type for the request.
|
|
615
|
+
:type _content_type: str, Optional
|
|
616
|
+
:param _headers: set to override the headers for a single
|
|
617
|
+
request; this effectively ignores the headers
|
|
618
|
+
in the spec for a single request.
|
|
619
|
+
:type _headers: dict, optional
|
|
620
|
+
:param _host_index: set to override the host_index for a single
|
|
621
|
+
request; this effectively ignores the host_index
|
|
622
|
+
in the spec for a single request.
|
|
623
|
+
:type _host_index: int, optional
|
|
624
|
+
:return: Returns the result object.
|
|
625
|
+
""" # noqa: E501
|
|
626
|
+
|
|
627
|
+
_param = self._create_pty_session_serialize(
|
|
628
|
+
request=request,
|
|
629
|
+
_request_auth=_request_auth,
|
|
630
|
+
_content_type=_content_type,
|
|
631
|
+
_headers=_headers,
|
|
632
|
+
_host_index=_host_index
|
|
633
|
+
)
|
|
634
|
+
|
|
635
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
636
|
+
'201': "PtyCreateResponse",
|
|
637
|
+
}
|
|
638
|
+
response_data = await self.api_client.call_api(
|
|
639
|
+
*_param,
|
|
640
|
+
_request_timeout=_request_timeout
|
|
641
|
+
)
|
|
642
|
+
await response_data.read()
|
|
643
|
+
return self.api_client.response_deserialize(
|
|
644
|
+
response_data=response_data,
|
|
645
|
+
response_types_map=_response_types_map,
|
|
646
|
+
).data
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
@validate_call
|
|
650
|
+
async def create_pty_session_with_http_info(
|
|
651
|
+
self,
|
|
652
|
+
request: Annotated[PtyCreateRequest, Field(description="PTY session creation request")],
|
|
653
|
+
_request_timeout: Union[
|
|
654
|
+
None,
|
|
655
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
656
|
+
Tuple[
|
|
657
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
658
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
659
|
+
]
|
|
660
|
+
] = None,
|
|
661
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
662
|
+
_content_type: Optional[StrictStr] = None,
|
|
663
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
664
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
665
|
+
) -> ApiResponse[PtyCreateResponse]:
|
|
666
|
+
"""Create a new PTY session
|
|
667
|
+
|
|
668
|
+
Create a new pseudo-terminal session with specified configuration
|
|
669
|
+
|
|
670
|
+
:param request: PTY session creation request (required)
|
|
671
|
+
:type request: PtyCreateRequest
|
|
672
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
673
|
+
number provided, it will be total request
|
|
674
|
+
timeout. It can also be a pair (tuple) of
|
|
675
|
+
(connection, read) timeouts.
|
|
676
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
677
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
678
|
+
request; this effectively ignores the
|
|
679
|
+
authentication in the spec for a single request.
|
|
680
|
+
:type _request_auth: dict, optional
|
|
681
|
+
:param _content_type: force content-type for the request.
|
|
682
|
+
:type _content_type: str, Optional
|
|
683
|
+
:param _headers: set to override the headers for a single
|
|
684
|
+
request; this effectively ignores the headers
|
|
685
|
+
in the spec for a single request.
|
|
686
|
+
:type _headers: dict, optional
|
|
687
|
+
:param _host_index: set to override the host_index for a single
|
|
688
|
+
request; this effectively ignores the host_index
|
|
689
|
+
in the spec for a single request.
|
|
690
|
+
:type _host_index: int, optional
|
|
691
|
+
:return: Returns the result object.
|
|
692
|
+
""" # noqa: E501
|
|
693
|
+
|
|
694
|
+
_param = self._create_pty_session_serialize(
|
|
695
|
+
request=request,
|
|
696
|
+
_request_auth=_request_auth,
|
|
697
|
+
_content_type=_content_type,
|
|
698
|
+
_headers=_headers,
|
|
699
|
+
_host_index=_host_index
|
|
700
|
+
)
|
|
701
|
+
|
|
702
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
703
|
+
'201': "PtyCreateResponse",
|
|
704
|
+
}
|
|
705
|
+
response_data = await self.api_client.call_api(
|
|
706
|
+
*_param,
|
|
707
|
+
_request_timeout=_request_timeout
|
|
708
|
+
)
|
|
709
|
+
await response_data.read()
|
|
710
|
+
return self.api_client.response_deserialize(
|
|
711
|
+
response_data=response_data,
|
|
712
|
+
response_types_map=_response_types_map,
|
|
713
|
+
)
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
@validate_call
|
|
717
|
+
async def create_pty_session_without_preload_content(
|
|
718
|
+
self,
|
|
719
|
+
request: Annotated[PtyCreateRequest, Field(description="PTY session creation request")],
|
|
720
|
+
_request_timeout: Union[
|
|
721
|
+
None,
|
|
722
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
723
|
+
Tuple[
|
|
724
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
725
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
726
|
+
]
|
|
727
|
+
] = None,
|
|
728
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
729
|
+
_content_type: Optional[StrictStr] = None,
|
|
730
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
731
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
732
|
+
) -> RESTResponseType:
|
|
733
|
+
"""Create a new PTY session
|
|
734
|
+
|
|
735
|
+
Create a new pseudo-terminal session with specified configuration
|
|
736
|
+
|
|
737
|
+
:param request: PTY session creation request (required)
|
|
738
|
+
:type request: PtyCreateRequest
|
|
739
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
740
|
+
number provided, it will be total request
|
|
741
|
+
timeout. It can also be a pair (tuple) of
|
|
742
|
+
(connection, read) timeouts.
|
|
743
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
744
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
745
|
+
request; this effectively ignores the
|
|
746
|
+
authentication in the spec for a single request.
|
|
747
|
+
:type _request_auth: dict, optional
|
|
748
|
+
:param _content_type: force content-type for the request.
|
|
749
|
+
:type _content_type: str, Optional
|
|
750
|
+
:param _headers: set to override the headers for a single
|
|
751
|
+
request; this effectively ignores the headers
|
|
752
|
+
in the spec for a single request.
|
|
753
|
+
:type _headers: dict, optional
|
|
754
|
+
:param _host_index: set to override the host_index for a single
|
|
755
|
+
request; this effectively ignores the host_index
|
|
756
|
+
in the spec for a single request.
|
|
757
|
+
:type _host_index: int, optional
|
|
758
|
+
:return: Returns the result object.
|
|
759
|
+
""" # noqa: E501
|
|
760
|
+
|
|
761
|
+
_param = self._create_pty_session_serialize(
|
|
762
|
+
request=request,
|
|
763
|
+
_request_auth=_request_auth,
|
|
764
|
+
_content_type=_content_type,
|
|
765
|
+
_headers=_headers,
|
|
766
|
+
_host_index=_host_index
|
|
767
|
+
)
|
|
768
|
+
|
|
769
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
770
|
+
'201': "PtyCreateResponse",
|
|
771
|
+
}
|
|
772
|
+
response_data = await self.api_client.call_api(
|
|
773
|
+
*_param,
|
|
774
|
+
_request_timeout=_request_timeout
|
|
775
|
+
)
|
|
776
|
+
return response_data.response
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
def _create_pty_session_serialize(
|
|
780
|
+
self,
|
|
781
|
+
request,
|
|
782
|
+
_request_auth,
|
|
783
|
+
_content_type,
|
|
784
|
+
_headers,
|
|
785
|
+
_host_index,
|
|
786
|
+
) -> RequestSerialized:
|
|
787
|
+
|
|
788
|
+
_host = None
|
|
789
|
+
|
|
790
|
+
_collection_formats: Dict[str, str] = {
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
_path_params: Dict[str, str] = {}
|
|
794
|
+
_query_params: List[Tuple[str, str]] = []
|
|
795
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
796
|
+
_form_params: List[Tuple[str, str]] = []
|
|
797
|
+
_files: Dict[
|
|
798
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
799
|
+
] = {}
|
|
800
|
+
_body_params: Optional[bytes] = None
|
|
801
|
+
|
|
802
|
+
# process the path parameters
|
|
803
|
+
# process the query parameters
|
|
804
|
+
# process the header parameters
|
|
805
|
+
# process the form parameters
|
|
806
|
+
# process the body parameter
|
|
807
|
+
if request is not None:
|
|
808
|
+
_body_params = request
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
# set the HTTP header `Accept`
|
|
812
|
+
if 'Accept' not in _header_params:
|
|
813
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
814
|
+
[
|
|
815
|
+
'application/json'
|
|
816
|
+
]
|
|
817
|
+
)
|
|
818
|
+
|
|
819
|
+
# set the HTTP header `Content-Type`
|
|
820
|
+
if _content_type:
|
|
821
|
+
_header_params['Content-Type'] = _content_type
|
|
822
|
+
else:
|
|
823
|
+
_default_content_type = (
|
|
824
|
+
self.api_client.select_header_content_type(
|
|
825
|
+
[
|
|
826
|
+
'application/json'
|
|
827
|
+
]
|
|
828
|
+
)
|
|
829
|
+
)
|
|
830
|
+
if _default_content_type is not None:
|
|
831
|
+
_header_params['Content-Type'] = _default_content_type
|
|
832
|
+
|
|
833
|
+
# authentication setting
|
|
834
|
+
_auth_settings: List[str] = [
|
|
835
|
+
]
|
|
836
|
+
|
|
837
|
+
return self.api_client.param_serialize(
|
|
838
|
+
method='POST',
|
|
839
|
+
resource_path='/process/pty',
|
|
840
|
+
path_params=_path_params,
|
|
841
|
+
query_params=_query_params,
|
|
842
|
+
header_params=_header_params,
|
|
843
|
+
body=_body_params,
|
|
844
|
+
post_params=_form_params,
|
|
845
|
+
files=_files,
|
|
846
|
+
auth_settings=_auth_settings,
|
|
847
|
+
collection_formats=_collection_formats,
|
|
848
|
+
_host=_host,
|
|
849
|
+
_request_auth=_request_auth
|
|
850
|
+
)
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
|
|
854
|
+
|
|
855
|
+
@validate_call
|
|
856
|
+
async def create_session(
|
|
857
|
+
self,
|
|
858
|
+
request: Annotated[CreateSessionRequest, Field(description="Session creation request")],
|
|
859
|
+
_request_timeout: Union[
|
|
860
|
+
None,
|
|
861
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
862
|
+
Tuple[
|
|
863
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
864
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
865
|
+
]
|
|
866
|
+
] = None,
|
|
867
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
868
|
+
_content_type: Optional[StrictStr] = None,
|
|
869
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
870
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
871
|
+
) -> None:
|
|
872
|
+
"""Create a new session
|
|
873
|
+
|
|
874
|
+
Create a new shell session for command execution
|
|
875
|
+
|
|
876
|
+
:param request: Session creation request (required)
|
|
877
|
+
:type request: CreateSessionRequest
|
|
878
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
879
|
+
number provided, it will be total request
|
|
880
|
+
timeout. It can also be a pair (tuple) of
|
|
881
|
+
(connection, read) timeouts.
|
|
882
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
883
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
884
|
+
request; this effectively ignores the
|
|
885
|
+
authentication in the spec for a single request.
|
|
886
|
+
:type _request_auth: dict, optional
|
|
887
|
+
:param _content_type: force content-type for the request.
|
|
888
|
+
:type _content_type: str, Optional
|
|
889
|
+
:param _headers: set to override the headers for a single
|
|
890
|
+
request; this effectively ignores the headers
|
|
891
|
+
in the spec for a single request.
|
|
892
|
+
:type _headers: dict, optional
|
|
893
|
+
:param _host_index: set to override the host_index for a single
|
|
894
|
+
request; this effectively ignores the host_index
|
|
895
|
+
in the spec for a single request.
|
|
896
|
+
:type _host_index: int, optional
|
|
897
|
+
:return: Returns the result object.
|
|
898
|
+
""" # noqa: E501
|
|
899
|
+
|
|
900
|
+
_param = self._create_session_serialize(
|
|
901
|
+
request=request,
|
|
902
|
+
_request_auth=_request_auth,
|
|
903
|
+
_content_type=_content_type,
|
|
904
|
+
_headers=_headers,
|
|
905
|
+
_host_index=_host_index
|
|
906
|
+
)
|
|
907
|
+
|
|
908
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
909
|
+
'201': None,
|
|
910
|
+
}
|
|
911
|
+
response_data = await self.api_client.call_api(
|
|
912
|
+
*_param,
|
|
913
|
+
_request_timeout=_request_timeout
|
|
914
|
+
)
|
|
915
|
+
await response_data.read()
|
|
916
|
+
return self.api_client.response_deserialize(
|
|
917
|
+
response_data=response_data,
|
|
918
|
+
response_types_map=_response_types_map,
|
|
919
|
+
).data
|
|
920
|
+
|
|
921
|
+
|
|
922
|
+
@validate_call
|
|
923
|
+
async def create_session_with_http_info(
|
|
924
|
+
self,
|
|
925
|
+
request: Annotated[CreateSessionRequest, Field(description="Session creation request")],
|
|
926
|
+
_request_timeout: Union[
|
|
927
|
+
None,
|
|
928
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
929
|
+
Tuple[
|
|
930
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
931
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
932
|
+
]
|
|
933
|
+
] = None,
|
|
934
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
935
|
+
_content_type: Optional[StrictStr] = None,
|
|
936
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
937
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
938
|
+
) -> ApiResponse[None]:
|
|
939
|
+
"""Create a new session
|
|
940
|
+
|
|
941
|
+
Create a new shell session for command execution
|
|
942
|
+
|
|
943
|
+
:param request: Session creation request (required)
|
|
944
|
+
:type request: CreateSessionRequest
|
|
945
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
946
|
+
number provided, it will be total request
|
|
947
|
+
timeout. It can also be a pair (tuple) of
|
|
948
|
+
(connection, read) timeouts.
|
|
949
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
950
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
951
|
+
request; this effectively ignores the
|
|
952
|
+
authentication in the spec for a single request.
|
|
953
|
+
:type _request_auth: dict, optional
|
|
954
|
+
:param _content_type: force content-type for the request.
|
|
955
|
+
:type _content_type: str, Optional
|
|
956
|
+
:param _headers: set to override the headers for a single
|
|
957
|
+
request; this effectively ignores the headers
|
|
958
|
+
in the spec for a single request.
|
|
959
|
+
:type _headers: dict, optional
|
|
960
|
+
:param _host_index: set to override the host_index for a single
|
|
961
|
+
request; this effectively ignores the host_index
|
|
962
|
+
in the spec for a single request.
|
|
963
|
+
:type _host_index: int, optional
|
|
964
|
+
:return: Returns the result object.
|
|
965
|
+
""" # noqa: E501
|
|
966
|
+
|
|
967
|
+
_param = self._create_session_serialize(
|
|
968
|
+
request=request,
|
|
969
|
+
_request_auth=_request_auth,
|
|
970
|
+
_content_type=_content_type,
|
|
971
|
+
_headers=_headers,
|
|
972
|
+
_host_index=_host_index
|
|
973
|
+
)
|
|
974
|
+
|
|
975
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
976
|
+
'201': None,
|
|
977
|
+
}
|
|
978
|
+
response_data = await self.api_client.call_api(
|
|
979
|
+
*_param,
|
|
980
|
+
_request_timeout=_request_timeout
|
|
981
|
+
)
|
|
982
|
+
await response_data.read()
|
|
983
|
+
return self.api_client.response_deserialize(
|
|
984
|
+
response_data=response_data,
|
|
985
|
+
response_types_map=_response_types_map,
|
|
986
|
+
)
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
@validate_call
|
|
990
|
+
async def create_session_without_preload_content(
|
|
991
|
+
self,
|
|
992
|
+
request: Annotated[CreateSessionRequest, Field(description="Session creation request")],
|
|
993
|
+
_request_timeout: Union[
|
|
994
|
+
None,
|
|
995
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
996
|
+
Tuple[
|
|
997
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
998
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
999
|
+
]
|
|
1000
|
+
] = None,
|
|
1001
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1002
|
+
_content_type: Optional[StrictStr] = None,
|
|
1003
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1004
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1005
|
+
) -> RESTResponseType:
|
|
1006
|
+
"""Create a new session
|
|
1007
|
+
|
|
1008
|
+
Create a new shell session for command execution
|
|
1009
|
+
|
|
1010
|
+
:param request: Session creation request (required)
|
|
1011
|
+
:type request: CreateSessionRequest
|
|
1012
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1013
|
+
number provided, it will be total request
|
|
1014
|
+
timeout. It can also be a pair (tuple) of
|
|
1015
|
+
(connection, read) timeouts.
|
|
1016
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1017
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1018
|
+
request; this effectively ignores the
|
|
1019
|
+
authentication in the spec for a single request.
|
|
1020
|
+
:type _request_auth: dict, optional
|
|
1021
|
+
:param _content_type: force content-type for the request.
|
|
1022
|
+
:type _content_type: str, Optional
|
|
1023
|
+
:param _headers: set to override the headers for a single
|
|
1024
|
+
request; this effectively ignores the headers
|
|
1025
|
+
in the spec for a single request.
|
|
1026
|
+
:type _headers: dict, optional
|
|
1027
|
+
:param _host_index: set to override the host_index for a single
|
|
1028
|
+
request; this effectively ignores the host_index
|
|
1029
|
+
in the spec for a single request.
|
|
1030
|
+
:type _host_index: int, optional
|
|
1031
|
+
:return: Returns the result object.
|
|
1032
|
+
""" # noqa: E501
|
|
1033
|
+
|
|
1034
|
+
_param = self._create_session_serialize(
|
|
1035
|
+
request=request,
|
|
1036
|
+
_request_auth=_request_auth,
|
|
1037
|
+
_content_type=_content_type,
|
|
1038
|
+
_headers=_headers,
|
|
1039
|
+
_host_index=_host_index
|
|
1040
|
+
)
|
|
1041
|
+
|
|
1042
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1043
|
+
'201': None,
|
|
1044
|
+
}
|
|
1045
|
+
response_data = await self.api_client.call_api(
|
|
1046
|
+
*_param,
|
|
1047
|
+
_request_timeout=_request_timeout
|
|
1048
|
+
)
|
|
1049
|
+
return response_data.response
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
def _create_session_serialize(
|
|
1053
|
+
self,
|
|
1054
|
+
request,
|
|
1055
|
+
_request_auth,
|
|
1056
|
+
_content_type,
|
|
1057
|
+
_headers,
|
|
1058
|
+
_host_index,
|
|
1059
|
+
) -> RequestSerialized:
|
|
1060
|
+
|
|
1061
|
+
_host = None
|
|
1062
|
+
|
|
1063
|
+
_collection_formats: Dict[str, str] = {
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
_path_params: Dict[str, str] = {}
|
|
1067
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1068
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1069
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1070
|
+
_files: Dict[
|
|
1071
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1072
|
+
] = {}
|
|
1073
|
+
_body_params: Optional[bytes] = None
|
|
1074
|
+
|
|
1075
|
+
# process the path parameters
|
|
1076
|
+
# process the query parameters
|
|
1077
|
+
# process the header parameters
|
|
1078
|
+
# process the form parameters
|
|
1079
|
+
# process the body parameter
|
|
1080
|
+
if request is not None:
|
|
1081
|
+
_body_params = request
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
# set the HTTP header `Content-Type`
|
|
1086
|
+
if _content_type:
|
|
1087
|
+
_header_params['Content-Type'] = _content_type
|
|
1088
|
+
else:
|
|
1089
|
+
_default_content_type = (
|
|
1090
|
+
self.api_client.select_header_content_type(
|
|
1091
|
+
[
|
|
1092
|
+
'application/json'
|
|
1093
|
+
]
|
|
1094
|
+
)
|
|
1095
|
+
)
|
|
1096
|
+
if _default_content_type is not None:
|
|
1097
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1098
|
+
|
|
1099
|
+
# authentication setting
|
|
1100
|
+
_auth_settings: List[str] = [
|
|
1101
|
+
]
|
|
1102
|
+
|
|
1103
|
+
return self.api_client.param_serialize(
|
|
1104
|
+
method='POST',
|
|
1105
|
+
resource_path='/process/session',
|
|
1106
|
+
path_params=_path_params,
|
|
1107
|
+
query_params=_query_params,
|
|
1108
|
+
header_params=_header_params,
|
|
1109
|
+
body=_body_params,
|
|
1110
|
+
post_params=_form_params,
|
|
1111
|
+
files=_files,
|
|
1112
|
+
auth_settings=_auth_settings,
|
|
1113
|
+
collection_formats=_collection_formats,
|
|
1114
|
+
_host=_host,
|
|
1115
|
+
_request_auth=_request_auth
|
|
1116
|
+
)
|
|
1117
|
+
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
@validate_call
|
|
1122
|
+
async def delete_pty_session(
|
|
1123
|
+
self,
|
|
1124
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
1125
|
+
_request_timeout: Union[
|
|
1126
|
+
None,
|
|
1127
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1128
|
+
Tuple[
|
|
1129
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1130
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1131
|
+
]
|
|
1132
|
+
] = None,
|
|
1133
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1134
|
+
_content_type: Optional[StrictStr] = None,
|
|
1135
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1136
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1137
|
+
) -> Dict[str, object]:
|
|
1138
|
+
"""Delete a PTY session
|
|
1139
|
+
|
|
1140
|
+
Delete a pseudo-terminal session and terminate its process
|
|
1141
|
+
|
|
1142
|
+
:param session_id: PTY session ID (required)
|
|
1143
|
+
:type session_id: str
|
|
1144
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1145
|
+
number provided, it will be total request
|
|
1146
|
+
timeout. It can also be a pair (tuple) of
|
|
1147
|
+
(connection, read) timeouts.
|
|
1148
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1149
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1150
|
+
request; this effectively ignores the
|
|
1151
|
+
authentication in the spec for a single request.
|
|
1152
|
+
:type _request_auth: dict, optional
|
|
1153
|
+
:param _content_type: force content-type for the request.
|
|
1154
|
+
:type _content_type: str, Optional
|
|
1155
|
+
:param _headers: set to override the headers for a single
|
|
1156
|
+
request; this effectively ignores the headers
|
|
1157
|
+
in the spec for a single request.
|
|
1158
|
+
:type _headers: dict, optional
|
|
1159
|
+
:param _host_index: set to override the host_index for a single
|
|
1160
|
+
request; this effectively ignores the host_index
|
|
1161
|
+
in the spec for a single request.
|
|
1162
|
+
:type _host_index: int, optional
|
|
1163
|
+
:return: Returns the result object.
|
|
1164
|
+
""" # noqa: E501
|
|
1165
|
+
|
|
1166
|
+
_param = self._delete_pty_session_serialize(
|
|
1167
|
+
session_id=session_id,
|
|
1168
|
+
_request_auth=_request_auth,
|
|
1169
|
+
_content_type=_content_type,
|
|
1170
|
+
_headers=_headers,
|
|
1171
|
+
_host_index=_host_index
|
|
1172
|
+
)
|
|
1173
|
+
|
|
1174
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1175
|
+
'200': "Dict[str, object]",
|
|
1176
|
+
}
|
|
1177
|
+
response_data = await self.api_client.call_api(
|
|
1178
|
+
*_param,
|
|
1179
|
+
_request_timeout=_request_timeout
|
|
1180
|
+
)
|
|
1181
|
+
await response_data.read()
|
|
1182
|
+
return self.api_client.response_deserialize(
|
|
1183
|
+
response_data=response_data,
|
|
1184
|
+
response_types_map=_response_types_map,
|
|
1185
|
+
).data
|
|
1186
|
+
|
|
1187
|
+
|
|
1188
|
+
@validate_call
|
|
1189
|
+
async def delete_pty_session_with_http_info(
|
|
1190
|
+
self,
|
|
1191
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
1192
|
+
_request_timeout: Union[
|
|
1193
|
+
None,
|
|
1194
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1195
|
+
Tuple[
|
|
1196
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1197
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1198
|
+
]
|
|
1199
|
+
] = None,
|
|
1200
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1201
|
+
_content_type: Optional[StrictStr] = None,
|
|
1202
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1203
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1204
|
+
) -> ApiResponse[Dict[str, object]]:
|
|
1205
|
+
"""Delete a PTY session
|
|
1206
|
+
|
|
1207
|
+
Delete a pseudo-terminal session and terminate its process
|
|
1208
|
+
|
|
1209
|
+
:param session_id: PTY session ID (required)
|
|
1210
|
+
:type session_id: str
|
|
1211
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1212
|
+
number provided, it will be total request
|
|
1213
|
+
timeout. It can also be a pair (tuple) of
|
|
1214
|
+
(connection, read) timeouts.
|
|
1215
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1216
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1217
|
+
request; this effectively ignores the
|
|
1218
|
+
authentication in the spec for a single request.
|
|
1219
|
+
:type _request_auth: dict, optional
|
|
1220
|
+
:param _content_type: force content-type for the request.
|
|
1221
|
+
:type _content_type: str, Optional
|
|
1222
|
+
:param _headers: set to override the headers for a single
|
|
1223
|
+
request; this effectively ignores the headers
|
|
1224
|
+
in the spec for a single request.
|
|
1225
|
+
:type _headers: dict, optional
|
|
1226
|
+
:param _host_index: set to override the host_index for a single
|
|
1227
|
+
request; this effectively ignores the host_index
|
|
1228
|
+
in the spec for a single request.
|
|
1229
|
+
:type _host_index: int, optional
|
|
1230
|
+
:return: Returns the result object.
|
|
1231
|
+
""" # noqa: E501
|
|
1232
|
+
|
|
1233
|
+
_param = self._delete_pty_session_serialize(
|
|
1234
|
+
session_id=session_id,
|
|
1235
|
+
_request_auth=_request_auth,
|
|
1236
|
+
_content_type=_content_type,
|
|
1237
|
+
_headers=_headers,
|
|
1238
|
+
_host_index=_host_index
|
|
1239
|
+
)
|
|
1240
|
+
|
|
1241
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1242
|
+
'200': "Dict[str, object]",
|
|
1243
|
+
}
|
|
1244
|
+
response_data = await self.api_client.call_api(
|
|
1245
|
+
*_param,
|
|
1246
|
+
_request_timeout=_request_timeout
|
|
1247
|
+
)
|
|
1248
|
+
await response_data.read()
|
|
1249
|
+
return self.api_client.response_deserialize(
|
|
1250
|
+
response_data=response_data,
|
|
1251
|
+
response_types_map=_response_types_map,
|
|
1252
|
+
)
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
@validate_call
|
|
1256
|
+
async def delete_pty_session_without_preload_content(
|
|
1257
|
+
self,
|
|
1258
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
1259
|
+
_request_timeout: Union[
|
|
1260
|
+
None,
|
|
1261
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1262
|
+
Tuple[
|
|
1263
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1264
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1265
|
+
]
|
|
1266
|
+
] = None,
|
|
1267
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1268
|
+
_content_type: Optional[StrictStr] = None,
|
|
1269
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1270
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1271
|
+
) -> RESTResponseType:
|
|
1272
|
+
"""Delete a PTY session
|
|
1273
|
+
|
|
1274
|
+
Delete a pseudo-terminal session and terminate its process
|
|
1275
|
+
|
|
1276
|
+
:param session_id: PTY session ID (required)
|
|
1277
|
+
:type session_id: str
|
|
1278
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1279
|
+
number provided, it will be total request
|
|
1280
|
+
timeout. It can also be a pair (tuple) of
|
|
1281
|
+
(connection, read) timeouts.
|
|
1282
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1283
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1284
|
+
request; this effectively ignores the
|
|
1285
|
+
authentication in the spec for a single request.
|
|
1286
|
+
:type _request_auth: dict, optional
|
|
1287
|
+
:param _content_type: force content-type for the request.
|
|
1288
|
+
:type _content_type: str, Optional
|
|
1289
|
+
:param _headers: set to override the headers for a single
|
|
1290
|
+
request; this effectively ignores the headers
|
|
1291
|
+
in the spec for a single request.
|
|
1292
|
+
:type _headers: dict, optional
|
|
1293
|
+
:param _host_index: set to override the host_index for a single
|
|
1294
|
+
request; this effectively ignores the host_index
|
|
1295
|
+
in the spec for a single request.
|
|
1296
|
+
:type _host_index: int, optional
|
|
1297
|
+
:return: Returns the result object.
|
|
1298
|
+
""" # noqa: E501
|
|
1299
|
+
|
|
1300
|
+
_param = self._delete_pty_session_serialize(
|
|
1301
|
+
session_id=session_id,
|
|
1302
|
+
_request_auth=_request_auth,
|
|
1303
|
+
_content_type=_content_type,
|
|
1304
|
+
_headers=_headers,
|
|
1305
|
+
_host_index=_host_index
|
|
1306
|
+
)
|
|
1307
|
+
|
|
1308
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1309
|
+
'200': "Dict[str, object]",
|
|
1310
|
+
}
|
|
1311
|
+
response_data = await self.api_client.call_api(
|
|
1312
|
+
*_param,
|
|
1313
|
+
_request_timeout=_request_timeout
|
|
1314
|
+
)
|
|
1315
|
+
return response_data.response
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
def _delete_pty_session_serialize(
|
|
1319
|
+
self,
|
|
1320
|
+
session_id,
|
|
1321
|
+
_request_auth,
|
|
1322
|
+
_content_type,
|
|
1323
|
+
_headers,
|
|
1324
|
+
_host_index,
|
|
1325
|
+
) -> RequestSerialized:
|
|
1326
|
+
|
|
1327
|
+
_host = None
|
|
1328
|
+
|
|
1329
|
+
_collection_formats: Dict[str, str] = {
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
_path_params: Dict[str, str] = {}
|
|
1333
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1334
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1335
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1336
|
+
_files: Dict[
|
|
1337
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1338
|
+
] = {}
|
|
1339
|
+
_body_params: Optional[bytes] = None
|
|
1340
|
+
|
|
1341
|
+
# process the path parameters
|
|
1342
|
+
if session_id is not None:
|
|
1343
|
+
_path_params['sessionId'] = session_id
|
|
1344
|
+
# process the query parameters
|
|
1345
|
+
# process the header parameters
|
|
1346
|
+
# process the form parameters
|
|
1347
|
+
# process the body parameter
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
# set the HTTP header `Accept`
|
|
1351
|
+
if 'Accept' not in _header_params:
|
|
1352
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1353
|
+
[
|
|
1354
|
+
'application/json'
|
|
1355
|
+
]
|
|
1356
|
+
)
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
# authentication setting
|
|
1360
|
+
_auth_settings: List[str] = [
|
|
1361
|
+
]
|
|
1362
|
+
|
|
1363
|
+
return self.api_client.param_serialize(
|
|
1364
|
+
method='DELETE',
|
|
1365
|
+
resource_path='/process/pty/{sessionId}',
|
|
1366
|
+
path_params=_path_params,
|
|
1367
|
+
query_params=_query_params,
|
|
1368
|
+
header_params=_header_params,
|
|
1369
|
+
body=_body_params,
|
|
1370
|
+
post_params=_form_params,
|
|
1371
|
+
files=_files,
|
|
1372
|
+
auth_settings=_auth_settings,
|
|
1373
|
+
collection_formats=_collection_formats,
|
|
1374
|
+
_host=_host,
|
|
1375
|
+
_request_auth=_request_auth
|
|
1376
|
+
)
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
@validate_call
|
|
1382
|
+
async def delete_session(
|
|
1383
|
+
self,
|
|
1384
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1385
|
+
_request_timeout: Union[
|
|
1386
|
+
None,
|
|
1387
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1388
|
+
Tuple[
|
|
1389
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1390
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1391
|
+
]
|
|
1392
|
+
] = None,
|
|
1393
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1394
|
+
_content_type: Optional[StrictStr] = None,
|
|
1395
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1396
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1397
|
+
) -> None:
|
|
1398
|
+
"""Delete a session
|
|
1399
|
+
|
|
1400
|
+
Delete an existing shell session
|
|
1401
|
+
|
|
1402
|
+
:param session_id: Session ID (required)
|
|
1403
|
+
:type session_id: str
|
|
1404
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1405
|
+
number provided, it will be total request
|
|
1406
|
+
timeout. It can also be a pair (tuple) of
|
|
1407
|
+
(connection, read) timeouts.
|
|
1408
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1409
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1410
|
+
request; this effectively ignores the
|
|
1411
|
+
authentication in the spec for a single request.
|
|
1412
|
+
:type _request_auth: dict, optional
|
|
1413
|
+
:param _content_type: force content-type for the request.
|
|
1414
|
+
:type _content_type: str, Optional
|
|
1415
|
+
:param _headers: set to override the headers for a single
|
|
1416
|
+
request; this effectively ignores the headers
|
|
1417
|
+
in the spec for a single request.
|
|
1418
|
+
:type _headers: dict, optional
|
|
1419
|
+
:param _host_index: set to override the host_index for a single
|
|
1420
|
+
request; this effectively ignores the host_index
|
|
1421
|
+
in the spec for a single request.
|
|
1422
|
+
:type _host_index: int, optional
|
|
1423
|
+
:return: Returns the result object.
|
|
1424
|
+
""" # noqa: E501
|
|
1425
|
+
|
|
1426
|
+
_param = self._delete_session_serialize(
|
|
1427
|
+
session_id=session_id,
|
|
1428
|
+
_request_auth=_request_auth,
|
|
1429
|
+
_content_type=_content_type,
|
|
1430
|
+
_headers=_headers,
|
|
1431
|
+
_host_index=_host_index
|
|
1432
|
+
)
|
|
1433
|
+
|
|
1434
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1435
|
+
'204': None,
|
|
1436
|
+
}
|
|
1437
|
+
response_data = await self.api_client.call_api(
|
|
1438
|
+
*_param,
|
|
1439
|
+
_request_timeout=_request_timeout
|
|
1440
|
+
)
|
|
1441
|
+
await response_data.read()
|
|
1442
|
+
return self.api_client.response_deserialize(
|
|
1443
|
+
response_data=response_data,
|
|
1444
|
+
response_types_map=_response_types_map,
|
|
1445
|
+
).data
|
|
1446
|
+
|
|
1447
|
+
|
|
1448
|
+
@validate_call
|
|
1449
|
+
async def delete_session_with_http_info(
|
|
1450
|
+
self,
|
|
1451
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1452
|
+
_request_timeout: Union[
|
|
1453
|
+
None,
|
|
1454
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1455
|
+
Tuple[
|
|
1456
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1457
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1458
|
+
]
|
|
1459
|
+
] = None,
|
|
1460
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1461
|
+
_content_type: Optional[StrictStr] = None,
|
|
1462
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1463
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1464
|
+
) -> ApiResponse[None]:
|
|
1465
|
+
"""Delete a session
|
|
1466
|
+
|
|
1467
|
+
Delete an existing shell session
|
|
1468
|
+
|
|
1469
|
+
:param session_id: Session ID (required)
|
|
1470
|
+
:type session_id: str
|
|
1471
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1472
|
+
number provided, it will be total request
|
|
1473
|
+
timeout. It can also be a pair (tuple) of
|
|
1474
|
+
(connection, read) timeouts.
|
|
1475
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1476
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1477
|
+
request; this effectively ignores the
|
|
1478
|
+
authentication in the spec for a single request.
|
|
1479
|
+
:type _request_auth: dict, optional
|
|
1480
|
+
:param _content_type: force content-type for the request.
|
|
1481
|
+
:type _content_type: str, Optional
|
|
1482
|
+
:param _headers: set to override the headers for a single
|
|
1483
|
+
request; this effectively ignores the headers
|
|
1484
|
+
in the spec for a single request.
|
|
1485
|
+
:type _headers: dict, optional
|
|
1486
|
+
:param _host_index: set to override the host_index for a single
|
|
1487
|
+
request; this effectively ignores the host_index
|
|
1488
|
+
in the spec for a single request.
|
|
1489
|
+
:type _host_index: int, optional
|
|
1490
|
+
:return: Returns the result object.
|
|
1491
|
+
""" # noqa: E501
|
|
1492
|
+
|
|
1493
|
+
_param = self._delete_session_serialize(
|
|
1494
|
+
session_id=session_id,
|
|
1495
|
+
_request_auth=_request_auth,
|
|
1496
|
+
_content_type=_content_type,
|
|
1497
|
+
_headers=_headers,
|
|
1498
|
+
_host_index=_host_index
|
|
1499
|
+
)
|
|
1500
|
+
|
|
1501
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1502
|
+
'204': None,
|
|
1503
|
+
}
|
|
1504
|
+
response_data = await self.api_client.call_api(
|
|
1505
|
+
*_param,
|
|
1506
|
+
_request_timeout=_request_timeout
|
|
1507
|
+
)
|
|
1508
|
+
await response_data.read()
|
|
1509
|
+
return self.api_client.response_deserialize(
|
|
1510
|
+
response_data=response_data,
|
|
1511
|
+
response_types_map=_response_types_map,
|
|
1512
|
+
)
|
|
1513
|
+
|
|
1514
|
+
|
|
1515
|
+
@validate_call
|
|
1516
|
+
async def delete_session_without_preload_content(
|
|
1517
|
+
self,
|
|
1518
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1519
|
+
_request_timeout: Union[
|
|
1520
|
+
None,
|
|
1521
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1522
|
+
Tuple[
|
|
1523
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1524
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1525
|
+
]
|
|
1526
|
+
] = None,
|
|
1527
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1528
|
+
_content_type: Optional[StrictStr] = None,
|
|
1529
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1530
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1531
|
+
) -> RESTResponseType:
|
|
1532
|
+
"""Delete a session
|
|
1533
|
+
|
|
1534
|
+
Delete an existing shell session
|
|
1535
|
+
|
|
1536
|
+
:param session_id: Session ID (required)
|
|
1537
|
+
:type session_id: str
|
|
1538
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1539
|
+
number provided, it will be total request
|
|
1540
|
+
timeout. It can also be a pair (tuple) of
|
|
1541
|
+
(connection, read) timeouts.
|
|
1542
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1543
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1544
|
+
request; this effectively ignores the
|
|
1545
|
+
authentication in the spec for a single request.
|
|
1546
|
+
:type _request_auth: dict, optional
|
|
1547
|
+
:param _content_type: force content-type for the request.
|
|
1548
|
+
:type _content_type: str, Optional
|
|
1549
|
+
:param _headers: set to override the headers for a single
|
|
1550
|
+
request; this effectively ignores the headers
|
|
1551
|
+
in the spec for a single request.
|
|
1552
|
+
:type _headers: dict, optional
|
|
1553
|
+
:param _host_index: set to override the host_index for a single
|
|
1554
|
+
request; this effectively ignores the host_index
|
|
1555
|
+
in the spec for a single request.
|
|
1556
|
+
:type _host_index: int, optional
|
|
1557
|
+
:return: Returns the result object.
|
|
1558
|
+
""" # noqa: E501
|
|
1559
|
+
|
|
1560
|
+
_param = self._delete_session_serialize(
|
|
1561
|
+
session_id=session_id,
|
|
1562
|
+
_request_auth=_request_auth,
|
|
1563
|
+
_content_type=_content_type,
|
|
1564
|
+
_headers=_headers,
|
|
1565
|
+
_host_index=_host_index
|
|
1566
|
+
)
|
|
1567
|
+
|
|
1568
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1569
|
+
'204': None,
|
|
1570
|
+
}
|
|
1571
|
+
response_data = await self.api_client.call_api(
|
|
1572
|
+
*_param,
|
|
1573
|
+
_request_timeout=_request_timeout
|
|
1574
|
+
)
|
|
1575
|
+
return response_data.response
|
|
1576
|
+
|
|
1577
|
+
|
|
1578
|
+
def _delete_session_serialize(
|
|
1579
|
+
self,
|
|
1580
|
+
session_id,
|
|
1581
|
+
_request_auth,
|
|
1582
|
+
_content_type,
|
|
1583
|
+
_headers,
|
|
1584
|
+
_host_index,
|
|
1585
|
+
) -> RequestSerialized:
|
|
1586
|
+
|
|
1587
|
+
_host = None
|
|
1588
|
+
|
|
1589
|
+
_collection_formats: Dict[str, str] = {
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
_path_params: Dict[str, str] = {}
|
|
1593
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1594
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1595
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1596
|
+
_files: Dict[
|
|
1597
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1598
|
+
] = {}
|
|
1599
|
+
_body_params: Optional[bytes] = None
|
|
1600
|
+
|
|
1601
|
+
# process the path parameters
|
|
1602
|
+
if session_id is not None:
|
|
1603
|
+
_path_params['sessionId'] = session_id
|
|
1604
|
+
# process the query parameters
|
|
1605
|
+
# process the header parameters
|
|
1606
|
+
# process the form parameters
|
|
1607
|
+
# process the body parameter
|
|
1608
|
+
|
|
1609
|
+
|
|
1610
|
+
|
|
1611
|
+
|
|
1612
|
+
# authentication setting
|
|
1613
|
+
_auth_settings: List[str] = [
|
|
1614
|
+
]
|
|
1615
|
+
|
|
1616
|
+
return self.api_client.param_serialize(
|
|
1617
|
+
method='DELETE',
|
|
1618
|
+
resource_path='/process/session/{sessionId}',
|
|
1619
|
+
path_params=_path_params,
|
|
1620
|
+
query_params=_query_params,
|
|
1621
|
+
header_params=_header_params,
|
|
1622
|
+
body=_body_params,
|
|
1623
|
+
post_params=_form_params,
|
|
1624
|
+
files=_files,
|
|
1625
|
+
auth_settings=_auth_settings,
|
|
1626
|
+
collection_formats=_collection_formats,
|
|
1627
|
+
_host=_host,
|
|
1628
|
+
_request_auth=_request_auth
|
|
1629
|
+
)
|
|
1630
|
+
|
|
1631
|
+
|
|
1632
|
+
|
|
1633
|
+
|
|
1634
|
+
@validate_call
|
|
1635
|
+
async def execute_command(
|
|
1636
|
+
self,
|
|
1637
|
+
request: Annotated[ExecuteRequest, Field(description="Command execution request")],
|
|
1638
|
+
_request_timeout: Union[
|
|
1639
|
+
None,
|
|
1640
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1641
|
+
Tuple[
|
|
1642
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1643
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1644
|
+
]
|
|
1645
|
+
] = None,
|
|
1646
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1647
|
+
_content_type: Optional[StrictStr] = None,
|
|
1648
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1649
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1650
|
+
) -> ExecuteResponse:
|
|
1651
|
+
"""Execute a command
|
|
1652
|
+
|
|
1653
|
+
Execute a shell command and return the output and exit code
|
|
1654
|
+
|
|
1655
|
+
:param request: Command execution request (required)
|
|
1656
|
+
:type request: ExecuteRequest
|
|
1657
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1658
|
+
number provided, it will be total request
|
|
1659
|
+
timeout. It can also be a pair (tuple) of
|
|
1660
|
+
(connection, read) timeouts.
|
|
1661
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1662
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1663
|
+
request; this effectively ignores the
|
|
1664
|
+
authentication in the spec for a single request.
|
|
1665
|
+
:type _request_auth: dict, optional
|
|
1666
|
+
:param _content_type: force content-type for the request.
|
|
1667
|
+
:type _content_type: str, Optional
|
|
1668
|
+
:param _headers: set to override the headers for a single
|
|
1669
|
+
request; this effectively ignores the headers
|
|
1670
|
+
in the spec for a single request.
|
|
1671
|
+
:type _headers: dict, optional
|
|
1672
|
+
:param _host_index: set to override the host_index for a single
|
|
1673
|
+
request; this effectively ignores the host_index
|
|
1674
|
+
in the spec for a single request.
|
|
1675
|
+
:type _host_index: int, optional
|
|
1676
|
+
:return: Returns the result object.
|
|
1677
|
+
""" # noqa: E501
|
|
1678
|
+
|
|
1679
|
+
_param = self._execute_command_serialize(
|
|
1680
|
+
request=request,
|
|
1681
|
+
_request_auth=_request_auth,
|
|
1682
|
+
_content_type=_content_type,
|
|
1683
|
+
_headers=_headers,
|
|
1684
|
+
_host_index=_host_index
|
|
1685
|
+
)
|
|
1686
|
+
|
|
1687
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1688
|
+
'200': "ExecuteResponse",
|
|
1689
|
+
}
|
|
1690
|
+
response_data = await self.api_client.call_api(
|
|
1691
|
+
*_param,
|
|
1692
|
+
_request_timeout=_request_timeout
|
|
1693
|
+
)
|
|
1694
|
+
await response_data.read()
|
|
1695
|
+
return self.api_client.response_deserialize(
|
|
1696
|
+
response_data=response_data,
|
|
1697
|
+
response_types_map=_response_types_map,
|
|
1698
|
+
).data
|
|
1699
|
+
|
|
1700
|
+
|
|
1701
|
+
@validate_call
|
|
1702
|
+
async def execute_command_with_http_info(
|
|
1703
|
+
self,
|
|
1704
|
+
request: Annotated[ExecuteRequest, Field(description="Command execution request")],
|
|
1705
|
+
_request_timeout: Union[
|
|
1706
|
+
None,
|
|
1707
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1708
|
+
Tuple[
|
|
1709
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1710
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1711
|
+
]
|
|
1712
|
+
] = None,
|
|
1713
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1714
|
+
_content_type: Optional[StrictStr] = None,
|
|
1715
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1716
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1717
|
+
) -> ApiResponse[ExecuteResponse]:
|
|
1718
|
+
"""Execute a command
|
|
1719
|
+
|
|
1720
|
+
Execute a shell command and return the output and exit code
|
|
1721
|
+
|
|
1722
|
+
:param request: Command execution request (required)
|
|
1723
|
+
:type request: ExecuteRequest
|
|
1724
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1725
|
+
number provided, it will be total request
|
|
1726
|
+
timeout. It can also be a pair (tuple) of
|
|
1727
|
+
(connection, read) timeouts.
|
|
1728
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1729
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1730
|
+
request; this effectively ignores the
|
|
1731
|
+
authentication in the spec for a single request.
|
|
1732
|
+
:type _request_auth: dict, optional
|
|
1733
|
+
:param _content_type: force content-type for the request.
|
|
1734
|
+
:type _content_type: str, Optional
|
|
1735
|
+
:param _headers: set to override the headers for a single
|
|
1736
|
+
request; this effectively ignores the headers
|
|
1737
|
+
in the spec for a single request.
|
|
1738
|
+
:type _headers: dict, optional
|
|
1739
|
+
:param _host_index: set to override the host_index for a single
|
|
1740
|
+
request; this effectively ignores the host_index
|
|
1741
|
+
in the spec for a single request.
|
|
1742
|
+
:type _host_index: int, optional
|
|
1743
|
+
:return: Returns the result object.
|
|
1744
|
+
""" # noqa: E501
|
|
1745
|
+
|
|
1746
|
+
_param = self._execute_command_serialize(
|
|
1747
|
+
request=request,
|
|
1748
|
+
_request_auth=_request_auth,
|
|
1749
|
+
_content_type=_content_type,
|
|
1750
|
+
_headers=_headers,
|
|
1751
|
+
_host_index=_host_index
|
|
1752
|
+
)
|
|
1753
|
+
|
|
1754
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1755
|
+
'200': "ExecuteResponse",
|
|
1756
|
+
}
|
|
1757
|
+
response_data = await self.api_client.call_api(
|
|
1758
|
+
*_param,
|
|
1759
|
+
_request_timeout=_request_timeout
|
|
1760
|
+
)
|
|
1761
|
+
await response_data.read()
|
|
1762
|
+
return self.api_client.response_deserialize(
|
|
1763
|
+
response_data=response_data,
|
|
1764
|
+
response_types_map=_response_types_map,
|
|
1765
|
+
)
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
@validate_call
|
|
1769
|
+
async def execute_command_without_preload_content(
|
|
1770
|
+
self,
|
|
1771
|
+
request: Annotated[ExecuteRequest, Field(description="Command execution request")],
|
|
1772
|
+
_request_timeout: Union[
|
|
1773
|
+
None,
|
|
1774
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1775
|
+
Tuple[
|
|
1776
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1777
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1778
|
+
]
|
|
1779
|
+
] = None,
|
|
1780
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1781
|
+
_content_type: Optional[StrictStr] = None,
|
|
1782
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1783
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1784
|
+
) -> RESTResponseType:
|
|
1785
|
+
"""Execute a command
|
|
1786
|
+
|
|
1787
|
+
Execute a shell command and return the output and exit code
|
|
1788
|
+
|
|
1789
|
+
:param request: Command execution request (required)
|
|
1790
|
+
:type request: ExecuteRequest
|
|
1791
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1792
|
+
number provided, it will be total request
|
|
1793
|
+
timeout. It can also be a pair (tuple) of
|
|
1794
|
+
(connection, read) timeouts.
|
|
1795
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1796
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1797
|
+
request; this effectively ignores the
|
|
1798
|
+
authentication in the spec for a single request.
|
|
1799
|
+
:type _request_auth: dict, optional
|
|
1800
|
+
:param _content_type: force content-type for the request.
|
|
1801
|
+
:type _content_type: str, Optional
|
|
1802
|
+
:param _headers: set to override the headers for a single
|
|
1803
|
+
request; this effectively ignores the headers
|
|
1804
|
+
in the spec for a single request.
|
|
1805
|
+
:type _headers: dict, optional
|
|
1806
|
+
:param _host_index: set to override the host_index for a single
|
|
1807
|
+
request; this effectively ignores the host_index
|
|
1808
|
+
in the spec for a single request.
|
|
1809
|
+
:type _host_index: int, optional
|
|
1810
|
+
:return: Returns the result object.
|
|
1811
|
+
""" # noqa: E501
|
|
1812
|
+
|
|
1813
|
+
_param = self._execute_command_serialize(
|
|
1814
|
+
request=request,
|
|
1815
|
+
_request_auth=_request_auth,
|
|
1816
|
+
_content_type=_content_type,
|
|
1817
|
+
_headers=_headers,
|
|
1818
|
+
_host_index=_host_index
|
|
1819
|
+
)
|
|
1820
|
+
|
|
1821
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1822
|
+
'200': "ExecuteResponse",
|
|
1823
|
+
}
|
|
1824
|
+
response_data = await self.api_client.call_api(
|
|
1825
|
+
*_param,
|
|
1826
|
+
_request_timeout=_request_timeout
|
|
1827
|
+
)
|
|
1828
|
+
return response_data.response
|
|
1829
|
+
|
|
1830
|
+
|
|
1831
|
+
def _execute_command_serialize(
|
|
1832
|
+
self,
|
|
1833
|
+
request,
|
|
1834
|
+
_request_auth,
|
|
1835
|
+
_content_type,
|
|
1836
|
+
_headers,
|
|
1837
|
+
_host_index,
|
|
1838
|
+
) -> RequestSerialized:
|
|
1839
|
+
|
|
1840
|
+
_host = None
|
|
1841
|
+
|
|
1842
|
+
_collection_formats: Dict[str, str] = {
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
_path_params: Dict[str, str] = {}
|
|
1846
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1847
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1848
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1849
|
+
_files: Dict[
|
|
1850
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1851
|
+
] = {}
|
|
1852
|
+
_body_params: Optional[bytes] = None
|
|
1853
|
+
|
|
1854
|
+
# process the path parameters
|
|
1855
|
+
# process the query parameters
|
|
1856
|
+
# process the header parameters
|
|
1857
|
+
# process the form parameters
|
|
1858
|
+
# process the body parameter
|
|
1859
|
+
if request is not None:
|
|
1860
|
+
_body_params = request
|
|
1861
|
+
|
|
1862
|
+
|
|
1863
|
+
# set the HTTP header `Accept`
|
|
1864
|
+
if 'Accept' not in _header_params:
|
|
1865
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1866
|
+
[
|
|
1867
|
+
'application/json'
|
|
1868
|
+
]
|
|
1869
|
+
)
|
|
1870
|
+
|
|
1871
|
+
# set the HTTP header `Content-Type`
|
|
1872
|
+
if _content_type:
|
|
1873
|
+
_header_params['Content-Type'] = _content_type
|
|
1874
|
+
else:
|
|
1875
|
+
_default_content_type = (
|
|
1876
|
+
self.api_client.select_header_content_type(
|
|
1877
|
+
[
|
|
1878
|
+
'application/json'
|
|
1879
|
+
]
|
|
1880
|
+
)
|
|
1881
|
+
)
|
|
1882
|
+
if _default_content_type is not None:
|
|
1883
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1884
|
+
|
|
1885
|
+
# authentication setting
|
|
1886
|
+
_auth_settings: List[str] = [
|
|
1887
|
+
]
|
|
1888
|
+
|
|
1889
|
+
return self.api_client.param_serialize(
|
|
1890
|
+
method='POST',
|
|
1891
|
+
resource_path='/process/execute',
|
|
1892
|
+
path_params=_path_params,
|
|
1893
|
+
query_params=_query_params,
|
|
1894
|
+
header_params=_header_params,
|
|
1895
|
+
body=_body_params,
|
|
1896
|
+
post_params=_form_params,
|
|
1897
|
+
files=_files,
|
|
1898
|
+
auth_settings=_auth_settings,
|
|
1899
|
+
collection_formats=_collection_formats,
|
|
1900
|
+
_host=_host,
|
|
1901
|
+
_request_auth=_request_auth
|
|
1902
|
+
)
|
|
1903
|
+
|
|
1904
|
+
|
|
1905
|
+
|
|
1906
|
+
|
|
1907
|
+
@validate_call
|
|
1908
|
+
async def get_entrypoint_logs(
|
|
1909
|
+
self,
|
|
1910
|
+
follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
|
|
1911
|
+
_request_timeout: Union[
|
|
1912
|
+
None,
|
|
1913
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1914
|
+
Tuple[
|
|
1915
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1916
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1917
|
+
]
|
|
1918
|
+
] = None,
|
|
1919
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1920
|
+
_content_type: Optional[StrictStr] = None,
|
|
1921
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1922
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1923
|
+
) -> SessionCommandLogsResponse:
|
|
1924
|
+
"""Get entrypoint logs
|
|
1925
|
+
|
|
1926
|
+
Get logs for a sandbox entrypoint session. Returns JSON with separated stdout/stderr for SDK >= 0.161.0, plain text otherwise. Supports WebSocket streaming.
|
|
1927
|
+
|
|
1928
|
+
:param follow: Follow logs in real-time (WebSocket only)
|
|
1929
|
+
:type follow: bool
|
|
1930
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1931
|
+
number provided, it will be total request
|
|
1932
|
+
timeout. It can also be a pair (tuple) of
|
|
1933
|
+
(connection, read) timeouts.
|
|
1934
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1935
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1936
|
+
request; this effectively ignores the
|
|
1937
|
+
authentication in the spec for a single request.
|
|
1938
|
+
:type _request_auth: dict, optional
|
|
1939
|
+
:param _content_type: force content-type for the request.
|
|
1940
|
+
:type _content_type: str, Optional
|
|
1941
|
+
:param _headers: set to override the headers for a single
|
|
1942
|
+
request; this effectively ignores the headers
|
|
1943
|
+
in the spec for a single request.
|
|
1944
|
+
:type _headers: dict, optional
|
|
1945
|
+
:param _host_index: set to override the host_index for a single
|
|
1946
|
+
request; this effectively ignores the host_index
|
|
1947
|
+
in the spec for a single request.
|
|
1948
|
+
:type _host_index: int, optional
|
|
1949
|
+
:return: Returns the result object.
|
|
1950
|
+
""" # noqa: E501
|
|
1951
|
+
|
|
1952
|
+
_param = self._get_entrypoint_logs_serialize(
|
|
1953
|
+
follow=follow,
|
|
1954
|
+
_request_auth=_request_auth,
|
|
1955
|
+
_content_type=_content_type,
|
|
1956
|
+
_headers=_headers,
|
|
1957
|
+
_host_index=_host_index
|
|
1958
|
+
)
|
|
1959
|
+
|
|
1960
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1961
|
+
'200': "SessionCommandLogsResponse",
|
|
1962
|
+
}
|
|
1963
|
+
response_data = await self.api_client.call_api(
|
|
1964
|
+
*_param,
|
|
1965
|
+
_request_timeout=_request_timeout
|
|
1966
|
+
)
|
|
1967
|
+
await response_data.read()
|
|
1968
|
+
return self.api_client.response_deserialize(
|
|
1969
|
+
response_data=response_data,
|
|
1970
|
+
response_types_map=_response_types_map,
|
|
1971
|
+
).data
|
|
1972
|
+
|
|
1973
|
+
|
|
1974
|
+
@validate_call
|
|
1975
|
+
async def get_entrypoint_logs_with_http_info(
|
|
1976
|
+
self,
|
|
1977
|
+
follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
|
|
1978
|
+
_request_timeout: Union[
|
|
1979
|
+
None,
|
|
1980
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1981
|
+
Tuple[
|
|
1982
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1983
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1984
|
+
]
|
|
1985
|
+
] = None,
|
|
1986
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1987
|
+
_content_type: Optional[StrictStr] = None,
|
|
1988
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1989
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1990
|
+
) -> ApiResponse[SessionCommandLogsResponse]:
|
|
1991
|
+
"""Get entrypoint logs
|
|
1992
|
+
|
|
1993
|
+
Get logs for a sandbox entrypoint session. Returns JSON with separated stdout/stderr for SDK >= 0.161.0, plain text otherwise. Supports WebSocket streaming.
|
|
1994
|
+
|
|
1995
|
+
:param follow: Follow logs in real-time (WebSocket only)
|
|
1996
|
+
:type follow: bool
|
|
1997
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1998
|
+
number provided, it will be total request
|
|
1999
|
+
timeout. It can also be a pair (tuple) of
|
|
2000
|
+
(connection, read) timeouts.
|
|
2001
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2002
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2003
|
+
request; this effectively ignores the
|
|
2004
|
+
authentication in the spec for a single request.
|
|
2005
|
+
:type _request_auth: dict, optional
|
|
2006
|
+
:param _content_type: force content-type for the request.
|
|
2007
|
+
:type _content_type: str, Optional
|
|
2008
|
+
:param _headers: set to override the headers for a single
|
|
2009
|
+
request; this effectively ignores the headers
|
|
2010
|
+
in the spec for a single request.
|
|
2011
|
+
:type _headers: dict, optional
|
|
2012
|
+
:param _host_index: set to override the host_index for a single
|
|
2013
|
+
request; this effectively ignores the host_index
|
|
2014
|
+
in the spec for a single request.
|
|
2015
|
+
:type _host_index: int, optional
|
|
2016
|
+
:return: Returns the result object.
|
|
2017
|
+
""" # noqa: E501
|
|
2018
|
+
|
|
2019
|
+
_param = self._get_entrypoint_logs_serialize(
|
|
2020
|
+
follow=follow,
|
|
2021
|
+
_request_auth=_request_auth,
|
|
2022
|
+
_content_type=_content_type,
|
|
2023
|
+
_headers=_headers,
|
|
2024
|
+
_host_index=_host_index
|
|
2025
|
+
)
|
|
2026
|
+
|
|
2027
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2028
|
+
'200': "SessionCommandLogsResponse",
|
|
2029
|
+
}
|
|
2030
|
+
response_data = await self.api_client.call_api(
|
|
2031
|
+
*_param,
|
|
2032
|
+
_request_timeout=_request_timeout
|
|
2033
|
+
)
|
|
2034
|
+
await response_data.read()
|
|
2035
|
+
return self.api_client.response_deserialize(
|
|
2036
|
+
response_data=response_data,
|
|
2037
|
+
response_types_map=_response_types_map,
|
|
2038
|
+
)
|
|
2039
|
+
|
|
2040
|
+
|
|
2041
|
+
@validate_call
|
|
2042
|
+
async def get_entrypoint_logs_without_preload_content(
|
|
2043
|
+
self,
|
|
2044
|
+
follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
|
|
2045
|
+
_request_timeout: Union[
|
|
2046
|
+
None,
|
|
2047
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2048
|
+
Tuple[
|
|
2049
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2050
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2051
|
+
]
|
|
2052
|
+
] = None,
|
|
2053
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2054
|
+
_content_type: Optional[StrictStr] = None,
|
|
2055
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2056
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2057
|
+
) -> RESTResponseType:
|
|
2058
|
+
"""Get entrypoint logs
|
|
2059
|
+
|
|
2060
|
+
Get logs for a sandbox entrypoint session. Returns JSON with separated stdout/stderr for SDK >= 0.161.0, plain text otherwise. Supports WebSocket streaming.
|
|
2061
|
+
|
|
2062
|
+
:param follow: Follow logs in real-time (WebSocket only)
|
|
2063
|
+
:type follow: bool
|
|
2064
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2065
|
+
number provided, it will be total request
|
|
2066
|
+
timeout. It can also be a pair (tuple) of
|
|
2067
|
+
(connection, read) timeouts.
|
|
2068
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2069
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2070
|
+
request; this effectively ignores the
|
|
2071
|
+
authentication in the spec for a single request.
|
|
2072
|
+
:type _request_auth: dict, optional
|
|
2073
|
+
:param _content_type: force content-type for the request.
|
|
2074
|
+
:type _content_type: str, Optional
|
|
2075
|
+
:param _headers: set to override the headers for a single
|
|
2076
|
+
request; this effectively ignores the headers
|
|
2077
|
+
in the spec for a single request.
|
|
2078
|
+
:type _headers: dict, optional
|
|
2079
|
+
:param _host_index: set to override the host_index for a single
|
|
2080
|
+
request; this effectively ignores the host_index
|
|
2081
|
+
in the spec for a single request.
|
|
2082
|
+
:type _host_index: int, optional
|
|
2083
|
+
:return: Returns the result object.
|
|
2084
|
+
""" # noqa: E501
|
|
2085
|
+
|
|
2086
|
+
_param = self._get_entrypoint_logs_serialize(
|
|
2087
|
+
follow=follow,
|
|
2088
|
+
_request_auth=_request_auth,
|
|
2089
|
+
_content_type=_content_type,
|
|
2090
|
+
_headers=_headers,
|
|
2091
|
+
_host_index=_host_index
|
|
2092
|
+
)
|
|
2093
|
+
|
|
2094
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2095
|
+
'200': "SessionCommandLogsResponse",
|
|
2096
|
+
}
|
|
2097
|
+
response_data = await self.api_client.call_api(
|
|
2098
|
+
*_param,
|
|
2099
|
+
_request_timeout=_request_timeout
|
|
2100
|
+
)
|
|
2101
|
+
return response_data.response
|
|
2102
|
+
|
|
2103
|
+
|
|
2104
|
+
def _get_entrypoint_logs_serialize(
|
|
2105
|
+
self,
|
|
2106
|
+
follow,
|
|
2107
|
+
_request_auth,
|
|
2108
|
+
_content_type,
|
|
2109
|
+
_headers,
|
|
2110
|
+
_host_index,
|
|
2111
|
+
) -> RequestSerialized:
|
|
2112
|
+
|
|
2113
|
+
_host = None
|
|
2114
|
+
|
|
2115
|
+
_collection_formats: Dict[str, str] = {
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
_path_params: Dict[str, str] = {}
|
|
2119
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2120
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2121
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2122
|
+
_files: Dict[
|
|
2123
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2124
|
+
] = {}
|
|
2125
|
+
_body_params: Optional[bytes] = None
|
|
2126
|
+
|
|
2127
|
+
# process the path parameters
|
|
2128
|
+
# process the query parameters
|
|
2129
|
+
if follow is not None:
|
|
2130
|
+
|
|
2131
|
+
_query_params.append(('follow', follow))
|
|
2132
|
+
|
|
2133
|
+
# process the header parameters
|
|
2134
|
+
# process the form parameters
|
|
2135
|
+
# process the body parameter
|
|
2136
|
+
|
|
2137
|
+
|
|
2138
|
+
# set the HTTP header `Accept`
|
|
2139
|
+
if 'Accept' not in _header_params:
|
|
2140
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2141
|
+
[
|
|
2142
|
+
'application/json',
|
|
2143
|
+
'text/plain'
|
|
2144
|
+
]
|
|
2145
|
+
)
|
|
2146
|
+
|
|
2147
|
+
|
|
2148
|
+
# authentication setting
|
|
2149
|
+
_auth_settings: List[str] = [
|
|
2150
|
+
]
|
|
2151
|
+
|
|
2152
|
+
return self.api_client.param_serialize(
|
|
2153
|
+
method='GET',
|
|
2154
|
+
resource_path='/process/session/entrypoint/logs',
|
|
2155
|
+
path_params=_path_params,
|
|
2156
|
+
query_params=_query_params,
|
|
2157
|
+
header_params=_header_params,
|
|
2158
|
+
body=_body_params,
|
|
2159
|
+
post_params=_form_params,
|
|
2160
|
+
files=_files,
|
|
2161
|
+
auth_settings=_auth_settings,
|
|
2162
|
+
collection_formats=_collection_formats,
|
|
2163
|
+
_host=_host,
|
|
2164
|
+
_request_auth=_request_auth
|
|
2165
|
+
)
|
|
2166
|
+
|
|
2167
|
+
|
|
2168
|
+
|
|
2169
|
+
|
|
2170
|
+
@validate_call
|
|
2171
|
+
async def get_entrypoint_session(
|
|
2172
|
+
self,
|
|
2173
|
+
_request_timeout: Union[
|
|
2174
|
+
None,
|
|
2175
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2176
|
+
Tuple[
|
|
2177
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2178
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2179
|
+
]
|
|
2180
|
+
] = None,
|
|
2181
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2182
|
+
_content_type: Optional[StrictStr] = None,
|
|
2183
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2184
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2185
|
+
) -> Session:
|
|
2186
|
+
"""Get entrypoint session details
|
|
2187
|
+
|
|
2188
|
+
Get details of an entrypoint session including its commands
|
|
2189
|
+
|
|
2190
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2191
|
+
number provided, it will be total request
|
|
2192
|
+
timeout. It can also be a pair (tuple) of
|
|
2193
|
+
(connection, read) timeouts.
|
|
2194
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2195
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2196
|
+
request; this effectively ignores the
|
|
2197
|
+
authentication in the spec for a single request.
|
|
2198
|
+
:type _request_auth: dict, optional
|
|
2199
|
+
:param _content_type: force content-type for the request.
|
|
2200
|
+
:type _content_type: str, Optional
|
|
2201
|
+
:param _headers: set to override the headers for a single
|
|
2202
|
+
request; this effectively ignores the headers
|
|
2203
|
+
in the spec for a single request.
|
|
2204
|
+
:type _headers: dict, optional
|
|
2205
|
+
:param _host_index: set to override the host_index for a single
|
|
2206
|
+
request; this effectively ignores the host_index
|
|
2207
|
+
in the spec for a single request.
|
|
2208
|
+
:type _host_index: int, optional
|
|
2209
|
+
:return: Returns the result object.
|
|
2210
|
+
""" # noqa: E501
|
|
2211
|
+
|
|
2212
|
+
_param = self._get_entrypoint_session_serialize(
|
|
2213
|
+
_request_auth=_request_auth,
|
|
2214
|
+
_content_type=_content_type,
|
|
2215
|
+
_headers=_headers,
|
|
2216
|
+
_host_index=_host_index
|
|
2217
|
+
)
|
|
2218
|
+
|
|
2219
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2220
|
+
'200': "Session",
|
|
2221
|
+
}
|
|
2222
|
+
response_data = await self.api_client.call_api(
|
|
2223
|
+
*_param,
|
|
2224
|
+
_request_timeout=_request_timeout
|
|
2225
|
+
)
|
|
2226
|
+
await response_data.read()
|
|
2227
|
+
return self.api_client.response_deserialize(
|
|
2228
|
+
response_data=response_data,
|
|
2229
|
+
response_types_map=_response_types_map,
|
|
2230
|
+
).data
|
|
2231
|
+
|
|
2232
|
+
|
|
2233
|
+
@validate_call
|
|
2234
|
+
async def get_entrypoint_session_with_http_info(
|
|
2235
|
+
self,
|
|
2236
|
+
_request_timeout: Union[
|
|
2237
|
+
None,
|
|
2238
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2239
|
+
Tuple[
|
|
2240
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2241
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2242
|
+
]
|
|
2243
|
+
] = None,
|
|
2244
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2245
|
+
_content_type: Optional[StrictStr] = None,
|
|
2246
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2247
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2248
|
+
) -> ApiResponse[Session]:
|
|
2249
|
+
"""Get entrypoint session details
|
|
2250
|
+
|
|
2251
|
+
Get details of an entrypoint session including its commands
|
|
2252
|
+
|
|
2253
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2254
|
+
number provided, it will be total request
|
|
2255
|
+
timeout. It can also be a pair (tuple) of
|
|
2256
|
+
(connection, read) timeouts.
|
|
2257
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2258
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2259
|
+
request; this effectively ignores the
|
|
2260
|
+
authentication in the spec for a single request.
|
|
2261
|
+
:type _request_auth: dict, optional
|
|
2262
|
+
:param _content_type: force content-type for the request.
|
|
2263
|
+
:type _content_type: str, Optional
|
|
2264
|
+
:param _headers: set to override the headers for a single
|
|
2265
|
+
request; this effectively ignores the headers
|
|
2266
|
+
in the spec for a single request.
|
|
2267
|
+
:type _headers: dict, optional
|
|
2268
|
+
:param _host_index: set to override the host_index for a single
|
|
2269
|
+
request; this effectively ignores the host_index
|
|
2270
|
+
in the spec for a single request.
|
|
2271
|
+
:type _host_index: int, optional
|
|
2272
|
+
:return: Returns the result object.
|
|
2273
|
+
""" # noqa: E501
|
|
2274
|
+
|
|
2275
|
+
_param = self._get_entrypoint_session_serialize(
|
|
2276
|
+
_request_auth=_request_auth,
|
|
2277
|
+
_content_type=_content_type,
|
|
2278
|
+
_headers=_headers,
|
|
2279
|
+
_host_index=_host_index
|
|
2280
|
+
)
|
|
2281
|
+
|
|
2282
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2283
|
+
'200': "Session",
|
|
2284
|
+
}
|
|
2285
|
+
response_data = await self.api_client.call_api(
|
|
2286
|
+
*_param,
|
|
2287
|
+
_request_timeout=_request_timeout
|
|
2288
|
+
)
|
|
2289
|
+
await response_data.read()
|
|
2290
|
+
return self.api_client.response_deserialize(
|
|
2291
|
+
response_data=response_data,
|
|
2292
|
+
response_types_map=_response_types_map,
|
|
2293
|
+
)
|
|
2294
|
+
|
|
2295
|
+
|
|
2296
|
+
@validate_call
|
|
2297
|
+
async def get_entrypoint_session_without_preload_content(
|
|
2298
|
+
self,
|
|
2299
|
+
_request_timeout: Union[
|
|
2300
|
+
None,
|
|
2301
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2302
|
+
Tuple[
|
|
2303
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2304
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2305
|
+
]
|
|
2306
|
+
] = None,
|
|
2307
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2308
|
+
_content_type: Optional[StrictStr] = None,
|
|
2309
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2310
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2311
|
+
) -> RESTResponseType:
|
|
2312
|
+
"""Get entrypoint session details
|
|
2313
|
+
|
|
2314
|
+
Get details of an entrypoint session including its commands
|
|
2315
|
+
|
|
2316
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2317
|
+
number provided, it will be total request
|
|
2318
|
+
timeout. It can also be a pair (tuple) of
|
|
2319
|
+
(connection, read) timeouts.
|
|
2320
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2321
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2322
|
+
request; this effectively ignores the
|
|
2323
|
+
authentication in the spec for a single request.
|
|
2324
|
+
:type _request_auth: dict, optional
|
|
2325
|
+
:param _content_type: force content-type for the request.
|
|
2326
|
+
:type _content_type: str, Optional
|
|
2327
|
+
:param _headers: set to override the headers for a single
|
|
2328
|
+
request; this effectively ignores the headers
|
|
2329
|
+
in the spec for a single request.
|
|
2330
|
+
:type _headers: dict, optional
|
|
2331
|
+
:param _host_index: set to override the host_index for a single
|
|
2332
|
+
request; this effectively ignores the host_index
|
|
2333
|
+
in the spec for a single request.
|
|
2334
|
+
:type _host_index: int, optional
|
|
2335
|
+
:return: Returns the result object.
|
|
2336
|
+
""" # noqa: E501
|
|
2337
|
+
|
|
2338
|
+
_param = self._get_entrypoint_session_serialize(
|
|
2339
|
+
_request_auth=_request_auth,
|
|
2340
|
+
_content_type=_content_type,
|
|
2341
|
+
_headers=_headers,
|
|
2342
|
+
_host_index=_host_index
|
|
2343
|
+
)
|
|
2344
|
+
|
|
2345
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2346
|
+
'200': "Session",
|
|
2347
|
+
}
|
|
2348
|
+
response_data = await self.api_client.call_api(
|
|
2349
|
+
*_param,
|
|
2350
|
+
_request_timeout=_request_timeout
|
|
2351
|
+
)
|
|
2352
|
+
return response_data.response
|
|
2353
|
+
|
|
2354
|
+
|
|
2355
|
+
def _get_entrypoint_session_serialize(
|
|
2356
|
+
self,
|
|
2357
|
+
_request_auth,
|
|
2358
|
+
_content_type,
|
|
2359
|
+
_headers,
|
|
2360
|
+
_host_index,
|
|
2361
|
+
) -> RequestSerialized:
|
|
2362
|
+
|
|
2363
|
+
_host = None
|
|
2364
|
+
|
|
2365
|
+
_collection_formats: Dict[str, str] = {
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
_path_params: Dict[str, str] = {}
|
|
2369
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2370
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2371
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2372
|
+
_files: Dict[
|
|
2373
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2374
|
+
] = {}
|
|
2375
|
+
_body_params: Optional[bytes] = None
|
|
2376
|
+
|
|
2377
|
+
# process the path parameters
|
|
2378
|
+
# process the query parameters
|
|
2379
|
+
# process the header parameters
|
|
2380
|
+
# process the form parameters
|
|
2381
|
+
# process the body parameter
|
|
2382
|
+
|
|
2383
|
+
|
|
2384
|
+
# set the HTTP header `Accept`
|
|
2385
|
+
if 'Accept' not in _header_params:
|
|
2386
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2387
|
+
[
|
|
2388
|
+
'application/json'
|
|
2389
|
+
]
|
|
2390
|
+
)
|
|
2391
|
+
|
|
2392
|
+
|
|
2393
|
+
# authentication setting
|
|
2394
|
+
_auth_settings: List[str] = [
|
|
2395
|
+
]
|
|
2396
|
+
|
|
2397
|
+
return self.api_client.param_serialize(
|
|
2398
|
+
method='GET',
|
|
2399
|
+
resource_path='/process/session/entrypoint',
|
|
2400
|
+
path_params=_path_params,
|
|
2401
|
+
query_params=_query_params,
|
|
2402
|
+
header_params=_header_params,
|
|
2403
|
+
body=_body_params,
|
|
2404
|
+
post_params=_form_params,
|
|
2405
|
+
files=_files,
|
|
2406
|
+
auth_settings=_auth_settings,
|
|
2407
|
+
collection_formats=_collection_formats,
|
|
2408
|
+
_host=_host,
|
|
2409
|
+
_request_auth=_request_auth
|
|
2410
|
+
)
|
|
2411
|
+
|
|
2412
|
+
|
|
2413
|
+
|
|
2414
|
+
|
|
2415
|
+
@validate_call
|
|
2416
|
+
async def get_pty_session(
|
|
2417
|
+
self,
|
|
2418
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
2419
|
+
_request_timeout: Union[
|
|
2420
|
+
None,
|
|
2421
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2422
|
+
Tuple[
|
|
2423
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2424
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2425
|
+
]
|
|
2426
|
+
] = None,
|
|
2427
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2428
|
+
_content_type: Optional[StrictStr] = None,
|
|
2429
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2430
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2431
|
+
) -> PtySessionInfo:
|
|
2432
|
+
"""Get PTY session information
|
|
2433
|
+
|
|
2434
|
+
Get detailed information about a specific pseudo-terminal session
|
|
2435
|
+
|
|
2436
|
+
:param session_id: PTY session ID (required)
|
|
2437
|
+
:type session_id: str
|
|
2438
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2439
|
+
number provided, it will be total request
|
|
2440
|
+
timeout. It can also be a pair (tuple) of
|
|
2441
|
+
(connection, read) timeouts.
|
|
2442
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2443
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2444
|
+
request; this effectively ignores the
|
|
2445
|
+
authentication in the spec for a single request.
|
|
2446
|
+
:type _request_auth: dict, optional
|
|
2447
|
+
:param _content_type: force content-type for the request.
|
|
2448
|
+
:type _content_type: str, Optional
|
|
2449
|
+
:param _headers: set to override the headers for a single
|
|
2450
|
+
request; this effectively ignores the headers
|
|
2451
|
+
in the spec for a single request.
|
|
2452
|
+
:type _headers: dict, optional
|
|
2453
|
+
:param _host_index: set to override the host_index for a single
|
|
2454
|
+
request; this effectively ignores the host_index
|
|
2455
|
+
in the spec for a single request.
|
|
2456
|
+
:type _host_index: int, optional
|
|
2457
|
+
:return: Returns the result object.
|
|
2458
|
+
""" # noqa: E501
|
|
2459
|
+
|
|
2460
|
+
_param = self._get_pty_session_serialize(
|
|
2461
|
+
session_id=session_id,
|
|
2462
|
+
_request_auth=_request_auth,
|
|
2463
|
+
_content_type=_content_type,
|
|
2464
|
+
_headers=_headers,
|
|
2465
|
+
_host_index=_host_index
|
|
2466
|
+
)
|
|
2467
|
+
|
|
2468
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2469
|
+
'200': "PtySessionInfo",
|
|
2470
|
+
}
|
|
2471
|
+
response_data = await self.api_client.call_api(
|
|
2472
|
+
*_param,
|
|
2473
|
+
_request_timeout=_request_timeout
|
|
2474
|
+
)
|
|
2475
|
+
await response_data.read()
|
|
2476
|
+
return self.api_client.response_deserialize(
|
|
2477
|
+
response_data=response_data,
|
|
2478
|
+
response_types_map=_response_types_map,
|
|
2479
|
+
).data
|
|
2480
|
+
|
|
2481
|
+
|
|
2482
|
+
@validate_call
|
|
2483
|
+
async def get_pty_session_with_http_info(
|
|
2484
|
+
self,
|
|
2485
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
2486
|
+
_request_timeout: Union[
|
|
2487
|
+
None,
|
|
2488
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2489
|
+
Tuple[
|
|
2490
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2491
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2492
|
+
]
|
|
2493
|
+
] = None,
|
|
2494
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2495
|
+
_content_type: Optional[StrictStr] = None,
|
|
2496
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2497
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2498
|
+
) -> ApiResponse[PtySessionInfo]:
|
|
2499
|
+
"""Get PTY session information
|
|
2500
|
+
|
|
2501
|
+
Get detailed information about a specific pseudo-terminal session
|
|
2502
|
+
|
|
2503
|
+
:param session_id: PTY session ID (required)
|
|
2504
|
+
:type session_id: str
|
|
2505
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2506
|
+
number provided, it will be total request
|
|
2507
|
+
timeout. It can also be a pair (tuple) of
|
|
2508
|
+
(connection, read) timeouts.
|
|
2509
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2510
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2511
|
+
request; this effectively ignores the
|
|
2512
|
+
authentication in the spec for a single request.
|
|
2513
|
+
:type _request_auth: dict, optional
|
|
2514
|
+
:param _content_type: force content-type for the request.
|
|
2515
|
+
:type _content_type: str, Optional
|
|
2516
|
+
:param _headers: set to override the headers for a single
|
|
2517
|
+
request; this effectively ignores the headers
|
|
2518
|
+
in the spec for a single request.
|
|
2519
|
+
:type _headers: dict, optional
|
|
2520
|
+
:param _host_index: set to override the host_index for a single
|
|
2521
|
+
request; this effectively ignores the host_index
|
|
2522
|
+
in the spec for a single request.
|
|
2523
|
+
:type _host_index: int, optional
|
|
2524
|
+
:return: Returns the result object.
|
|
2525
|
+
""" # noqa: E501
|
|
2526
|
+
|
|
2527
|
+
_param = self._get_pty_session_serialize(
|
|
2528
|
+
session_id=session_id,
|
|
2529
|
+
_request_auth=_request_auth,
|
|
2530
|
+
_content_type=_content_type,
|
|
2531
|
+
_headers=_headers,
|
|
2532
|
+
_host_index=_host_index
|
|
2533
|
+
)
|
|
2534
|
+
|
|
2535
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2536
|
+
'200': "PtySessionInfo",
|
|
2537
|
+
}
|
|
2538
|
+
response_data = await self.api_client.call_api(
|
|
2539
|
+
*_param,
|
|
2540
|
+
_request_timeout=_request_timeout
|
|
2541
|
+
)
|
|
2542
|
+
await response_data.read()
|
|
2543
|
+
return self.api_client.response_deserialize(
|
|
2544
|
+
response_data=response_data,
|
|
2545
|
+
response_types_map=_response_types_map,
|
|
2546
|
+
)
|
|
2547
|
+
|
|
2548
|
+
|
|
2549
|
+
@validate_call
|
|
2550
|
+
async def get_pty_session_without_preload_content(
|
|
2551
|
+
self,
|
|
2552
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
2553
|
+
_request_timeout: Union[
|
|
2554
|
+
None,
|
|
2555
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2556
|
+
Tuple[
|
|
2557
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2558
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2559
|
+
]
|
|
2560
|
+
] = None,
|
|
2561
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2562
|
+
_content_type: Optional[StrictStr] = None,
|
|
2563
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2564
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2565
|
+
) -> RESTResponseType:
|
|
2566
|
+
"""Get PTY session information
|
|
2567
|
+
|
|
2568
|
+
Get detailed information about a specific pseudo-terminal session
|
|
2569
|
+
|
|
2570
|
+
:param session_id: PTY session ID (required)
|
|
2571
|
+
:type session_id: str
|
|
2572
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2573
|
+
number provided, it will be total request
|
|
2574
|
+
timeout. It can also be a pair (tuple) of
|
|
2575
|
+
(connection, read) timeouts.
|
|
2576
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2577
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2578
|
+
request; this effectively ignores the
|
|
2579
|
+
authentication in the spec for a single request.
|
|
2580
|
+
:type _request_auth: dict, optional
|
|
2581
|
+
:param _content_type: force content-type for the request.
|
|
2582
|
+
:type _content_type: str, Optional
|
|
2583
|
+
:param _headers: set to override the headers for a single
|
|
2584
|
+
request; this effectively ignores the headers
|
|
2585
|
+
in the spec for a single request.
|
|
2586
|
+
:type _headers: dict, optional
|
|
2587
|
+
:param _host_index: set to override the host_index for a single
|
|
2588
|
+
request; this effectively ignores the host_index
|
|
2589
|
+
in the spec for a single request.
|
|
2590
|
+
:type _host_index: int, optional
|
|
2591
|
+
:return: Returns the result object.
|
|
2592
|
+
""" # noqa: E501
|
|
2593
|
+
|
|
2594
|
+
_param = self._get_pty_session_serialize(
|
|
2595
|
+
session_id=session_id,
|
|
2596
|
+
_request_auth=_request_auth,
|
|
2597
|
+
_content_type=_content_type,
|
|
2598
|
+
_headers=_headers,
|
|
2599
|
+
_host_index=_host_index
|
|
2600
|
+
)
|
|
2601
|
+
|
|
2602
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2603
|
+
'200': "PtySessionInfo",
|
|
2604
|
+
}
|
|
2605
|
+
response_data = await self.api_client.call_api(
|
|
2606
|
+
*_param,
|
|
2607
|
+
_request_timeout=_request_timeout
|
|
2608
|
+
)
|
|
2609
|
+
return response_data.response
|
|
2610
|
+
|
|
2611
|
+
|
|
2612
|
+
def _get_pty_session_serialize(
|
|
2613
|
+
self,
|
|
2614
|
+
session_id,
|
|
2615
|
+
_request_auth,
|
|
2616
|
+
_content_type,
|
|
2617
|
+
_headers,
|
|
2618
|
+
_host_index,
|
|
2619
|
+
) -> RequestSerialized:
|
|
2620
|
+
|
|
2621
|
+
_host = None
|
|
2622
|
+
|
|
2623
|
+
_collection_formats: Dict[str, str] = {
|
|
2624
|
+
}
|
|
2625
|
+
|
|
2626
|
+
_path_params: Dict[str, str] = {}
|
|
2627
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2628
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2629
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2630
|
+
_files: Dict[
|
|
2631
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2632
|
+
] = {}
|
|
2633
|
+
_body_params: Optional[bytes] = None
|
|
2634
|
+
|
|
2635
|
+
# process the path parameters
|
|
2636
|
+
if session_id is not None:
|
|
2637
|
+
_path_params['sessionId'] = session_id
|
|
2638
|
+
# process the query parameters
|
|
2639
|
+
# process the header parameters
|
|
2640
|
+
# process the form parameters
|
|
2641
|
+
# process the body parameter
|
|
2642
|
+
|
|
2643
|
+
|
|
2644
|
+
# set the HTTP header `Accept`
|
|
2645
|
+
if 'Accept' not in _header_params:
|
|
2646
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2647
|
+
[
|
|
2648
|
+
'application/json'
|
|
2649
|
+
]
|
|
2650
|
+
)
|
|
2651
|
+
|
|
2652
|
+
|
|
2653
|
+
# authentication setting
|
|
2654
|
+
_auth_settings: List[str] = [
|
|
2655
|
+
]
|
|
2656
|
+
|
|
2657
|
+
return self.api_client.param_serialize(
|
|
2658
|
+
method='GET',
|
|
2659
|
+
resource_path='/process/pty/{sessionId}',
|
|
2660
|
+
path_params=_path_params,
|
|
2661
|
+
query_params=_query_params,
|
|
2662
|
+
header_params=_header_params,
|
|
2663
|
+
body=_body_params,
|
|
2664
|
+
post_params=_form_params,
|
|
2665
|
+
files=_files,
|
|
2666
|
+
auth_settings=_auth_settings,
|
|
2667
|
+
collection_formats=_collection_formats,
|
|
2668
|
+
_host=_host,
|
|
2669
|
+
_request_auth=_request_auth
|
|
2670
|
+
)
|
|
2671
|
+
|
|
2672
|
+
|
|
2673
|
+
|
|
2674
|
+
|
|
2675
|
+
@validate_call
|
|
2676
|
+
async def get_session(
|
|
2677
|
+
self,
|
|
2678
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
2679
|
+
_request_timeout: Union[
|
|
2680
|
+
None,
|
|
2681
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2682
|
+
Tuple[
|
|
2683
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2684
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2685
|
+
]
|
|
2686
|
+
] = None,
|
|
2687
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2688
|
+
_content_type: Optional[StrictStr] = None,
|
|
2689
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2690
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2691
|
+
) -> Session:
|
|
2692
|
+
"""Get session details
|
|
2693
|
+
|
|
2694
|
+
Get details of a specific session including its commands
|
|
2695
|
+
|
|
2696
|
+
:param session_id: Session ID (required)
|
|
2697
|
+
:type session_id: str
|
|
2698
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2699
|
+
number provided, it will be total request
|
|
2700
|
+
timeout. It can also be a pair (tuple) of
|
|
2701
|
+
(connection, read) timeouts.
|
|
2702
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2703
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2704
|
+
request; this effectively ignores the
|
|
2705
|
+
authentication in the spec for a single request.
|
|
2706
|
+
:type _request_auth: dict, optional
|
|
2707
|
+
:param _content_type: force content-type for the request.
|
|
2708
|
+
:type _content_type: str, Optional
|
|
2709
|
+
:param _headers: set to override the headers for a single
|
|
2710
|
+
request; this effectively ignores the headers
|
|
2711
|
+
in the spec for a single request.
|
|
2712
|
+
:type _headers: dict, optional
|
|
2713
|
+
:param _host_index: set to override the host_index for a single
|
|
2714
|
+
request; this effectively ignores the host_index
|
|
2715
|
+
in the spec for a single request.
|
|
2716
|
+
:type _host_index: int, optional
|
|
2717
|
+
:return: Returns the result object.
|
|
2718
|
+
""" # noqa: E501
|
|
2719
|
+
|
|
2720
|
+
_param = self._get_session_serialize(
|
|
2721
|
+
session_id=session_id,
|
|
2722
|
+
_request_auth=_request_auth,
|
|
2723
|
+
_content_type=_content_type,
|
|
2724
|
+
_headers=_headers,
|
|
2725
|
+
_host_index=_host_index
|
|
2726
|
+
)
|
|
2727
|
+
|
|
2728
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2729
|
+
'200': "Session",
|
|
2730
|
+
}
|
|
2731
|
+
response_data = await self.api_client.call_api(
|
|
2732
|
+
*_param,
|
|
2733
|
+
_request_timeout=_request_timeout
|
|
2734
|
+
)
|
|
2735
|
+
await response_data.read()
|
|
2736
|
+
return self.api_client.response_deserialize(
|
|
2737
|
+
response_data=response_data,
|
|
2738
|
+
response_types_map=_response_types_map,
|
|
2739
|
+
).data
|
|
2740
|
+
|
|
2741
|
+
|
|
2742
|
+
@validate_call
|
|
2743
|
+
async def get_session_with_http_info(
|
|
2744
|
+
self,
|
|
2745
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
2746
|
+
_request_timeout: Union[
|
|
2747
|
+
None,
|
|
2748
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2749
|
+
Tuple[
|
|
2750
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2751
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2752
|
+
]
|
|
2753
|
+
] = None,
|
|
2754
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2755
|
+
_content_type: Optional[StrictStr] = None,
|
|
2756
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2757
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2758
|
+
) -> ApiResponse[Session]:
|
|
2759
|
+
"""Get session details
|
|
2760
|
+
|
|
2761
|
+
Get details of a specific session including its commands
|
|
2762
|
+
|
|
2763
|
+
:param session_id: Session ID (required)
|
|
2764
|
+
:type session_id: str
|
|
2765
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2766
|
+
number provided, it will be total request
|
|
2767
|
+
timeout. It can also be a pair (tuple) of
|
|
2768
|
+
(connection, read) timeouts.
|
|
2769
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2770
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2771
|
+
request; this effectively ignores the
|
|
2772
|
+
authentication in the spec for a single request.
|
|
2773
|
+
:type _request_auth: dict, optional
|
|
2774
|
+
:param _content_type: force content-type for the request.
|
|
2775
|
+
:type _content_type: str, Optional
|
|
2776
|
+
:param _headers: set to override the headers for a single
|
|
2777
|
+
request; this effectively ignores the headers
|
|
2778
|
+
in the spec for a single request.
|
|
2779
|
+
:type _headers: dict, optional
|
|
2780
|
+
:param _host_index: set to override the host_index for a single
|
|
2781
|
+
request; this effectively ignores the host_index
|
|
2782
|
+
in the spec for a single request.
|
|
2783
|
+
:type _host_index: int, optional
|
|
2784
|
+
:return: Returns the result object.
|
|
2785
|
+
""" # noqa: E501
|
|
2786
|
+
|
|
2787
|
+
_param = self._get_session_serialize(
|
|
2788
|
+
session_id=session_id,
|
|
2789
|
+
_request_auth=_request_auth,
|
|
2790
|
+
_content_type=_content_type,
|
|
2791
|
+
_headers=_headers,
|
|
2792
|
+
_host_index=_host_index
|
|
2793
|
+
)
|
|
2794
|
+
|
|
2795
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2796
|
+
'200': "Session",
|
|
2797
|
+
}
|
|
2798
|
+
response_data = await self.api_client.call_api(
|
|
2799
|
+
*_param,
|
|
2800
|
+
_request_timeout=_request_timeout
|
|
2801
|
+
)
|
|
2802
|
+
await response_data.read()
|
|
2803
|
+
return self.api_client.response_deserialize(
|
|
2804
|
+
response_data=response_data,
|
|
2805
|
+
response_types_map=_response_types_map,
|
|
2806
|
+
)
|
|
2807
|
+
|
|
2808
|
+
|
|
2809
|
+
@validate_call
|
|
2810
|
+
async def get_session_without_preload_content(
|
|
2811
|
+
self,
|
|
2812
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
2813
|
+
_request_timeout: Union[
|
|
2814
|
+
None,
|
|
2815
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2816
|
+
Tuple[
|
|
2817
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2818
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2819
|
+
]
|
|
2820
|
+
] = None,
|
|
2821
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2822
|
+
_content_type: Optional[StrictStr] = None,
|
|
2823
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2824
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2825
|
+
) -> RESTResponseType:
|
|
2826
|
+
"""Get session details
|
|
2827
|
+
|
|
2828
|
+
Get details of a specific session including its commands
|
|
2829
|
+
|
|
2830
|
+
:param session_id: Session ID (required)
|
|
2831
|
+
:type session_id: str
|
|
2832
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2833
|
+
number provided, it will be total request
|
|
2834
|
+
timeout. It can also be a pair (tuple) of
|
|
2835
|
+
(connection, read) timeouts.
|
|
2836
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2837
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2838
|
+
request; this effectively ignores the
|
|
2839
|
+
authentication in the spec for a single request.
|
|
2840
|
+
:type _request_auth: dict, optional
|
|
2841
|
+
:param _content_type: force content-type for the request.
|
|
2842
|
+
:type _content_type: str, Optional
|
|
2843
|
+
:param _headers: set to override the headers for a single
|
|
2844
|
+
request; this effectively ignores the headers
|
|
2845
|
+
in the spec for a single request.
|
|
2846
|
+
:type _headers: dict, optional
|
|
2847
|
+
:param _host_index: set to override the host_index for a single
|
|
2848
|
+
request; this effectively ignores the host_index
|
|
2849
|
+
in the spec for a single request.
|
|
2850
|
+
:type _host_index: int, optional
|
|
2851
|
+
:return: Returns the result object.
|
|
2852
|
+
""" # noqa: E501
|
|
2853
|
+
|
|
2854
|
+
_param = self._get_session_serialize(
|
|
2855
|
+
session_id=session_id,
|
|
2856
|
+
_request_auth=_request_auth,
|
|
2857
|
+
_content_type=_content_type,
|
|
2858
|
+
_headers=_headers,
|
|
2859
|
+
_host_index=_host_index
|
|
2860
|
+
)
|
|
2861
|
+
|
|
2862
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2863
|
+
'200': "Session",
|
|
2864
|
+
}
|
|
2865
|
+
response_data = await self.api_client.call_api(
|
|
2866
|
+
*_param,
|
|
2867
|
+
_request_timeout=_request_timeout
|
|
2868
|
+
)
|
|
2869
|
+
return response_data.response
|
|
2870
|
+
|
|
2871
|
+
|
|
2872
|
+
def _get_session_serialize(
|
|
2873
|
+
self,
|
|
2874
|
+
session_id,
|
|
2875
|
+
_request_auth,
|
|
2876
|
+
_content_type,
|
|
2877
|
+
_headers,
|
|
2878
|
+
_host_index,
|
|
2879
|
+
) -> RequestSerialized:
|
|
2880
|
+
|
|
2881
|
+
_host = None
|
|
2882
|
+
|
|
2883
|
+
_collection_formats: Dict[str, str] = {
|
|
2884
|
+
}
|
|
2885
|
+
|
|
2886
|
+
_path_params: Dict[str, str] = {}
|
|
2887
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2888
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2889
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2890
|
+
_files: Dict[
|
|
2891
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2892
|
+
] = {}
|
|
2893
|
+
_body_params: Optional[bytes] = None
|
|
2894
|
+
|
|
2895
|
+
# process the path parameters
|
|
2896
|
+
if session_id is not None:
|
|
2897
|
+
_path_params['sessionId'] = session_id
|
|
2898
|
+
# process the query parameters
|
|
2899
|
+
# process the header parameters
|
|
2900
|
+
# process the form parameters
|
|
2901
|
+
# process the body parameter
|
|
2902
|
+
|
|
2903
|
+
|
|
2904
|
+
# set the HTTP header `Accept`
|
|
2905
|
+
if 'Accept' not in _header_params:
|
|
2906
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2907
|
+
[
|
|
2908
|
+
'application/json'
|
|
2909
|
+
]
|
|
2910
|
+
)
|
|
2911
|
+
|
|
2912
|
+
|
|
2913
|
+
# authentication setting
|
|
2914
|
+
_auth_settings: List[str] = [
|
|
2915
|
+
]
|
|
2916
|
+
|
|
2917
|
+
return self.api_client.param_serialize(
|
|
2918
|
+
method='GET',
|
|
2919
|
+
resource_path='/process/session/{sessionId}',
|
|
2920
|
+
path_params=_path_params,
|
|
2921
|
+
query_params=_query_params,
|
|
2922
|
+
header_params=_header_params,
|
|
2923
|
+
body=_body_params,
|
|
2924
|
+
post_params=_form_params,
|
|
2925
|
+
files=_files,
|
|
2926
|
+
auth_settings=_auth_settings,
|
|
2927
|
+
collection_formats=_collection_formats,
|
|
2928
|
+
_host=_host,
|
|
2929
|
+
_request_auth=_request_auth
|
|
2930
|
+
)
|
|
2931
|
+
|
|
2932
|
+
|
|
2933
|
+
|
|
2934
|
+
|
|
2935
|
+
@validate_call
|
|
2936
|
+
async def get_session_command(
|
|
2937
|
+
self,
|
|
2938
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
2939
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
2940
|
+
_request_timeout: Union[
|
|
2941
|
+
None,
|
|
2942
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2943
|
+
Tuple[
|
|
2944
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2945
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2946
|
+
]
|
|
2947
|
+
] = None,
|
|
2948
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2949
|
+
_content_type: Optional[StrictStr] = None,
|
|
2950
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2951
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2952
|
+
) -> Command:
|
|
2953
|
+
"""Get session command details
|
|
2954
|
+
|
|
2955
|
+
Get details of a specific command within a session
|
|
2956
|
+
|
|
2957
|
+
:param session_id: Session ID (required)
|
|
2958
|
+
:type session_id: str
|
|
2959
|
+
:param command_id: Command ID (required)
|
|
2960
|
+
:type command_id: str
|
|
2961
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2962
|
+
number provided, it will be total request
|
|
2963
|
+
timeout. It can also be a pair (tuple) of
|
|
2964
|
+
(connection, read) timeouts.
|
|
2965
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2966
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2967
|
+
request; this effectively ignores the
|
|
2968
|
+
authentication in the spec for a single request.
|
|
2969
|
+
:type _request_auth: dict, optional
|
|
2970
|
+
:param _content_type: force content-type for the request.
|
|
2971
|
+
:type _content_type: str, Optional
|
|
2972
|
+
:param _headers: set to override the headers for a single
|
|
2973
|
+
request; this effectively ignores the headers
|
|
2974
|
+
in the spec for a single request.
|
|
2975
|
+
:type _headers: dict, optional
|
|
2976
|
+
:param _host_index: set to override the host_index for a single
|
|
2977
|
+
request; this effectively ignores the host_index
|
|
2978
|
+
in the spec for a single request.
|
|
2979
|
+
:type _host_index: int, optional
|
|
2980
|
+
:return: Returns the result object.
|
|
2981
|
+
""" # noqa: E501
|
|
2982
|
+
|
|
2983
|
+
_param = self._get_session_command_serialize(
|
|
2984
|
+
session_id=session_id,
|
|
2985
|
+
command_id=command_id,
|
|
2986
|
+
_request_auth=_request_auth,
|
|
2987
|
+
_content_type=_content_type,
|
|
2988
|
+
_headers=_headers,
|
|
2989
|
+
_host_index=_host_index
|
|
2990
|
+
)
|
|
2991
|
+
|
|
2992
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2993
|
+
'200': "Command",
|
|
2994
|
+
}
|
|
2995
|
+
response_data = await self.api_client.call_api(
|
|
2996
|
+
*_param,
|
|
2997
|
+
_request_timeout=_request_timeout
|
|
2998
|
+
)
|
|
2999
|
+
await response_data.read()
|
|
3000
|
+
return self.api_client.response_deserialize(
|
|
3001
|
+
response_data=response_data,
|
|
3002
|
+
response_types_map=_response_types_map,
|
|
3003
|
+
).data
|
|
3004
|
+
|
|
3005
|
+
|
|
3006
|
+
@validate_call
|
|
3007
|
+
async def get_session_command_with_http_info(
|
|
3008
|
+
self,
|
|
3009
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
3010
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
3011
|
+
_request_timeout: Union[
|
|
3012
|
+
None,
|
|
3013
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3014
|
+
Tuple[
|
|
3015
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3016
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3017
|
+
]
|
|
3018
|
+
] = None,
|
|
3019
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3020
|
+
_content_type: Optional[StrictStr] = None,
|
|
3021
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3022
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3023
|
+
) -> ApiResponse[Command]:
|
|
3024
|
+
"""Get session command details
|
|
3025
|
+
|
|
3026
|
+
Get details of a specific command within a session
|
|
3027
|
+
|
|
3028
|
+
:param session_id: Session ID (required)
|
|
3029
|
+
:type session_id: str
|
|
3030
|
+
:param command_id: Command ID (required)
|
|
3031
|
+
:type command_id: str
|
|
3032
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3033
|
+
number provided, it will be total request
|
|
3034
|
+
timeout. It can also be a pair (tuple) of
|
|
3035
|
+
(connection, read) timeouts.
|
|
3036
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3037
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3038
|
+
request; this effectively ignores the
|
|
3039
|
+
authentication in the spec for a single request.
|
|
3040
|
+
:type _request_auth: dict, optional
|
|
3041
|
+
:param _content_type: force content-type for the request.
|
|
3042
|
+
:type _content_type: str, Optional
|
|
3043
|
+
:param _headers: set to override the headers for a single
|
|
3044
|
+
request; this effectively ignores the headers
|
|
3045
|
+
in the spec for a single request.
|
|
3046
|
+
:type _headers: dict, optional
|
|
3047
|
+
:param _host_index: set to override the host_index for a single
|
|
3048
|
+
request; this effectively ignores the host_index
|
|
3049
|
+
in the spec for a single request.
|
|
3050
|
+
:type _host_index: int, optional
|
|
3051
|
+
:return: Returns the result object.
|
|
3052
|
+
""" # noqa: E501
|
|
3053
|
+
|
|
3054
|
+
_param = self._get_session_command_serialize(
|
|
3055
|
+
session_id=session_id,
|
|
3056
|
+
command_id=command_id,
|
|
3057
|
+
_request_auth=_request_auth,
|
|
3058
|
+
_content_type=_content_type,
|
|
3059
|
+
_headers=_headers,
|
|
3060
|
+
_host_index=_host_index
|
|
3061
|
+
)
|
|
3062
|
+
|
|
3063
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3064
|
+
'200': "Command",
|
|
3065
|
+
}
|
|
3066
|
+
response_data = await self.api_client.call_api(
|
|
3067
|
+
*_param,
|
|
3068
|
+
_request_timeout=_request_timeout
|
|
3069
|
+
)
|
|
3070
|
+
await response_data.read()
|
|
3071
|
+
return self.api_client.response_deserialize(
|
|
3072
|
+
response_data=response_data,
|
|
3073
|
+
response_types_map=_response_types_map,
|
|
3074
|
+
)
|
|
3075
|
+
|
|
3076
|
+
|
|
3077
|
+
@validate_call
|
|
3078
|
+
async def get_session_command_without_preload_content(
|
|
3079
|
+
self,
|
|
3080
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
3081
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
3082
|
+
_request_timeout: Union[
|
|
3083
|
+
None,
|
|
3084
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3085
|
+
Tuple[
|
|
3086
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3087
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3088
|
+
]
|
|
3089
|
+
] = None,
|
|
3090
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3091
|
+
_content_type: Optional[StrictStr] = None,
|
|
3092
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3093
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3094
|
+
) -> RESTResponseType:
|
|
3095
|
+
"""Get session command details
|
|
3096
|
+
|
|
3097
|
+
Get details of a specific command within a session
|
|
3098
|
+
|
|
3099
|
+
:param session_id: Session ID (required)
|
|
3100
|
+
:type session_id: str
|
|
3101
|
+
:param command_id: Command ID (required)
|
|
3102
|
+
:type command_id: str
|
|
3103
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3104
|
+
number provided, it will be total request
|
|
3105
|
+
timeout. It can also be a pair (tuple) of
|
|
3106
|
+
(connection, read) timeouts.
|
|
3107
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3108
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3109
|
+
request; this effectively ignores the
|
|
3110
|
+
authentication in the spec for a single request.
|
|
3111
|
+
:type _request_auth: dict, optional
|
|
3112
|
+
:param _content_type: force content-type for the request.
|
|
3113
|
+
:type _content_type: str, Optional
|
|
3114
|
+
:param _headers: set to override the headers for a single
|
|
3115
|
+
request; this effectively ignores the headers
|
|
3116
|
+
in the spec for a single request.
|
|
3117
|
+
:type _headers: dict, optional
|
|
3118
|
+
:param _host_index: set to override the host_index for a single
|
|
3119
|
+
request; this effectively ignores the host_index
|
|
3120
|
+
in the spec for a single request.
|
|
3121
|
+
:type _host_index: int, optional
|
|
3122
|
+
:return: Returns the result object.
|
|
3123
|
+
""" # noqa: E501
|
|
3124
|
+
|
|
3125
|
+
_param = self._get_session_command_serialize(
|
|
3126
|
+
session_id=session_id,
|
|
3127
|
+
command_id=command_id,
|
|
3128
|
+
_request_auth=_request_auth,
|
|
3129
|
+
_content_type=_content_type,
|
|
3130
|
+
_headers=_headers,
|
|
3131
|
+
_host_index=_host_index
|
|
3132
|
+
)
|
|
3133
|
+
|
|
3134
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3135
|
+
'200': "Command",
|
|
3136
|
+
}
|
|
3137
|
+
response_data = await self.api_client.call_api(
|
|
3138
|
+
*_param,
|
|
3139
|
+
_request_timeout=_request_timeout
|
|
3140
|
+
)
|
|
3141
|
+
return response_data.response
|
|
3142
|
+
|
|
3143
|
+
|
|
3144
|
+
def _get_session_command_serialize(
|
|
3145
|
+
self,
|
|
3146
|
+
session_id,
|
|
3147
|
+
command_id,
|
|
3148
|
+
_request_auth,
|
|
3149
|
+
_content_type,
|
|
3150
|
+
_headers,
|
|
3151
|
+
_host_index,
|
|
3152
|
+
) -> RequestSerialized:
|
|
3153
|
+
|
|
3154
|
+
_host = None
|
|
3155
|
+
|
|
3156
|
+
_collection_formats: Dict[str, str] = {
|
|
3157
|
+
}
|
|
3158
|
+
|
|
3159
|
+
_path_params: Dict[str, str] = {}
|
|
3160
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3161
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3162
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3163
|
+
_files: Dict[
|
|
3164
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3165
|
+
] = {}
|
|
3166
|
+
_body_params: Optional[bytes] = None
|
|
3167
|
+
|
|
3168
|
+
# process the path parameters
|
|
3169
|
+
if session_id is not None:
|
|
3170
|
+
_path_params['sessionId'] = session_id
|
|
3171
|
+
if command_id is not None:
|
|
3172
|
+
_path_params['commandId'] = command_id
|
|
3173
|
+
# process the query parameters
|
|
3174
|
+
# process the header parameters
|
|
3175
|
+
# process the form parameters
|
|
3176
|
+
# process the body parameter
|
|
3177
|
+
|
|
3178
|
+
|
|
3179
|
+
# set the HTTP header `Accept`
|
|
3180
|
+
if 'Accept' not in _header_params:
|
|
3181
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3182
|
+
[
|
|
3183
|
+
'application/json'
|
|
3184
|
+
]
|
|
3185
|
+
)
|
|
3186
|
+
|
|
3187
|
+
|
|
3188
|
+
# authentication setting
|
|
3189
|
+
_auth_settings: List[str] = [
|
|
3190
|
+
]
|
|
3191
|
+
|
|
3192
|
+
return self.api_client.param_serialize(
|
|
3193
|
+
method='GET',
|
|
3194
|
+
resource_path='/process/session/{sessionId}/command/{commandId}',
|
|
3195
|
+
path_params=_path_params,
|
|
3196
|
+
query_params=_query_params,
|
|
3197
|
+
header_params=_header_params,
|
|
3198
|
+
body=_body_params,
|
|
3199
|
+
post_params=_form_params,
|
|
3200
|
+
files=_files,
|
|
3201
|
+
auth_settings=_auth_settings,
|
|
3202
|
+
collection_formats=_collection_formats,
|
|
3203
|
+
_host=_host,
|
|
3204
|
+
_request_auth=_request_auth
|
|
3205
|
+
)
|
|
3206
|
+
|
|
3207
|
+
|
|
3208
|
+
|
|
3209
|
+
|
|
3210
|
+
@validate_call
|
|
3211
|
+
async def get_session_command_logs(
|
|
3212
|
+
self,
|
|
3213
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
3214
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
3215
|
+
follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
|
|
3216
|
+
_request_timeout: Union[
|
|
3217
|
+
None,
|
|
3218
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3219
|
+
Tuple[
|
|
3220
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3221
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3222
|
+
]
|
|
3223
|
+
] = None,
|
|
3224
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3225
|
+
_content_type: Optional[StrictStr] = None,
|
|
3226
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3227
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3228
|
+
) -> SessionCommandLogsResponse:
|
|
3229
|
+
"""Get session command logs
|
|
3230
|
+
|
|
3231
|
+
Get logs for a specific command within a session. Returns JSON with separated stdout/stderr for SDK >= 0.167.0, plain text otherwise. Supports WebSocket streaming.
|
|
3232
|
+
|
|
3233
|
+
:param session_id: Session ID (required)
|
|
3234
|
+
:type session_id: str
|
|
3235
|
+
:param command_id: Command ID (required)
|
|
3236
|
+
:type command_id: str
|
|
3237
|
+
:param follow: Follow logs in real-time (WebSocket only)
|
|
3238
|
+
:type follow: bool
|
|
3239
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3240
|
+
number provided, it will be total request
|
|
3241
|
+
timeout. It can also be a pair (tuple) of
|
|
3242
|
+
(connection, read) timeouts.
|
|
3243
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3244
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3245
|
+
request; this effectively ignores the
|
|
3246
|
+
authentication in the spec for a single request.
|
|
3247
|
+
:type _request_auth: dict, optional
|
|
3248
|
+
:param _content_type: force content-type for the request.
|
|
3249
|
+
:type _content_type: str, Optional
|
|
3250
|
+
:param _headers: set to override the headers for a single
|
|
3251
|
+
request; this effectively ignores the headers
|
|
3252
|
+
in the spec for a single request.
|
|
3253
|
+
:type _headers: dict, optional
|
|
3254
|
+
:param _host_index: set to override the host_index for a single
|
|
3255
|
+
request; this effectively ignores the host_index
|
|
3256
|
+
in the spec for a single request.
|
|
3257
|
+
:type _host_index: int, optional
|
|
3258
|
+
:return: Returns the result object.
|
|
3259
|
+
""" # noqa: E501
|
|
3260
|
+
|
|
3261
|
+
_param = self._get_session_command_logs_serialize(
|
|
3262
|
+
session_id=session_id,
|
|
3263
|
+
command_id=command_id,
|
|
3264
|
+
follow=follow,
|
|
3265
|
+
_request_auth=_request_auth,
|
|
3266
|
+
_content_type=_content_type,
|
|
3267
|
+
_headers=_headers,
|
|
3268
|
+
_host_index=_host_index
|
|
3269
|
+
)
|
|
3270
|
+
|
|
3271
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3272
|
+
'200': "SessionCommandLogsResponse",
|
|
3273
|
+
}
|
|
3274
|
+
response_data = await self.api_client.call_api(
|
|
3275
|
+
*_param,
|
|
3276
|
+
_request_timeout=_request_timeout
|
|
3277
|
+
)
|
|
3278
|
+
await response_data.read()
|
|
3279
|
+
return self.api_client.response_deserialize(
|
|
3280
|
+
response_data=response_data,
|
|
3281
|
+
response_types_map=_response_types_map,
|
|
3282
|
+
).data
|
|
3283
|
+
|
|
3284
|
+
|
|
3285
|
+
@validate_call
|
|
3286
|
+
async def get_session_command_logs_with_http_info(
|
|
3287
|
+
self,
|
|
3288
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
3289
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
3290
|
+
follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
|
|
3291
|
+
_request_timeout: Union[
|
|
3292
|
+
None,
|
|
3293
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3294
|
+
Tuple[
|
|
3295
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3296
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3297
|
+
]
|
|
3298
|
+
] = None,
|
|
3299
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3300
|
+
_content_type: Optional[StrictStr] = None,
|
|
3301
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3302
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3303
|
+
) -> ApiResponse[SessionCommandLogsResponse]:
|
|
3304
|
+
"""Get session command logs
|
|
3305
|
+
|
|
3306
|
+
Get logs for a specific command within a session. Returns JSON with separated stdout/stderr for SDK >= 0.167.0, plain text otherwise. Supports WebSocket streaming.
|
|
3307
|
+
|
|
3308
|
+
:param session_id: Session ID (required)
|
|
3309
|
+
:type session_id: str
|
|
3310
|
+
:param command_id: Command ID (required)
|
|
3311
|
+
:type command_id: str
|
|
3312
|
+
:param follow: Follow logs in real-time (WebSocket only)
|
|
3313
|
+
:type follow: bool
|
|
3314
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3315
|
+
number provided, it will be total request
|
|
3316
|
+
timeout. It can also be a pair (tuple) of
|
|
3317
|
+
(connection, read) timeouts.
|
|
3318
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3319
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3320
|
+
request; this effectively ignores the
|
|
3321
|
+
authentication in the spec for a single request.
|
|
3322
|
+
:type _request_auth: dict, optional
|
|
3323
|
+
:param _content_type: force content-type for the request.
|
|
3324
|
+
:type _content_type: str, Optional
|
|
3325
|
+
:param _headers: set to override the headers for a single
|
|
3326
|
+
request; this effectively ignores the headers
|
|
3327
|
+
in the spec for a single request.
|
|
3328
|
+
:type _headers: dict, optional
|
|
3329
|
+
:param _host_index: set to override the host_index for a single
|
|
3330
|
+
request; this effectively ignores the host_index
|
|
3331
|
+
in the spec for a single request.
|
|
3332
|
+
:type _host_index: int, optional
|
|
3333
|
+
:return: Returns the result object.
|
|
3334
|
+
""" # noqa: E501
|
|
3335
|
+
|
|
3336
|
+
_param = self._get_session_command_logs_serialize(
|
|
3337
|
+
session_id=session_id,
|
|
3338
|
+
command_id=command_id,
|
|
3339
|
+
follow=follow,
|
|
3340
|
+
_request_auth=_request_auth,
|
|
3341
|
+
_content_type=_content_type,
|
|
3342
|
+
_headers=_headers,
|
|
3343
|
+
_host_index=_host_index
|
|
3344
|
+
)
|
|
3345
|
+
|
|
3346
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3347
|
+
'200': "SessionCommandLogsResponse",
|
|
3348
|
+
}
|
|
3349
|
+
response_data = await self.api_client.call_api(
|
|
3350
|
+
*_param,
|
|
3351
|
+
_request_timeout=_request_timeout
|
|
3352
|
+
)
|
|
3353
|
+
await response_data.read()
|
|
3354
|
+
return self.api_client.response_deserialize(
|
|
3355
|
+
response_data=response_data,
|
|
3356
|
+
response_types_map=_response_types_map,
|
|
3357
|
+
)
|
|
3358
|
+
|
|
3359
|
+
|
|
3360
|
+
@validate_call
|
|
3361
|
+
async def get_session_command_logs_without_preload_content(
|
|
3362
|
+
self,
|
|
3363
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
3364
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
3365
|
+
follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
|
|
3366
|
+
_request_timeout: Union[
|
|
3367
|
+
None,
|
|
3368
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3369
|
+
Tuple[
|
|
3370
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3371
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3372
|
+
]
|
|
3373
|
+
] = None,
|
|
3374
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3375
|
+
_content_type: Optional[StrictStr] = None,
|
|
3376
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3377
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3378
|
+
) -> RESTResponseType:
|
|
3379
|
+
"""Get session command logs
|
|
3380
|
+
|
|
3381
|
+
Get logs for a specific command within a session. Returns JSON with separated stdout/stderr for SDK >= 0.167.0, plain text otherwise. Supports WebSocket streaming.
|
|
3382
|
+
|
|
3383
|
+
:param session_id: Session ID (required)
|
|
3384
|
+
:type session_id: str
|
|
3385
|
+
:param command_id: Command ID (required)
|
|
3386
|
+
:type command_id: str
|
|
3387
|
+
:param follow: Follow logs in real-time (WebSocket only)
|
|
3388
|
+
:type follow: bool
|
|
3389
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3390
|
+
number provided, it will be total request
|
|
3391
|
+
timeout. It can also be a pair (tuple) of
|
|
3392
|
+
(connection, read) timeouts.
|
|
3393
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3394
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3395
|
+
request; this effectively ignores the
|
|
3396
|
+
authentication in the spec for a single request.
|
|
3397
|
+
:type _request_auth: dict, optional
|
|
3398
|
+
:param _content_type: force content-type for the request.
|
|
3399
|
+
:type _content_type: str, Optional
|
|
3400
|
+
:param _headers: set to override the headers for a single
|
|
3401
|
+
request; this effectively ignores the headers
|
|
3402
|
+
in the spec for a single request.
|
|
3403
|
+
:type _headers: dict, optional
|
|
3404
|
+
:param _host_index: set to override the host_index for a single
|
|
3405
|
+
request; this effectively ignores the host_index
|
|
3406
|
+
in the spec for a single request.
|
|
3407
|
+
:type _host_index: int, optional
|
|
3408
|
+
:return: Returns the result object.
|
|
3409
|
+
""" # noqa: E501
|
|
3410
|
+
|
|
3411
|
+
_param = self._get_session_command_logs_serialize(
|
|
3412
|
+
session_id=session_id,
|
|
3413
|
+
command_id=command_id,
|
|
3414
|
+
follow=follow,
|
|
3415
|
+
_request_auth=_request_auth,
|
|
3416
|
+
_content_type=_content_type,
|
|
3417
|
+
_headers=_headers,
|
|
3418
|
+
_host_index=_host_index
|
|
3419
|
+
)
|
|
3420
|
+
|
|
3421
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3422
|
+
'200': "SessionCommandLogsResponse",
|
|
3423
|
+
}
|
|
3424
|
+
response_data = await self.api_client.call_api(
|
|
3425
|
+
*_param,
|
|
3426
|
+
_request_timeout=_request_timeout
|
|
3427
|
+
)
|
|
3428
|
+
return response_data.response
|
|
3429
|
+
|
|
3430
|
+
|
|
3431
|
+
def _get_session_command_logs_serialize(
|
|
3432
|
+
self,
|
|
3433
|
+
session_id,
|
|
3434
|
+
command_id,
|
|
3435
|
+
follow,
|
|
3436
|
+
_request_auth,
|
|
3437
|
+
_content_type,
|
|
3438
|
+
_headers,
|
|
3439
|
+
_host_index,
|
|
3440
|
+
) -> RequestSerialized:
|
|
3441
|
+
|
|
3442
|
+
_host = None
|
|
3443
|
+
|
|
3444
|
+
_collection_formats: Dict[str, str] = {
|
|
3445
|
+
}
|
|
3446
|
+
|
|
3447
|
+
_path_params: Dict[str, str] = {}
|
|
3448
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3449
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3450
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3451
|
+
_files: Dict[
|
|
3452
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3453
|
+
] = {}
|
|
3454
|
+
_body_params: Optional[bytes] = None
|
|
3455
|
+
|
|
3456
|
+
# process the path parameters
|
|
3457
|
+
if session_id is not None:
|
|
3458
|
+
_path_params['sessionId'] = session_id
|
|
3459
|
+
if command_id is not None:
|
|
3460
|
+
_path_params['commandId'] = command_id
|
|
3461
|
+
# process the query parameters
|
|
3462
|
+
if follow is not None:
|
|
3463
|
+
|
|
3464
|
+
_query_params.append(('follow', follow))
|
|
3465
|
+
|
|
3466
|
+
# process the header parameters
|
|
3467
|
+
# process the form parameters
|
|
3468
|
+
# process the body parameter
|
|
3469
|
+
|
|
3470
|
+
|
|
3471
|
+
# set the HTTP header `Accept`
|
|
3472
|
+
if 'Accept' not in _header_params:
|
|
3473
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3474
|
+
[
|
|
3475
|
+
'application/json',
|
|
3476
|
+
'text/plain'
|
|
3477
|
+
]
|
|
3478
|
+
)
|
|
3479
|
+
|
|
3480
|
+
|
|
3481
|
+
# authentication setting
|
|
3482
|
+
_auth_settings: List[str] = [
|
|
3483
|
+
]
|
|
3484
|
+
|
|
3485
|
+
return self.api_client.param_serialize(
|
|
3486
|
+
method='GET',
|
|
3487
|
+
resource_path='/process/session/{sessionId}/command/{commandId}/logs',
|
|
3488
|
+
path_params=_path_params,
|
|
3489
|
+
query_params=_query_params,
|
|
3490
|
+
header_params=_header_params,
|
|
3491
|
+
body=_body_params,
|
|
3492
|
+
post_params=_form_params,
|
|
3493
|
+
files=_files,
|
|
3494
|
+
auth_settings=_auth_settings,
|
|
3495
|
+
collection_formats=_collection_formats,
|
|
3496
|
+
_host=_host,
|
|
3497
|
+
_request_auth=_request_auth
|
|
3498
|
+
)
|
|
3499
|
+
|
|
3500
|
+
|
|
3501
|
+
|
|
3502
|
+
|
|
3503
|
+
@validate_call
|
|
3504
|
+
async def list_pty_sessions(
|
|
3505
|
+
self,
|
|
3506
|
+
_request_timeout: Union[
|
|
3507
|
+
None,
|
|
3508
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3509
|
+
Tuple[
|
|
3510
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3511
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3512
|
+
]
|
|
3513
|
+
] = None,
|
|
3514
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3515
|
+
_content_type: Optional[StrictStr] = None,
|
|
3516
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3517
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3518
|
+
) -> PtyListResponse:
|
|
3519
|
+
"""List all PTY sessions
|
|
3520
|
+
|
|
3521
|
+
Get a list of all active pseudo-terminal sessions
|
|
3522
|
+
|
|
3523
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3524
|
+
number provided, it will be total request
|
|
3525
|
+
timeout. It can also be a pair (tuple) of
|
|
3526
|
+
(connection, read) timeouts.
|
|
3527
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3528
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3529
|
+
request; this effectively ignores the
|
|
3530
|
+
authentication in the spec for a single request.
|
|
3531
|
+
:type _request_auth: dict, optional
|
|
3532
|
+
:param _content_type: force content-type for the request.
|
|
3533
|
+
:type _content_type: str, Optional
|
|
3534
|
+
:param _headers: set to override the headers for a single
|
|
3535
|
+
request; this effectively ignores the headers
|
|
3536
|
+
in the spec for a single request.
|
|
3537
|
+
:type _headers: dict, optional
|
|
3538
|
+
:param _host_index: set to override the host_index for a single
|
|
3539
|
+
request; this effectively ignores the host_index
|
|
3540
|
+
in the spec for a single request.
|
|
3541
|
+
:type _host_index: int, optional
|
|
3542
|
+
:return: Returns the result object.
|
|
3543
|
+
""" # noqa: E501
|
|
3544
|
+
|
|
3545
|
+
_param = self._list_pty_sessions_serialize(
|
|
3546
|
+
_request_auth=_request_auth,
|
|
3547
|
+
_content_type=_content_type,
|
|
3548
|
+
_headers=_headers,
|
|
3549
|
+
_host_index=_host_index
|
|
3550
|
+
)
|
|
3551
|
+
|
|
3552
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3553
|
+
'200': "PtyListResponse",
|
|
3554
|
+
}
|
|
3555
|
+
response_data = await self.api_client.call_api(
|
|
3556
|
+
*_param,
|
|
3557
|
+
_request_timeout=_request_timeout
|
|
3558
|
+
)
|
|
3559
|
+
await response_data.read()
|
|
3560
|
+
return self.api_client.response_deserialize(
|
|
3561
|
+
response_data=response_data,
|
|
3562
|
+
response_types_map=_response_types_map,
|
|
3563
|
+
).data
|
|
3564
|
+
|
|
3565
|
+
|
|
3566
|
+
@validate_call
|
|
3567
|
+
async def list_pty_sessions_with_http_info(
|
|
3568
|
+
self,
|
|
3569
|
+
_request_timeout: Union[
|
|
3570
|
+
None,
|
|
3571
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3572
|
+
Tuple[
|
|
3573
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3574
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3575
|
+
]
|
|
3576
|
+
] = None,
|
|
3577
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3578
|
+
_content_type: Optional[StrictStr] = None,
|
|
3579
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3580
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3581
|
+
) -> ApiResponse[PtyListResponse]:
|
|
3582
|
+
"""List all PTY sessions
|
|
3583
|
+
|
|
3584
|
+
Get a list of all active pseudo-terminal sessions
|
|
3585
|
+
|
|
3586
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3587
|
+
number provided, it will be total request
|
|
3588
|
+
timeout. It can also be a pair (tuple) of
|
|
3589
|
+
(connection, read) timeouts.
|
|
3590
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3591
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3592
|
+
request; this effectively ignores the
|
|
3593
|
+
authentication in the spec for a single request.
|
|
3594
|
+
:type _request_auth: dict, optional
|
|
3595
|
+
:param _content_type: force content-type for the request.
|
|
3596
|
+
:type _content_type: str, Optional
|
|
3597
|
+
:param _headers: set to override the headers for a single
|
|
3598
|
+
request; this effectively ignores the headers
|
|
3599
|
+
in the spec for a single request.
|
|
3600
|
+
:type _headers: dict, optional
|
|
3601
|
+
:param _host_index: set to override the host_index for a single
|
|
3602
|
+
request; this effectively ignores the host_index
|
|
3603
|
+
in the spec for a single request.
|
|
3604
|
+
:type _host_index: int, optional
|
|
3605
|
+
:return: Returns the result object.
|
|
3606
|
+
""" # noqa: E501
|
|
3607
|
+
|
|
3608
|
+
_param = self._list_pty_sessions_serialize(
|
|
3609
|
+
_request_auth=_request_auth,
|
|
3610
|
+
_content_type=_content_type,
|
|
3611
|
+
_headers=_headers,
|
|
3612
|
+
_host_index=_host_index
|
|
3613
|
+
)
|
|
3614
|
+
|
|
3615
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3616
|
+
'200': "PtyListResponse",
|
|
3617
|
+
}
|
|
3618
|
+
response_data = await self.api_client.call_api(
|
|
3619
|
+
*_param,
|
|
3620
|
+
_request_timeout=_request_timeout
|
|
3621
|
+
)
|
|
3622
|
+
await response_data.read()
|
|
3623
|
+
return self.api_client.response_deserialize(
|
|
3624
|
+
response_data=response_data,
|
|
3625
|
+
response_types_map=_response_types_map,
|
|
3626
|
+
)
|
|
3627
|
+
|
|
3628
|
+
|
|
3629
|
+
@validate_call
|
|
3630
|
+
async def list_pty_sessions_without_preload_content(
|
|
3631
|
+
self,
|
|
3632
|
+
_request_timeout: Union[
|
|
3633
|
+
None,
|
|
3634
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3635
|
+
Tuple[
|
|
3636
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3637
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3638
|
+
]
|
|
3639
|
+
] = None,
|
|
3640
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3641
|
+
_content_type: Optional[StrictStr] = None,
|
|
3642
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3643
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3644
|
+
) -> RESTResponseType:
|
|
3645
|
+
"""List all PTY sessions
|
|
3646
|
+
|
|
3647
|
+
Get a list of all active pseudo-terminal sessions
|
|
3648
|
+
|
|
3649
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3650
|
+
number provided, it will be total request
|
|
3651
|
+
timeout. It can also be a pair (tuple) of
|
|
3652
|
+
(connection, read) timeouts.
|
|
3653
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3654
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3655
|
+
request; this effectively ignores the
|
|
3656
|
+
authentication in the spec for a single request.
|
|
3657
|
+
:type _request_auth: dict, optional
|
|
3658
|
+
:param _content_type: force content-type for the request.
|
|
3659
|
+
:type _content_type: str, Optional
|
|
3660
|
+
:param _headers: set to override the headers for a single
|
|
3661
|
+
request; this effectively ignores the headers
|
|
3662
|
+
in the spec for a single request.
|
|
3663
|
+
:type _headers: dict, optional
|
|
3664
|
+
:param _host_index: set to override the host_index for a single
|
|
3665
|
+
request; this effectively ignores the host_index
|
|
3666
|
+
in the spec for a single request.
|
|
3667
|
+
:type _host_index: int, optional
|
|
3668
|
+
:return: Returns the result object.
|
|
3669
|
+
""" # noqa: E501
|
|
3670
|
+
|
|
3671
|
+
_param = self._list_pty_sessions_serialize(
|
|
3672
|
+
_request_auth=_request_auth,
|
|
3673
|
+
_content_type=_content_type,
|
|
3674
|
+
_headers=_headers,
|
|
3675
|
+
_host_index=_host_index
|
|
3676
|
+
)
|
|
3677
|
+
|
|
3678
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3679
|
+
'200': "PtyListResponse",
|
|
3680
|
+
}
|
|
3681
|
+
response_data = await self.api_client.call_api(
|
|
3682
|
+
*_param,
|
|
3683
|
+
_request_timeout=_request_timeout
|
|
3684
|
+
)
|
|
3685
|
+
return response_data.response
|
|
3686
|
+
|
|
3687
|
+
|
|
3688
|
+
def _list_pty_sessions_serialize(
|
|
3689
|
+
self,
|
|
3690
|
+
_request_auth,
|
|
3691
|
+
_content_type,
|
|
3692
|
+
_headers,
|
|
3693
|
+
_host_index,
|
|
3694
|
+
) -> RequestSerialized:
|
|
3695
|
+
|
|
3696
|
+
_host = None
|
|
3697
|
+
|
|
3698
|
+
_collection_formats: Dict[str, str] = {
|
|
3699
|
+
}
|
|
3700
|
+
|
|
3701
|
+
_path_params: Dict[str, str] = {}
|
|
3702
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3703
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3704
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3705
|
+
_files: Dict[
|
|
3706
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3707
|
+
] = {}
|
|
3708
|
+
_body_params: Optional[bytes] = None
|
|
3709
|
+
|
|
3710
|
+
# process the path parameters
|
|
3711
|
+
# process the query parameters
|
|
3712
|
+
# process the header parameters
|
|
3713
|
+
# process the form parameters
|
|
3714
|
+
# process the body parameter
|
|
3715
|
+
|
|
3716
|
+
|
|
3717
|
+
# set the HTTP header `Accept`
|
|
3718
|
+
if 'Accept' not in _header_params:
|
|
3719
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3720
|
+
[
|
|
3721
|
+
'application/json'
|
|
3722
|
+
]
|
|
3723
|
+
)
|
|
3724
|
+
|
|
3725
|
+
|
|
3726
|
+
# authentication setting
|
|
3727
|
+
_auth_settings: List[str] = [
|
|
3728
|
+
]
|
|
3729
|
+
|
|
3730
|
+
return self.api_client.param_serialize(
|
|
3731
|
+
method='GET',
|
|
3732
|
+
resource_path='/process/pty',
|
|
3733
|
+
path_params=_path_params,
|
|
3734
|
+
query_params=_query_params,
|
|
3735
|
+
header_params=_header_params,
|
|
3736
|
+
body=_body_params,
|
|
3737
|
+
post_params=_form_params,
|
|
3738
|
+
files=_files,
|
|
3739
|
+
auth_settings=_auth_settings,
|
|
3740
|
+
collection_formats=_collection_formats,
|
|
3741
|
+
_host=_host,
|
|
3742
|
+
_request_auth=_request_auth
|
|
3743
|
+
)
|
|
3744
|
+
|
|
3745
|
+
|
|
3746
|
+
|
|
3747
|
+
|
|
3748
|
+
@validate_call
|
|
3749
|
+
async def list_sessions(
|
|
3750
|
+
self,
|
|
3751
|
+
_request_timeout: Union[
|
|
3752
|
+
None,
|
|
3753
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3754
|
+
Tuple[
|
|
3755
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3756
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3757
|
+
]
|
|
3758
|
+
] = None,
|
|
3759
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3760
|
+
_content_type: Optional[StrictStr] = None,
|
|
3761
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3762
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3763
|
+
) -> List[Session]:
|
|
3764
|
+
"""List all sessions
|
|
3765
|
+
|
|
3766
|
+
Get a list of all active shell sessions
|
|
3767
|
+
|
|
3768
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3769
|
+
number provided, it will be total request
|
|
3770
|
+
timeout. It can also be a pair (tuple) of
|
|
3771
|
+
(connection, read) timeouts.
|
|
3772
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3773
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3774
|
+
request; this effectively ignores the
|
|
3775
|
+
authentication in the spec for a single request.
|
|
3776
|
+
:type _request_auth: dict, optional
|
|
3777
|
+
:param _content_type: force content-type for the request.
|
|
3778
|
+
:type _content_type: str, Optional
|
|
3779
|
+
:param _headers: set to override the headers for a single
|
|
3780
|
+
request; this effectively ignores the headers
|
|
3781
|
+
in the spec for a single request.
|
|
3782
|
+
:type _headers: dict, optional
|
|
3783
|
+
:param _host_index: set to override the host_index for a single
|
|
3784
|
+
request; this effectively ignores the host_index
|
|
3785
|
+
in the spec for a single request.
|
|
3786
|
+
:type _host_index: int, optional
|
|
3787
|
+
:return: Returns the result object.
|
|
3788
|
+
""" # noqa: E501
|
|
3789
|
+
|
|
3790
|
+
_param = self._list_sessions_serialize(
|
|
3791
|
+
_request_auth=_request_auth,
|
|
3792
|
+
_content_type=_content_type,
|
|
3793
|
+
_headers=_headers,
|
|
3794
|
+
_host_index=_host_index
|
|
3795
|
+
)
|
|
3796
|
+
|
|
3797
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3798
|
+
'200': "List[Session]",
|
|
3799
|
+
}
|
|
3800
|
+
response_data = await self.api_client.call_api(
|
|
3801
|
+
*_param,
|
|
3802
|
+
_request_timeout=_request_timeout
|
|
3803
|
+
)
|
|
3804
|
+
await response_data.read()
|
|
3805
|
+
return self.api_client.response_deserialize(
|
|
3806
|
+
response_data=response_data,
|
|
3807
|
+
response_types_map=_response_types_map,
|
|
3808
|
+
).data
|
|
3809
|
+
|
|
3810
|
+
|
|
3811
|
+
@validate_call
|
|
3812
|
+
async def list_sessions_with_http_info(
|
|
3813
|
+
self,
|
|
3814
|
+
_request_timeout: Union[
|
|
3815
|
+
None,
|
|
3816
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3817
|
+
Tuple[
|
|
3818
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3819
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3820
|
+
]
|
|
3821
|
+
] = None,
|
|
3822
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3823
|
+
_content_type: Optional[StrictStr] = None,
|
|
3824
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3825
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3826
|
+
) -> ApiResponse[List[Session]]:
|
|
3827
|
+
"""List all sessions
|
|
3828
|
+
|
|
3829
|
+
Get a list of all active shell sessions
|
|
3830
|
+
|
|
3831
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3832
|
+
number provided, it will be total request
|
|
3833
|
+
timeout. It can also be a pair (tuple) of
|
|
3834
|
+
(connection, read) timeouts.
|
|
3835
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3836
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3837
|
+
request; this effectively ignores the
|
|
3838
|
+
authentication in the spec for a single request.
|
|
3839
|
+
:type _request_auth: dict, optional
|
|
3840
|
+
:param _content_type: force content-type for the request.
|
|
3841
|
+
:type _content_type: str, Optional
|
|
3842
|
+
:param _headers: set to override the headers for a single
|
|
3843
|
+
request; this effectively ignores the headers
|
|
3844
|
+
in the spec for a single request.
|
|
3845
|
+
:type _headers: dict, optional
|
|
3846
|
+
:param _host_index: set to override the host_index for a single
|
|
3847
|
+
request; this effectively ignores the host_index
|
|
3848
|
+
in the spec for a single request.
|
|
3849
|
+
:type _host_index: int, optional
|
|
3850
|
+
:return: Returns the result object.
|
|
3851
|
+
""" # noqa: E501
|
|
3852
|
+
|
|
3853
|
+
_param = self._list_sessions_serialize(
|
|
3854
|
+
_request_auth=_request_auth,
|
|
3855
|
+
_content_type=_content_type,
|
|
3856
|
+
_headers=_headers,
|
|
3857
|
+
_host_index=_host_index
|
|
3858
|
+
)
|
|
3859
|
+
|
|
3860
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3861
|
+
'200': "List[Session]",
|
|
3862
|
+
}
|
|
3863
|
+
response_data = await self.api_client.call_api(
|
|
3864
|
+
*_param,
|
|
3865
|
+
_request_timeout=_request_timeout
|
|
3866
|
+
)
|
|
3867
|
+
await response_data.read()
|
|
3868
|
+
return self.api_client.response_deserialize(
|
|
3869
|
+
response_data=response_data,
|
|
3870
|
+
response_types_map=_response_types_map,
|
|
3871
|
+
)
|
|
3872
|
+
|
|
3873
|
+
|
|
3874
|
+
@validate_call
|
|
3875
|
+
async def list_sessions_without_preload_content(
|
|
3876
|
+
self,
|
|
3877
|
+
_request_timeout: Union[
|
|
3878
|
+
None,
|
|
3879
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3880
|
+
Tuple[
|
|
3881
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3882
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3883
|
+
]
|
|
3884
|
+
] = None,
|
|
3885
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3886
|
+
_content_type: Optional[StrictStr] = None,
|
|
3887
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3888
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3889
|
+
) -> RESTResponseType:
|
|
3890
|
+
"""List all sessions
|
|
3891
|
+
|
|
3892
|
+
Get a list of all active shell sessions
|
|
3893
|
+
|
|
3894
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3895
|
+
number provided, it will be total request
|
|
3896
|
+
timeout. It can also be a pair (tuple) of
|
|
3897
|
+
(connection, read) timeouts.
|
|
3898
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3899
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3900
|
+
request; this effectively ignores the
|
|
3901
|
+
authentication in the spec for a single request.
|
|
3902
|
+
:type _request_auth: dict, optional
|
|
3903
|
+
:param _content_type: force content-type for the request.
|
|
3904
|
+
:type _content_type: str, Optional
|
|
3905
|
+
:param _headers: set to override the headers for a single
|
|
3906
|
+
request; this effectively ignores the headers
|
|
3907
|
+
in the spec for a single request.
|
|
3908
|
+
:type _headers: dict, optional
|
|
3909
|
+
:param _host_index: set to override the host_index for a single
|
|
3910
|
+
request; this effectively ignores the host_index
|
|
3911
|
+
in the spec for a single request.
|
|
3912
|
+
:type _host_index: int, optional
|
|
3913
|
+
:return: Returns the result object.
|
|
3914
|
+
""" # noqa: E501
|
|
3915
|
+
|
|
3916
|
+
_param = self._list_sessions_serialize(
|
|
3917
|
+
_request_auth=_request_auth,
|
|
3918
|
+
_content_type=_content_type,
|
|
3919
|
+
_headers=_headers,
|
|
3920
|
+
_host_index=_host_index
|
|
3921
|
+
)
|
|
3922
|
+
|
|
3923
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3924
|
+
'200': "List[Session]",
|
|
3925
|
+
}
|
|
3926
|
+
response_data = await self.api_client.call_api(
|
|
3927
|
+
*_param,
|
|
3928
|
+
_request_timeout=_request_timeout
|
|
3929
|
+
)
|
|
3930
|
+
return response_data.response
|
|
3931
|
+
|
|
3932
|
+
|
|
3933
|
+
def _list_sessions_serialize(
|
|
3934
|
+
self,
|
|
3935
|
+
_request_auth,
|
|
3936
|
+
_content_type,
|
|
3937
|
+
_headers,
|
|
3938
|
+
_host_index,
|
|
3939
|
+
) -> RequestSerialized:
|
|
3940
|
+
|
|
3941
|
+
_host = None
|
|
3942
|
+
|
|
3943
|
+
_collection_formats: Dict[str, str] = {
|
|
3944
|
+
}
|
|
3945
|
+
|
|
3946
|
+
_path_params: Dict[str, str] = {}
|
|
3947
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3948
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3949
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3950
|
+
_files: Dict[
|
|
3951
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3952
|
+
] = {}
|
|
3953
|
+
_body_params: Optional[bytes] = None
|
|
3954
|
+
|
|
3955
|
+
# process the path parameters
|
|
3956
|
+
# process the query parameters
|
|
3957
|
+
# process the header parameters
|
|
3958
|
+
# process the form parameters
|
|
3959
|
+
# process the body parameter
|
|
3960
|
+
|
|
3961
|
+
|
|
3962
|
+
# set the HTTP header `Accept`
|
|
3963
|
+
if 'Accept' not in _header_params:
|
|
3964
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3965
|
+
[
|
|
3966
|
+
'application/json'
|
|
3967
|
+
]
|
|
3968
|
+
)
|
|
3969
|
+
|
|
3970
|
+
|
|
3971
|
+
# authentication setting
|
|
3972
|
+
_auth_settings: List[str] = [
|
|
3973
|
+
]
|
|
3974
|
+
|
|
3975
|
+
return self.api_client.param_serialize(
|
|
3976
|
+
method='GET',
|
|
3977
|
+
resource_path='/process/session',
|
|
3978
|
+
path_params=_path_params,
|
|
3979
|
+
query_params=_query_params,
|
|
3980
|
+
header_params=_header_params,
|
|
3981
|
+
body=_body_params,
|
|
3982
|
+
post_params=_form_params,
|
|
3983
|
+
files=_files,
|
|
3984
|
+
auth_settings=_auth_settings,
|
|
3985
|
+
collection_formats=_collection_formats,
|
|
3986
|
+
_host=_host,
|
|
3987
|
+
_request_auth=_request_auth
|
|
3988
|
+
)
|
|
3989
|
+
|
|
3990
|
+
|
|
3991
|
+
|
|
3992
|
+
|
|
3993
|
+
@validate_call
|
|
3994
|
+
async def resize_pty_session(
|
|
3995
|
+
self,
|
|
3996
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
3997
|
+
request: Annotated[PtyResizeRequest, Field(description="Resize request with new dimensions")],
|
|
3998
|
+
_request_timeout: Union[
|
|
3999
|
+
None,
|
|
4000
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4001
|
+
Tuple[
|
|
4002
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4003
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4004
|
+
]
|
|
4005
|
+
] = None,
|
|
4006
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4007
|
+
_content_type: Optional[StrictStr] = None,
|
|
4008
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4009
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4010
|
+
) -> PtySessionInfo:
|
|
4011
|
+
"""Resize a PTY session
|
|
4012
|
+
|
|
4013
|
+
Resize the terminal dimensions of a pseudo-terminal session
|
|
4014
|
+
|
|
4015
|
+
:param session_id: PTY session ID (required)
|
|
4016
|
+
:type session_id: str
|
|
4017
|
+
:param request: Resize request with new dimensions (required)
|
|
4018
|
+
:type request: PtyResizeRequest
|
|
4019
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4020
|
+
number provided, it will be total request
|
|
4021
|
+
timeout. It can also be a pair (tuple) of
|
|
4022
|
+
(connection, read) timeouts.
|
|
4023
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4024
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4025
|
+
request; this effectively ignores the
|
|
4026
|
+
authentication in the spec for a single request.
|
|
4027
|
+
:type _request_auth: dict, optional
|
|
4028
|
+
:param _content_type: force content-type for the request.
|
|
4029
|
+
:type _content_type: str, Optional
|
|
4030
|
+
:param _headers: set to override the headers for a single
|
|
4031
|
+
request; this effectively ignores the headers
|
|
4032
|
+
in the spec for a single request.
|
|
4033
|
+
:type _headers: dict, optional
|
|
4034
|
+
:param _host_index: set to override the host_index for a single
|
|
4035
|
+
request; this effectively ignores the host_index
|
|
4036
|
+
in the spec for a single request.
|
|
4037
|
+
:type _host_index: int, optional
|
|
4038
|
+
:return: Returns the result object.
|
|
4039
|
+
""" # noqa: E501
|
|
4040
|
+
|
|
4041
|
+
_param = self._resize_pty_session_serialize(
|
|
4042
|
+
session_id=session_id,
|
|
4043
|
+
request=request,
|
|
4044
|
+
_request_auth=_request_auth,
|
|
4045
|
+
_content_type=_content_type,
|
|
4046
|
+
_headers=_headers,
|
|
4047
|
+
_host_index=_host_index
|
|
4048
|
+
)
|
|
4049
|
+
|
|
4050
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4051
|
+
'200': "PtySessionInfo",
|
|
4052
|
+
}
|
|
4053
|
+
response_data = await self.api_client.call_api(
|
|
4054
|
+
*_param,
|
|
4055
|
+
_request_timeout=_request_timeout
|
|
4056
|
+
)
|
|
4057
|
+
await response_data.read()
|
|
4058
|
+
return self.api_client.response_deserialize(
|
|
4059
|
+
response_data=response_data,
|
|
4060
|
+
response_types_map=_response_types_map,
|
|
4061
|
+
).data
|
|
4062
|
+
|
|
4063
|
+
|
|
4064
|
+
@validate_call
|
|
4065
|
+
async def resize_pty_session_with_http_info(
|
|
4066
|
+
self,
|
|
4067
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
4068
|
+
request: Annotated[PtyResizeRequest, Field(description="Resize request with new dimensions")],
|
|
4069
|
+
_request_timeout: Union[
|
|
4070
|
+
None,
|
|
4071
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4072
|
+
Tuple[
|
|
4073
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4074
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4075
|
+
]
|
|
4076
|
+
] = None,
|
|
4077
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4078
|
+
_content_type: Optional[StrictStr] = None,
|
|
4079
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4080
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4081
|
+
) -> ApiResponse[PtySessionInfo]:
|
|
4082
|
+
"""Resize a PTY session
|
|
4083
|
+
|
|
4084
|
+
Resize the terminal dimensions of a pseudo-terminal session
|
|
4085
|
+
|
|
4086
|
+
:param session_id: PTY session ID (required)
|
|
4087
|
+
:type session_id: str
|
|
4088
|
+
:param request: Resize request with new dimensions (required)
|
|
4089
|
+
:type request: PtyResizeRequest
|
|
4090
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4091
|
+
number provided, it will be total request
|
|
4092
|
+
timeout. It can also be a pair (tuple) of
|
|
4093
|
+
(connection, read) timeouts.
|
|
4094
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4095
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4096
|
+
request; this effectively ignores the
|
|
4097
|
+
authentication in the spec for a single request.
|
|
4098
|
+
:type _request_auth: dict, optional
|
|
4099
|
+
:param _content_type: force content-type for the request.
|
|
4100
|
+
:type _content_type: str, Optional
|
|
4101
|
+
:param _headers: set to override the headers for a single
|
|
4102
|
+
request; this effectively ignores the headers
|
|
4103
|
+
in the spec for a single request.
|
|
4104
|
+
:type _headers: dict, optional
|
|
4105
|
+
:param _host_index: set to override the host_index for a single
|
|
4106
|
+
request; this effectively ignores the host_index
|
|
4107
|
+
in the spec for a single request.
|
|
4108
|
+
:type _host_index: int, optional
|
|
4109
|
+
:return: Returns the result object.
|
|
4110
|
+
""" # noqa: E501
|
|
4111
|
+
|
|
4112
|
+
_param = self._resize_pty_session_serialize(
|
|
4113
|
+
session_id=session_id,
|
|
4114
|
+
request=request,
|
|
4115
|
+
_request_auth=_request_auth,
|
|
4116
|
+
_content_type=_content_type,
|
|
4117
|
+
_headers=_headers,
|
|
4118
|
+
_host_index=_host_index
|
|
4119
|
+
)
|
|
4120
|
+
|
|
4121
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4122
|
+
'200': "PtySessionInfo",
|
|
4123
|
+
}
|
|
4124
|
+
response_data = await self.api_client.call_api(
|
|
4125
|
+
*_param,
|
|
4126
|
+
_request_timeout=_request_timeout
|
|
4127
|
+
)
|
|
4128
|
+
await response_data.read()
|
|
4129
|
+
return self.api_client.response_deserialize(
|
|
4130
|
+
response_data=response_data,
|
|
4131
|
+
response_types_map=_response_types_map,
|
|
4132
|
+
)
|
|
4133
|
+
|
|
4134
|
+
|
|
4135
|
+
@validate_call
|
|
4136
|
+
async def resize_pty_session_without_preload_content(
|
|
4137
|
+
self,
|
|
4138
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
4139
|
+
request: Annotated[PtyResizeRequest, Field(description="Resize request with new dimensions")],
|
|
4140
|
+
_request_timeout: Union[
|
|
4141
|
+
None,
|
|
4142
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4143
|
+
Tuple[
|
|
4144
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4145
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4146
|
+
]
|
|
4147
|
+
] = None,
|
|
4148
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4149
|
+
_content_type: Optional[StrictStr] = None,
|
|
4150
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4151
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4152
|
+
) -> RESTResponseType:
|
|
4153
|
+
"""Resize a PTY session
|
|
4154
|
+
|
|
4155
|
+
Resize the terminal dimensions of a pseudo-terminal session
|
|
4156
|
+
|
|
4157
|
+
:param session_id: PTY session ID (required)
|
|
4158
|
+
:type session_id: str
|
|
4159
|
+
:param request: Resize request with new dimensions (required)
|
|
4160
|
+
:type request: PtyResizeRequest
|
|
4161
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4162
|
+
number provided, it will be total request
|
|
4163
|
+
timeout. It can also be a pair (tuple) of
|
|
4164
|
+
(connection, read) timeouts.
|
|
4165
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4166
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4167
|
+
request; this effectively ignores the
|
|
4168
|
+
authentication in the spec for a single request.
|
|
4169
|
+
:type _request_auth: dict, optional
|
|
4170
|
+
:param _content_type: force content-type for the request.
|
|
4171
|
+
:type _content_type: str, Optional
|
|
4172
|
+
:param _headers: set to override the headers for a single
|
|
4173
|
+
request; this effectively ignores the headers
|
|
4174
|
+
in the spec for a single request.
|
|
4175
|
+
:type _headers: dict, optional
|
|
4176
|
+
:param _host_index: set to override the host_index for a single
|
|
4177
|
+
request; this effectively ignores the host_index
|
|
4178
|
+
in the spec for a single request.
|
|
4179
|
+
:type _host_index: int, optional
|
|
4180
|
+
:return: Returns the result object.
|
|
4181
|
+
""" # noqa: E501
|
|
4182
|
+
|
|
4183
|
+
_param = self._resize_pty_session_serialize(
|
|
4184
|
+
session_id=session_id,
|
|
4185
|
+
request=request,
|
|
4186
|
+
_request_auth=_request_auth,
|
|
4187
|
+
_content_type=_content_type,
|
|
4188
|
+
_headers=_headers,
|
|
4189
|
+
_host_index=_host_index
|
|
4190
|
+
)
|
|
4191
|
+
|
|
4192
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4193
|
+
'200': "PtySessionInfo",
|
|
4194
|
+
}
|
|
4195
|
+
response_data = await self.api_client.call_api(
|
|
4196
|
+
*_param,
|
|
4197
|
+
_request_timeout=_request_timeout
|
|
4198
|
+
)
|
|
4199
|
+
return response_data.response
|
|
4200
|
+
|
|
4201
|
+
|
|
4202
|
+
def _resize_pty_session_serialize(
|
|
4203
|
+
self,
|
|
4204
|
+
session_id,
|
|
4205
|
+
request,
|
|
4206
|
+
_request_auth,
|
|
4207
|
+
_content_type,
|
|
4208
|
+
_headers,
|
|
4209
|
+
_host_index,
|
|
4210
|
+
) -> RequestSerialized:
|
|
4211
|
+
|
|
4212
|
+
_host = None
|
|
4213
|
+
|
|
4214
|
+
_collection_formats: Dict[str, str] = {
|
|
4215
|
+
}
|
|
4216
|
+
|
|
4217
|
+
_path_params: Dict[str, str] = {}
|
|
4218
|
+
_query_params: List[Tuple[str, str]] = []
|
|
4219
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
4220
|
+
_form_params: List[Tuple[str, str]] = []
|
|
4221
|
+
_files: Dict[
|
|
4222
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
4223
|
+
] = {}
|
|
4224
|
+
_body_params: Optional[bytes] = None
|
|
4225
|
+
|
|
4226
|
+
# process the path parameters
|
|
4227
|
+
if session_id is not None:
|
|
4228
|
+
_path_params['sessionId'] = session_id
|
|
4229
|
+
# process the query parameters
|
|
4230
|
+
# process the header parameters
|
|
4231
|
+
# process the form parameters
|
|
4232
|
+
# process the body parameter
|
|
4233
|
+
if request is not None:
|
|
4234
|
+
_body_params = request
|
|
4235
|
+
|
|
4236
|
+
|
|
4237
|
+
# set the HTTP header `Accept`
|
|
4238
|
+
if 'Accept' not in _header_params:
|
|
4239
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
4240
|
+
[
|
|
4241
|
+
'application/json'
|
|
4242
|
+
]
|
|
4243
|
+
)
|
|
4244
|
+
|
|
4245
|
+
# set the HTTP header `Content-Type`
|
|
4246
|
+
if _content_type:
|
|
4247
|
+
_header_params['Content-Type'] = _content_type
|
|
4248
|
+
else:
|
|
4249
|
+
_default_content_type = (
|
|
4250
|
+
self.api_client.select_header_content_type(
|
|
4251
|
+
[
|
|
4252
|
+
'application/json'
|
|
4253
|
+
]
|
|
4254
|
+
)
|
|
4255
|
+
)
|
|
4256
|
+
if _default_content_type is not None:
|
|
4257
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4258
|
+
|
|
4259
|
+
# authentication setting
|
|
4260
|
+
_auth_settings: List[str] = [
|
|
4261
|
+
]
|
|
4262
|
+
|
|
4263
|
+
return self.api_client.param_serialize(
|
|
4264
|
+
method='POST',
|
|
4265
|
+
resource_path='/process/pty/{sessionId}/resize',
|
|
4266
|
+
path_params=_path_params,
|
|
4267
|
+
query_params=_query_params,
|
|
4268
|
+
header_params=_header_params,
|
|
4269
|
+
body=_body_params,
|
|
4270
|
+
post_params=_form_params,
|
|
4271
|
+
files=_files,
|
|
4272
|
+
auth_settings=_auth_settings,
|
|
4273
|
+
collection_formats=_collection_formats,
|
|
4274
|
+
_host=_host,
|
|
4275
|
+
_request_auth=_request_auth
|
|
4276
|
+
)
|
|
4277
|
+
|
|
4278
|
+
|
|
4279
|
+
|
|
4280
|
+
|
|
4281
|
+
@validate_call
|
|
4282
|
+
async def send_input(
|
|
4283
|
+
self,
|
|
4284
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
4285
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
4286
|
+
request: Annotated[SessionSendInputRequest, Field(description="Input send request")],
|
|
4287
|
+
_request_timeout: Union[
|
|
4288
|
+
None,
|
|
4289
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4290
|
+
Tuple[
|
|
4291
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4292
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4293
|
+
]
|
|
4294
|
+
] = None,
|
|
4295
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4296
|
+
_content_type: Optional[StrictStr] = None,
|
|
4297
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4298
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4299
|
+
) -> None:
|
|
4300
|
+
"""Send input to command
|
|
4301
|
+
|
|
4302
|
+
Send input data to a running command in a session for interactive execution
|
|
4303
|
+
|
|
4304
|
+
:param session_id: Session ID (required)
|
|
4305
|
+
:type session_id: str
|
|
4306
|
+
:param command_id: Command ID (required)
|
|
4307
|
+
:type command_id: str
|
|
4308
|
+
:param request: Input send request (required)
|
|
4309
|
+
:type request: SessionSendInputRequest
|
|
4310
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4311
|
+
number provided, it will be total request
|
|
4312
|
+
timeout. It can also be a pair (tuple) of
|
|
4313
|
+
(connection, read) timeouts.
|
|
4314
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4315
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4316
|
+
request; this effectively ignores the
|
|
4317
|
+
authentication in the spec for a single request.
|
|
4318
|
+
:type _request_auth: dict, optional
|
|
4319
|
+
:param _content_type: force content-type for the request.
|
|
4320
|
+
:type _content_type: str, Optional
|
|
4321
|
+
:param _headers: set to override the headers for a single
|
|
4322
|
+
request; this effectively ignores the headers
|
|
4323
|
+
in the spec for a single request.
|
|
4324
|
+
:type _headers: dict, optional
|
|
4325
|
+
:param _host_index: set to override the host_index for a single
|
|
4326
|
+
request; this effectively ignores the host_index
|
|
4327
|
+
in the spec for a single request.
|
|
4328
|
+
:type _host_index: int, optional
|
|
4329
|
+
:return: Returns the result object.
|
|
4330
|
+
""" # noqa: E501
|
|
4331
|
+
|
|
4332
|
+
_param = self._send_input_serialize(
|
|
4333
|
+
session_id=session_id,
|
|
4334
|
+
command_id=command_id,
|
|
4335
|
+
request=request,
|
|
4336
|
+
_request_auth=_request_auth,
|
|
4337
|
+
_content_type=_content_type,
|
|
4338
|
+
_headers=_headers,
|
|
4339
|
+
_host_index=_host_index
|
|
4340
|
+
)
|
|
4341
|
+
|
|
4342
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4343
|
+
'204': None,
|
|
4344
|
+
}
|
|
4345
|
+
response_data = await self.api_client.call_api(
|
|
4346
|
+
*_param,
|
|
4347
|
+
_request_timeout=_request_timeout
|
|
4348
|
+
)
|
|
4349
|
+
await response_data.read()
|
|
4350
|
+
return self.api_client.response_deserialize(
|
|
4351
|
+
response_data=response_data,
|
|
4352
|
+
response_types_map=_response_types_map,
|
|
4353
|
+
).data
|
|
4354
|
+
|
|
4355
|
+
|
|
4356
|
+
@validate_call
|
|
4357
|
+
async def send_input_with_http_info(
|
|
4358
|
+
self,
|
|
4359
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
4360
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
4361
|
+
request: Annotated[SessionSendInputRequest, Field(description="Input send request")],
|
|
4362
|
+
_request_timeout: Union[
|
|
4363
|
+
None,
|
|
4364
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4365
|
+
Tuple[
|
|
4366
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4367
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4368
|
+
]
|
|
4369
|
+
] = None,
|
|
4370
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4371
|
+
_content_type: Optional[StrictStr] = None,
|
|
4372
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4373
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4374
|
+
) -> ApiResponse[None]:
|
|
4375
|
+
"""Send input to command
|
|
4376
|
+
|
|
4377
|
+
Send input data to a running command in a session for interactive execution
|
|
4378
|
+
|
|
4379
|
+
:param session_id: Session ID (required)
|
|
4380
|
+
:type session_id: str
|
|
4381
|
+
:param command_id: Command ID (required)
|
|
4382
|
+
:type command_id: str
|
|
4383
|
+
:param request: Input send request (required)
|
|
4384
|
+
:type request: SessionSendInputRequest
|
|
4385
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4386
|
+
number provided, it will be total request
|
|
4387
|
+
timeout. It can also be a pair (tuple) of
|
|
4388
|
+
(connection, read) timeouts.
|
|
4389
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4390
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4391
|
+
request; this effectively ignores the
|
|
4392
|
+
authentication in the spec for a single request.
|
|
4393
|
+
:type _request_auth: dict, optional
|
|
4394
|
+
:param _content_type: force content-type for the request.
|
|
4395
|
+
:type _content_type: str, Optional
|
|
4396
|
+
:param _headers: set to override the headers for a single
|
|
4397
|
+
request; this effectively ignores the headers
|
|
4398
|
+
in the spec for a single request.
|
|
4399
|
+
:type _headers: dict, optional
|
|
4400
|
+
:param _host_index: set to override the host_index for a single
|
|
4401
|
+
request; this effectively ignores the host_index
|
|
4402
|
+
in the spec for a single request.
|
|
4403
|
+
:type _host_index: int, optional
|
|
4404
|
+
:return: Returns the result object.
|
|
4405
|
+
""" # noqa: E501
|
|
4406
|
+
|
|
4407
|
+
_param = self._send_input_serialize(
|
|
4408
|
+
session_id=session_id,
|
|
4409
|
+
command_id=command_id,
|
|
4410
|
+
request=request,
|
|
4411
|
+
_request_auth=_request_auth,
|
|
4412
|
+
_content_type=_content_type,
|
|
4413
|
+
_headers=_headers,
|
|
4414
|
+
_host_index=_host_index
|
|
4415
|
+
)
|
|
4416
|
+
|
|
4417
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4418
|
+
'204': None,
|
|
4419
|
+
}
|
|
4420
|
+
response_data = await self.api_client.call_api(
|
|
4421
|
+
*_param,
|
|
4422
|
+
_request_timeout=_request_timeout
|
|
4423
|
+
)
|
|
4424
|
+
await response_data.read()
|
|
4425
|
+
return self.api_client.response_deserialize(
|
|
4426
|
+
response_data=response_data,
|
|
4427
|
+
response_types_map=_response_types_map,
|
|
4428
|
+
)
|
|
4429
|
+
|
|
4430
|
+
|
|
4431
|
+
@validate_call
|
|
4432
|
+
async def send_input_without_preload_content(
|
|
4433
|
+
self,
|
|
4434
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
4435
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
4436
|
+
request: Annotated[SessionSendInputRequest, Field(description="Input send request")],
|
|
4437
|
+
_request_timeout: Union[
|
|
4438
|
+
None,
|
|
4439
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4440
|
+
Tuple[
|
|
4441
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4442
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4443
|
+
]
|
|
4444
|
+
] = None,
|
|
4445
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4446
|
+
_content_type: Optional[StrictStr] = None,
|
|
4447
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4448
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4449
|
+
) -> RESTResponseType:
|
|
4450
|
+
"""Send input to command
|
|
4451
|
+
|
|
4452
|
+
Send input data to a running command in a session for interactive execution
|
|
4453
|
+
|
|
4454
|
+
:param session_id: Session ID (required)
|
|
4455
|
+
:type session_id: str
|
|
4456
|
+
:param command_id: Command ID (required)
|
|
4457
|
+
:type command_id: str
|
|
4458
|
+
:param request: Input send request (required)
|
|
4459
|
+
:type request: SessionSendInputRequest
|
|
4460
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4461
|
+
number provided, it will be total request
|
|
4462
|
+
timeout. It can also be a pair (tuple) of
|
|
4463
|
+
(connection, read) timeouts.
|
|
4464
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4465
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4466
|
+
request; this effectively ignores the
|
|
4467
|
+
authentication in the spec for a single request.
|
|
4468
|
+
:type _request_auth: dict, optional
|
|
4469
|
+
:param _content_type: force content-type for the request.
|
|
4470
|
+
:type _content_type: str, Optional
|
|
4471
|
+
:param _headers: set to override the headers for a single
|
|
4472
|
+
request; this effectively ignores the headers
|
|
4473
|
+
in the spec for a single request.
|
|
4474
|
+
:type _headers: dict, optional
|
|
4475
|
+
:param _host_index: set to override the host_index for a single
|
|
4476
|
+
request; this effectively ignores the host_index
|
|
4477
|
+
in the spec for a single request.
|
|
4478
|
+
:type _host_index: int, optional
|
|
4479
|
+
:return: Returns the result object.
|
|
4480
|
+
""" # noqa: E501
|
|
4481
|
+
|
|
4482
|
+
_param = self._send_input_serialize(
|
|
4483
|
+
session_id=session_id,
|
|
4484
|
+
command_id=command_id,
|
|
4485
|
+
request=request,
|
|
4486
|
+
_request_auth=_request_auth,
|
|
4487
|
+
_content_type=_content_type,
|
|
4488
|
+
_headers=_headers,
|
|
4489
|
+
_host_index=_host_index
|
|
4490
|
+
)
|
|
4491
|
+
|
|
4492
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4493
|
+
'204': None,
|
|
4494
|
+
}
|
|
4495
|
+
response_data = await self.api_client.call_api(
|
|
4496
|
+
*_param,
|
|
4497
|
+
_request_timeout=_request_timeout
|
|
4498
|
+
)
|
|
4499
|
+
return response_data.response
|
|
4500
|
+
|
|
4501
|
+
|
|
4502
|
+
def _send_input_serialize(
|
|
4503
|
+
self,
|
|
4504
|
+
session_id,
|
|
4505
|
+
command_id,
|
|
4506
|
+
request,
|
|
4507
|
+
_request_auth,
|
|
4508
|
+
_content_type,
|
|
4509
|
+
_headers,
|
|
4510
|
+
_host_index,
|
|
4511
|
+
) -> RequestSerialized:
|
|
4512
|
+
|
|
4513
|
+
_host = None
|
|
4514
|
+
|
|
4515
|
+
_collection_formats: Dict[str, str] = {
|
|
4516
|
+
}
|
|
4517
|
+
|
|
4518
|
+
_path_params: Dict[str, str] = {}
|
|
4519
|
+
_query_params: List[Tuple[str, str]] = []
|
|
4520
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
4521
|
+
_form_params: List[Tuple[str, str]] = []
|
|
4522
|
+
_files: Dict[
|
|
4523
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
4524
|
+
] = {}
|
|
4525
|
+
_body_params: Optional[bytes] = None
|
|
4526
|
+
|
|
4527
|
+
# process the path parameters
|
|
4528
|
+
if session_id is not None:
|
|
4529
|
+
_path_params['sessionId'] = session_id
|
|
4530
|
+
if command_id is not None:
|
|
4531
|
+
_path_params['commandId'] = command_id
|
|
4532
|
+
# process the query parameters
|
|
4533
|
+
# process the header parameters
|
|
4534
|
+
# process the form parameters
|
|
4535
|
+
# process the body parameter
|
|
4536
|
+
if request is not None:
|
|
4537
|
+
_body_params = request
|
|
4538
|
+
|
|
4539
|
+
|
|
4540
|
+
|
|
4541
|
+
# set the HTTP header `Content-Type`
|
|
4542
|
+
if _content_type:
|
|
4543
|
+
_header_params['Content-Type'] = _content_type
|
|
4544
|
+
else:
|
|
4545
|
+
_default_content_type = (
|
|
4546
|
+
self.api_client.select_header_content_type(
|
|
4547
|
+
[
|
|
4548
|
+
'application/json'
|
|
4549
|
+
]
|
|
4550
|
+
)
|
|
4551
|
+
)
|
|
4552
|
+
if _default_content_type is not None:
|
|
4553
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4554
|
+
|
|
4555
|
+
# authentication setting
|
|
4556
|
+
_auth_settings: List[str] = [
|
|
4557
|
+
]
|
|
4558
|
+
|
|
4559
|
+
return self.api_client.param_serialize(
|
|
4560
|
+
method='POST',
|
|
4561
|
+
resource_path='/process/session/{sessionId}/command/{commandId}/input',
|
|
4562
|
+
path_params=_path_params,
|
|
4563
|
+
query_params=_query_params,
|
|
4564
|
+
header_params=_header_params,
|
|
4565
|
+
body=_body_params,
|
|
4566
|
+
post_params=_form_params,
|
|
4567
|
+
files=_files,
|
|
4568
|
+
auth_settings=_auth_settings,
|
|
4569
|
+
collection_formats=_collection_formats,
|
|
4570
|
+
_host=_host,
|
|
4571
|
+
_request_auth=_request_auth
|
|
4572
|
+
)
|
|
4573
|
+
|
|
4574
|
+
|
|
4575
|
+
|
|
4576
|
+
|
|
4577
|
+
@validate_call
|
|
4578
|
+
async def session_execute_command(
|
|
4579
|
+
self,
|
|
4580
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
4581
|
+
request: Annotated[SessionExecuteRequest, Field(description="Command execution request")],
|
|
4582
|
+
_request_timeout: Union[
|
|
4583
|
+
None,
|
|
4584
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4585
|
+
Tuple[
|
|
4586
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4587
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4588
|
+
]
|
|
4589
|
+
] = None,
|
|
4590
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4591
|
+
_content_type: Optional[StrictStr] = None,
|
|
4592
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4593
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4594
|
+
) -> SessionExecuteResponse:
|
|
4595
|
+
"""Execute command in session
|
|
4596
|
+
|
|
4597
|
+
Execute a command within an existing shell session
|
|
4598
|
+
|
|
4599
|
+
:param session_id: Session ID (required)
|
|
4600
|
+
:type session_id: str
|
|
4601
|
+
:param request: Command execution request (required)
|
|
4602
|
+
:type request: SessionExecuteRequest
|
|
4603
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4604
|
+
number provided, it will be total request
|
|
4605
|
+
timeout. It can also be a pair (tuple) of
|
|
4606
|
+
(connection, read) timeouts.
|
|
4607
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4608
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4609
|
+
request; this effectively ignores the
|
|
4610
|
+
authentication in the spec for a single request.
|
|
4611
|
+
:type _request_auth: dict, optional
|
|
4612
|
+
:param _content_type: force content-type for the request.
|
|
4613
|
+
:type _content_type: str, Optional
|
|
4614
|
+
:param _headers: set to override the headers for a single
|
|
4615
|
+
request; this effectively ignores the headers
|
|
4616
|
+
in the spec for a single request.
|
|
4617
|
+
:type _headers: dict, optional
|
|
4618
|
+
:param _host_index: set to override the host_index for a single
|
|
4619
|
+
request; this effectively ignores the host_index
|
|
4620
|
+
in the spec for a single request.
|
|
4621
|
+
:type _host_index: int, optional
|
|
4622
|
+
:return: Returns the result object.
|
|
4623
|
+
""" # noqa: E501
|
|
4624
|
+
|
|
4625
|
+
_param = self._session_execute_command_serialize(
|
|
4626
|
+
session_id=session_id,
|
|
4627
|
+
request=request,
|
|
4628
|
+
_request_auth=_request_auth,
|
|
4629
|
+
_content_type=_content_type,
|
|
4630
|
+
_headers=_headers,
|
|
4631
|
+
_host_index=_host_index
|
|
4632
|
+
)
|
|
4633
|
+
|
|
4634
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4635
|
+
'200': "SessionExecuteResponse",
|
|
4636
|
+
'202': "SessionExecuteResponse",
|
|
4637
|
+
}
|
|
4638
|
+
response_data = await self.api_client.call_api(
|
|
4639
|
+
*_param,
|
|
4640
|
+
_request_timeout=_request_timeout
|
|
4641
|
+
)
|
|
4642
|
+
await response_data.read()
|
|
4643
|
+
return self.api_client.response_deserialize(
|
|
4644
|
+
response_data=response_data,
|
|
4645
|
+
response_types_map=_response_types_map,
|
|
4646
|
+
).data
|
|
4647
|
+
|
|
4648
|
+
|
|
4649
|
+
@validate_call
|
|
4650
|
+
async def session_execute_command_with_http_info(
|
|
4651
|
+
self,
|
|
4652
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
4653
|
+
request: Annotated[SessionExecuteRequest, Field(description="Command execution request")],
|
|
4654
|
+
_request_timeout: Union[
|
|
4655
|
+
None,
|
|
4656
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4657
|
+
Tuple[
|
|
4658
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4659
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4660
|
+
]
|
|
4661
|
+
] = None,
|
|
4662
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4663
|
+
_content_type: Optional[StrictStr] = None,
|
|
4664
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4665
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4666
|
+
) -> ApiResponse[SessionExecuteResponse]:
|
|
4667
|
+
"""Execute command in session
|
|
4668
|
+
|
|
4669
|
+
Execute a command within an existing shell session
|
|
4670
|
+
|
|
4671
|
+
:param session_id: Session ID (required)
|
|
4672
|
+
:type session_id: str
|
|
4673
|
+
:param request: Command execution request (required)
|
|
4674
|
+
:type request: SessionExecuteRequest
|
|
4675
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4676
|
+
number provided, it will be total request
|
|
4677
|
+
timeout. It can also be a pair (tuple) of
|
|
4678
|
+
(connection, read) timeouts.
|
|
4679
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4680
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4681
|
+
request; this effectively ignores the
|
|
4682
|
+
authentication in the spec for a single request.
|
|
4683
|
+
:type _request_auth: dict, optional
|
|
4684
|
+
:param _content_type: force content-type for the request.
|
|
4685
|
+
:type _content_type: str, Optional
|
|
4686
|
+
:param _headers: set to override the headers for a single
|
|
4687
|
+
request; this effectively ignores the headers
|
|
4688
|
+
in the spec for a single request.
|
|
4689
|
+
:type _headers: dict, optional
|
|
4690
|
+
:param _host_index: set to override the host_index for a single
|
|
4691
|
+
request; this effectively ignores the host_index
|
|
4692
|
+
in the spec for a single request.
|
|
4693
|
+
:type _host_index: int, optional
|
|
4694
|
+
:return: Returns the result object.
|
|
4695
|
+
""" # noqa: E501
|
|
4696
|
+
|
|
4697
|
+
_param = self._session_execute_command_serialize(
|
|
4698
|
+
session_id=session_id,
|
|
4699
|
+
request=request,
|
|
4700
|
+
_request_auth=_request_auth,
|
|
4701
|
+
_content_type=_content_type,
|
|
4702
|
+
_headers=_headers,
|
|
4703
|
+
_host_index=_host_index
|
|
4704
|
+
)
|
|
4705
|
+
|
|
4706
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4707
|
+
'200': "SessionExecuteResponse",
|
|
4708
|
+
'202': "SessionExecuteResponse",
|
|
4709
|
+
}
|
|
4710
|
+
response_data = await self.api_client.call_api(
|
|
4711
|
+
*_param,
|
|
4712
|
+
_request_timeout=_request_timeout
|
|
4713
|
+
)
|
|
4714
|
+
await response_data.read()
|
|
4715
|
+
return self.api_client.response_deserialize(
|
|
4716
|
+
response_data=response_data,
|
|
4717
|
+
response_types_map=_response_types_map,
|
|
4718
|
+
)
|
|
4719
|
+
|
|
4720
|
+
|
|
4721
|
+
@validate_call
|
|
4722
|
+
async def session_execute_command_without_preload_content(
|
|
4723
|
+
self,
|
|
4724
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
4725
|
+
request: Annotated[SessionExecuteRequest, Field(description="Command execution request")],
|
|
4726
|
+
_request_timeout: Union[
|
|
4727
|
+
None,
|
|
4728
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4729
|
+
Tuple[
|
|
4730
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4731
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4732
|
+
]
|
|
4733
|
+
] = None,
|
|
4734
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4735
|
+
_content_type: Optional[StrictStr] = None,
|
|
4736
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4737
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4738
|
+
) -> RESTResponseType:
|
|
4739
|
+
"""Execute command in session
|
|
4740
|
+
|
|
4741
|
+
Execute a command within an existing shell session
|
|
4742
|
+
|
|
4743
|
+
:param session_id: Session ID (required)
|
|
4744
|
+
:type session_id: str
|
|
4745
|
+
:param request: Command execution request (required)
|
|
4746
|
+
:type request: SessionExecuteRequest
|
|
4747
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4748
|
+
number provided, it will be total request
|
|
4749
|
+
timeout. It can also be a pair (tuple) of
|
|
4750
|
+
(connection, read) timeouts.
|
|
4751
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4752
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4753
|
+
request; this effectively ignores the
|
|
4754
|
+
authentication in the spec for a single request.
|
|
4755
|
+
:type _request_auth: dict, optional
|
|
4756
|
+
:param _content_type: force content-type for the request.
|
|
4757
|
+
:type _content_type: str, Optional
|
|
4758
|
+
:param _headers: set to override the headers for a single
|
|
4759
|
+
request; this effectively ignores the headers
|
|
4760
|
+
in the spec for a single request.
|
|
4761
|
+
:type _headers: dict, optional
|
|
4762
|
+
:param _host_index: set to override the host_index for a single
|
|
4763
|
+
request; this effectively ignores the host_index
|
|
4764
|
+
in the spec for a single request.
|
|
4765
|
+
:type _host_index: int, optional
|
|
4766
|
+
:return: Returns the result object.
|
|
4767
|
+
""" # noqa: E501
|
|
4768
|
+
|
|
4769
|
+
_param = self._session_execute_command_serialize(
|
|
4770
|
+
session_id=session_id,
|
|
4771
|
+
request=request,
|
|
4772
|
+
_request_auth=_request_auth,
|
|
4773
|
+
_content_type=_content_type,
|
|
4774
|
+
_headers=_headers,
|
|
4775
|
+
_host_index=_host_index
|
|
4776
|
+
)
|
|
4777
|
+
|
|
4778
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4779
|
+
'200': "SessionExecuteResponse",
|
|
4780
|
+
'202': "SessionExecuteResponse",
|
|
4781
|
+
}
|
|
4782
|
+
response_data = await self.api_client.call_api(
|
|
4783
|
+
*_param,
|
|
4784
|
+
_request_timeout=_request_timeout
|
|
4785
|
+
)
|
|
4786
|
+
return response_data.response
|
|
4787
|
+
|
|
4788
|
+
|
|
4789
|
+
def _session_execute_command_serialize(
|
|
4790
|
+
self,
|
|
4791
|
+
session_id,
|
|
4792
|
+
request,
|
|
4793
|
+
_request_auth,
|
|
4794
|
+
_content_type,
|
|
4795
|
+
_headers,
|
|
4796
|
+
_host_index,
|
|
4797
|
+
) -> RequestSerialized:
|
|
4798
|
+
|
|
4799
|
+
_host = None
|
|
4800
|
+
|
|
4801
|
+
_collection_formats: Dict[str, str] = {
|
|
4802
|
+
}
|
|
4803
|
+
|
|
4804
|
+
_path_params: Dict[str, str] = {}
|
|
4805
|
+
_query_params: List[Tuple[str, str]] = []
|
|
4806
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
4807
|
+
_form_params: List[Tuple[str, str]] = []
|
|
4808
|
+
_files: Dict[
|
|
4809
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
4810
|
+
] = {}
|
|
4811
|
+
_body_params: Optional[bytes] = None
|
|
4812
|
+
|
|
4813
|
+
# process the path parameters
|
|
4814
|
+
if session_id is not None:
|
|
4815
|
+
_path_params['sessionId'] = session_id
|
|
4816
|
+
# process the query parameters
|
|
4817
|
+
# process the header parameters
|
|
4818
|
+
# process the form parameters
|
|
4819
|
+
# process the body parameter
|
|
4820
|
+
if request is not None:
|
|
4821
|
+
_body_params = request
|
|
4822
|
+
|
|
4823
|
+
|
|
4824
|
+
# set the HTTP header `Accept`
|
|
4825
|
+
if 'Accept' not in _header_params:
|
|
4826
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
4827
|
+
[
|
|
4828
|
+
'application/json'
|
|
4829
|
+
]
|
|
4830
|
+
)
|
|
4831
|
+
|
|
4832
|
+
# set the HTTP header `Content-Type`
|
|
4833
|
+
if _content_type:
|
|
4834
|
+
_header_params['Content-Type'] = _content_type
|
|
4835
|
+
else:
|
|
4836
|
+
_default_content_type = (
|
|
4837
|
+
self.api_client.select_header_content_type(
|
|
4838
|
+
[
|
|
4839
|
+
'application/json'
|
|
4840
|
+
]
|
|
4841
|
+
)
|
|
4842
|
+
)
|
|
4843
|
+
if _default_content_type is not None:
|
|
4844
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4845
|
+
|
|
4846
|
+
# authentication setting
|
|
4847
|
+
_auth_settings: List[str] = [
|
|
4848
|
+
]
|
|
4849
|
+
|
|
4850
|
+
return self.api_client.param_serialize(
|
|
4851
|
+
method='POST',
|
|
4852
|
+
resource_path='/process/session/{sessionId}/exec',
|
|
4853
|
+
path_params=_path_params,
|
|
4854
|
+
query_params=_query_params,
|
|
4855
|
+
header_params=_header_params,
|
|
4856
|
+
body=_body_params,
|
|
4857
|
+
post_params=_form_params,
|
|
4858
|
+
files=_files,
|
|
4859
|
+
auth_settings=_auth_settings,
|
|
4860
|
+
collection_formats=_collection_formats,
|
|
4861
|
+
_host=_host,
|
|
4862
|
+
_request_auth=_request_auth
|
|
4863
|
+
)
|
|
4864
|
+
|
|
4865
|
+
|