daytona_api_client 0.26.0rc1__py3-none-any.whl → 0.27.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of daytona_api_client might be problematic. Click here for more details.

Files changed (47) hide show
  1. daytona_api_client/__init__.py +12 -1
  2. daytona_api_client/api/__init__.py +2 -0
  3. daytona_api_client/api/api_keys_api.py +282 -0
  4. daytona_api_client/api/default_api.py +1884 -0
  5. daytona_api_client/api/health_api.py +282 -0
  6. daytona_api_client/api/organizations_api.py +6 -6
  7. daytona_api_client/api/sandbox_api.py +855 -2
  8. daytona_api_client/api/toolbox_api.py +6 -6
  9. daytona_api_client/api/webhooks_api.py +1704 -0
  10. daytona_api_client/models/__init__.py +10 -1
  11. daytona_api_client/models/api_key_list.py +4 -2
  12. daytona_api_client/models/create_audit_log.py +2 -2
  13. daytona_api_client/models/health_controller_check200_response.py +154 -0
  14. daytona_api_client/models/health_controller_check200_response_info_value.py +101 -0
  15. daytona_api_client/models/health_controller_check503_response.py +154 -0
  16. daytona_api_client/models/{usage_overview.py → organization_usage_overview.py} +14 -8
  17. daytona_api_client/models/sandbox_created_post_request.py +110 -0
  18. daytona_api_client/models/sandbox_created_post_request_data.py +152 -0
  19. daytona_api_client/models/sandbox_state_updated_post_request.py +110 -0
  20. daytona_api_client/models/sandbox_state_updated_post_request_data.py +129 -0
  21. daytona_api_client/models/sandbox_state_updated_post_request_data_sandbox.py +115 -0
  22. daytona_api_client/models/send_webhook_dto.py +105 -0
  23. daytona_api_client/models/session_command_logs_response.py +103 -0
  24. daytona_api_client/models/session_execute_response.py +1 -1
  25. daytona_api_client/models/snapshot_created_post_request.py +110 -0
  26. daytona_api_client/models/snapshot_created_post_request_data.py +136 -0
  27. daytona_api_client/models/snapshot_removed_post_request.py +106 -0
  28. daytona_api_client/models/snapshot_state_updated_post_request.py +110 -0
  29. daytona_api_client/models/snapshot_state_updated_post_request_data.py +129 -0
  30. daytona_api_client/models/snapshot_state_updated_post_request_data_snapshot.py +115 -0
  31. daytona_api_client/models/ssh_access_dto.py +112 -0
  32. daytona_api_client/models/ssh_access_validation_dto.py +107 -0
  33. daytona_api_client/models/volume_created_post_request.py +110 -0
  34. daytona_api_client/models/volume_created_post_request_data.py +126 -0
  35. daytona_api_client/models/volume_state_updated_post_request.py +110 -0
  36. daytona_api_client/models/volume_state_updated_post_request_data.py +129 -0
  37. daytona_api_client/models/volume_state_updated_post_request_data_volume.py +115 -0
  38. daytona_api_client/models/webhook_app_portal_access.py +101 -0
  39. daytona_api_client/models/webhook_controller_get_app_portal_access200_response.py +101 -0
  40. daytona_api_client/models/webhook_controller_get_initialization_status200_response.py +118 -0
  41. daytona_api_client/models/{toggle_state.py → webhook_controller_get_status200_response.py} +7 -7
  42. daytona_api_client/models/webhook_initialization_status.py +121 -0
  43. {daytona_api_client-0.26.0rc1.dist-info → daytona_api_client-0.27.0.dist-info}/METADATA +1 -1
  44. {daytona_api_client-0.26.0rc1.dist-info → daytona_api_client-0.27.0.dist-info}/RECORD +47 -17
  45. {daytona_api_client-0.26.0rc1.dist-info → daytona_api_client-0.27.0.dist-info}/WHEEL +0 -0
  46. {daytona_api_client-0.26.0rc1.dist-info → daytona_api_client-0.27.0.dist-info}/licenses/LICENSE +0 -0
  47. {daytona_api_client-0.26.0rc1.dist-info → daytona_api_client-0.27.0.dist-info}/top_level.txt +0 -0
@@ -24,6 +24,8 @@ from daytona_api_client.models.create_sandbox import CreateSandbox
24
24
  from daytona_api_client.models.port_preview_url import PortPreviewUrl
25
25
  from daytona_api_client.models.sandbox import Sandbox
26
26
  from daytona_api_client.models.sandbox_labels import SandboxLabels
27
+ from daytona_api_client.models.ssh_access_dto import SshAccessDto
28
+ from daytona_api_client.models.ssh_access_validation_dto import SshAccessValidationDto
27
29
 
28
30
  from daytona_api_client.api_client import ApiClient, RequestSerialized
29
31
  from daytona_api_client.api_response import ApiResponse
@@ -871,6 +873,297 @@ class SandboxApi:
871
873
 
872
874
 
873
875
 
876
+ @validate_call
877
+ def create_ssh_access(
878
+ self,
879
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
880
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
881
+ expires_in_minutes: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Expiration time in minutes (default: 60)")] = None,
882
+ _request_timeout: Union[
883
+ None,
884
+ Annotated[StrictFloat, Field(gt=0)],
885
+ Tuple[
886
+ Annotated[StrictFloat, Field(gt=0)],
887
+ Annotated[StrictFloat, Field(gt=0)]
888
+ ]
889
+ ] = None,
890
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
891
+ _content_type: Optional[StrictStr] = None,
892
+ _headers: Optional[Dict[StrictStr, Any]] = None,
893
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
894
+ ) -> SshAccessDto:
895
+ """Create SSH access for sandbox
896
+
897
+
898
+ :param sandbox_id: ID of the sandbox (required)
899
+ :type sandbox_id: str
900
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
901
+ :type x_daytona_organization_id: str
902
+ :param expires_in_minutes: Expiration time in minutes (default: 60)
903
+ :type expires_in_minutes: float
904
+ :param _request_timeout: timeout setting for this request. If one
905
+ number provided, it will be total request
906
+ timeout. It can also be a pair (tuple) of
907
+ (connection, read) timeouts.
908
+ :type _request_timeout: int, tuple(int, int), optional
909
+ :param _request_auth: set to override the auth_settings for an a single
910
+ request; this effectively ignores the
911
+ authentication in the spec for a single request.
912
+ :type _request_auth: dict, optional
913
+ :param _content_type: force content-type for the request.
914
+ :type _content_type: str, Optional
915
+ :param _headers: set to override the headers for a single
916
+ request; this effectively ignores the headers
917
+ in the spec for a single request.
918
+ :type _headers: dict, optional
919
+ :param _host_index: set to override the host_index for a single
920
+ request; this effectively ignores the host_index
921
+ in the spec for a single request.
922
+ :type _host_index: int, optional
923
+ :return: Returns the result object.
924
+ """ # noqa: E501
925
+
926
+ _param = self._create_ssh_access_serialize(
927
+ sandbox_id=sandbox_id,
928
+ x_daytona_organization_id=x_daytona_organization_id,
929
+ expires_in_minutes=expires_in_minutes,
930
+ _request_auth=_request_auth,
931
+ _content_type=_content_type,
932
+ _headers=_headers,
933
+ _host_index=_host_index
934
+ )
935
+
936
+ _response_types_map: Dict[str, Optional[str]] = {
937
+ '200': "SshAccessDto",
938
+ }
939
+ response_data = self.api_client.call_api(
940
+ *_param,
941
+ _request_timeout=_request_timeout
942
+ )
943
+ response_data.read()
944
+ return self.api_client.response_deserialize(
945
+ response_data=response_data,
946
+ response_types_map=_response_types_map,
947
+ ).data
948
+
949
+
950
+ @validate_call
951
+ def create_ssh_access_with_http_info(
952
+ self,
953
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
954
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
955
+ expires_in_minutes: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Expiration time in minutes (default: 60)")] = None,
956
+ _request_timeout: Union[
957
+ None,
958
+ Annotated[StrictFloat, Field(gt=0)],
959
+ Tuple[
960
+ Annotated[StrictFloat, Field(gt=0)],
961
+ Annotated[StrictFloat, Field(gt=0)]
962
+ ]
963
+ ] = None,
964
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
965
+ _content_type: Optional[StrictStr] = None,
966
+ _headers: Optional[Dict[StrictStr, Any]] = None,
967
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
968
+ ) -> ApiResponse[SshAccessDto]:
969
+ """Create SSH access for sandbox
970
+
971
+
972
+ :param sandbox_id: ID of the sandbox (required)
973
+ :type sandbox_id: str
974
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
975
+ :type x_daytona_organization_id: str
976
+ :param expires_in_minutes: Expiration time in minutes (default: 60)
977
+ :type expires_in_minutes: float
978
+ :param _request_timeout: timeout setting for this request. If one
979
+ number provided, it will be total request
980
+ timeout. It can also be a pair (tuple) of
981
+ (connection, read) timeouts.
982
+ :type _request_timeout: int, tuple(int, int), optional
983
+ :param _request_auth: set to override the auth_settings for an a single
984
+ request; this effectively ignores the
985
+ authentication in the spec for a single request.
986
+ :type _request_auth: dict, optional
987
+ :param _content_type: force content-type for the request.
988
+ :type _content_type: str, Optional
989
+ :param _headers: set to override the headers for a single
990
+ request; this effectively ignores the headers
991
+ in the spec for a single request.
992
+ :type _headers: dict, optional
993
+ :param _host_index: set to override the host_index for a single
994
+ request; this effectively ignores the host_index
995
+ in the spec for a single request.
996
+ :type _host_index: int, optional
997
+ :return: Returns the result object.
998
+ """ # noqa: E501
999
+
1000
+ _param = self._create_ssh_access_serialize(
1001
+ sandbox_id=sandbox_id,
1002
+ x_daytona_organization_id=x_daytona_organization_id,
1003
+ expires_in_minutes=expires_in_minutes,
1004
+ _request_auth=_request_auth,
1005
+ _content_type=_content_type,
1006
+ _headers=_headers,
1007
+ _host_index=_host_index
1008
+ )
1009
+
1010
+ _response_types_map: Dict[str, Optional[str]] = {
1011
+ '200': "SshAccessDto",
1012
+ }
1013
+ response_data = self.api_client.call_api(
1014
+ *_param,
1015
+ _request_timeout=_request_timeout
1016
+ )
1017
+ response_data.read()
1018
+ return self.api_client.response_deserialize(
1019
+ response_data=response_data,
1020
+ response_types_map=_response_types_map,
1021
+ )
1022
+
1023
+
1024
+ @validate_call
1025
+ def create_ssh_access_without_preload_content(
1026
+ self,
1027
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
1028
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1029
+ expires_in_minutes: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Expiration time in minutes (default: 60)")] = None,
1030
+ _request_timeout: Union[
1031
+ None,
1032
+ Annotated[StrictFloat, Field(gt=0)],
1033
+ Tuple[
1034
+ Annotated[StrictFloat, Field(gt=0)],
1035
+ Annotated[StrictFloat, Field(gt=0)]
1036
+ ]
1037
+ ] = None,
1038
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1039
+ _content_type: Optional[StrictStr] = None,
1040
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1041
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1042
+ ) -> RESTResponseType:
1043
+ """Create SSH access for sandbox
1044
+
1045
+
1046
+ :param sandbox_id: ID of the sandbox (required)
1047
+ :type sandbox_id: str
1048
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
1049
+ :type x_daytona_organization_id: str
1050
+ :param expires_in_minutes: Expiration time in minutes (default: 60)
1051
+ :type expires_in_minutes: float
1052
+ :param _request_timeout: timeout setting for this request. If one
1053
+ number provided, it will be total request
1054
+ timeout. It can also be a pair (tuple) of
1055
+ (connection, read) timeouts.
1056
+ :type _request_timeout: int, tuple(int, int), optional
1057
+ :param _request_auth: set to override the auth_settings for an a single
1058
+ request; this effectively ignores the
1059
+ authentication in the spec for a single request.
1060
+ :type _request_auth: dict, optional
1061
+ :param _content_type: force content-type for the request.
1062
+ :type _content_type: str, Optional
1063
+ :param _headers: set to override the headers for a single
1064
+ request; this effectively ignores the headers
1065
+ in the spec for a single request.
1066
+ :type _headers: dict, optional
1067
+ :param _host_index: set to override the host_index for a single
1068
+ request; this effectively ignores the host_index
1069
+ in the spec for a single request.
1070
+ :type _host_index: int, optional
1071
+ :return: Returns the result object.
1072
+ """ # noqa: E501
1073
+
1074
+ _param = self._create_ssh_access_serialize(
1075
+ sandbox_id=sandbox_id,
1076
+ x_daytona_organization_id=x_daytona_organization_id,
1077
+ expires_in_minutes=expires_in_minutes,
1078
+ _request_auth=_request_auth,
1079
+ _content_type=_content_type,
1080
+ _headers=_headers,
1081
+ _host_index=_host_index
1082
+ )
1083
+
1084
+ _response_types_map: Dict[str, Optional[str]] = {
1085
+ '200': "SshAccessDto",
1086
+ }
1087
+ response_data = self.api_client.call_api(
1088
+ *_param,
1089
+ _request_timeout=_request_timeout
1090
+ )
1091
+ return response_data.response
1092
+
1093
+
1094
+ def _create_ssh_access_serialize(
1095
+ self,
1096
+ sandbox_id,
1097
+ x_daytona_organization_id,
1098
+ expires_in_minutes,
1099
+ _request_auth,
1100
+ _content_type,
1101
+ _headers,
1102
+ _host_index,
1103
+ ) -> RequestSerialized:
1104
+
1105
+ _host = None
1106
+
1107
+ _collection_formats: Dict[str, str] = {
1108
+ }
1109
+
1110
+ _path_params: Dict[str, str] = {}
1111
+ _query_params: List[Tuple[str, str]] = []
1112
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1113
+ _form_params: List[Tuple[str, str]] = []
1114
+ _files: Dict[
1115
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1116
+ ] = {}
1117
+ _body_params: Optional[bytes] = None
1118
+
1119
+ # process the path parameters
1120
+ if sandbox_id is not None:
1121
+ _path_params['sandboxId'] = sandbox_id
1122
+ # process the query parameters
1123
+ if expires_in_minutes is not None:
1124
+
1125
+ _query_params.append(('expiresInMinutes', expires_in_minutes))
1126
+
1127
+ # process the header parameters
1128
+ if x_daytona_organization_id is not None:
1129
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
1130
+ # process the form parameters
1131
+ # process the body parameter
1132
+
1133
+
1134
+ # set the HTTP header `Accept`
1135
+ if 'Accept' not in _header_params:
1136
+ _header_params['Accept'] = self.api_client.select_header_accept(
1137
+ [
1138
+ 'application/json'
1139
+ ]
1140
+ )
1141
+
1142
+
1143
+ # authentication setting
1144
+ _auth_settings: List[str] = [
1145
+ 'bearer',
1146
+ 'oauth2'
1147
+ ]
1148
+
1149
+ return self.api_client.param_serialize(
1150
+ method='POST',
1151
+ resource_path='/sandbox/{sandboxId}/ssh-access',
1152
+ path_params=_path_params,
1153
+ query_params=_query_params,
1154
+ header_params=_header_params,
1155
+ body=_body_params,
1156
+ post_params=_form_params,
1157
+ files=_files,
1158
+ auth_settings=_auth_settings,
1159
+ collection_formats=_collection_formats,
1160
+ _host=_host,
1161
+ _request_auth=_request_auth
1162
+ )
1163
+
1164
+
1165
+
1166
+
874
1167
  @validate_call
875
1168
  def delete_sandbox(
876
1169
  self,
@@ -2614,8 +2907,292 @@ class SandboxApi:
2614
2907
  ]
2615
2908
 
2616
2909
  return self.api_client.param_serialize(
2617
- method='PUT',
2618
- resource_path='/sandbox/{sandboxId}/labels',
2910
+ method='PUT',
2911
+ resource_path='/sandbox/{sandboxId}/labels',
2912
+ path_params=_path_params,
2913
+ query_params=_query_params,
2914
+ header_params=_header_params,
2915
+ body=_body_params,
2916
+ post_params=_form_params,
2917
+ files=_files,
2918
+ auth_settings=_auth_settings,
2919
+ collection_formats=_collection_formats,
2920
+ _host=_host,
2921
+ _request_auth=_request_auth
2922
+ )
2923
+
2924
+
2925
+
2926
+
2927
+ @validate_call
2928
+ def revoke_ssh_access(
2929
+ self,
2930
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
2931
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2932
+ token: Annotated[Optional[StrictStr], Field(description="SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.")] = None,
2933
+ _request_timeout: Union[
2934
+ None,
2935
+ Annotated[StrictFloat, Field(gt=0)],
2936
+ Tuple[
2937
+ Annotated[StrictFloat, Field(gt=0)],
2938
+ Annotated[StrictFloat, Field(gt=0)]
2939
+ ]
2940
+ ] = None,
2941
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2942
+ _content_type: Optional[StrictStr] = None,
2943
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2944
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2945
+ ) -> None:
2946
+ """Revoke SSH access for sandbox
2947
+
2948
+
2949
+ :param sandbox_id: ID of the sandbox (required)
2950
+ :type sandbox_id: str
2951
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
2952
+ :type x_daytona_organization_id: str
2953
+ :param token: SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
2954
+ :type token: str
2955
+ :param _request_timeout: timeout setting for this request. If one
2956
+ number provided, it will be total request
2957
+ timeout. It can also be a pair (tuple) of
2958
+ (connection, read) timeouts.
2959
+ :type _request_timeout: int, tuple(int, int), optional
2960
+ :param _request_auth: set to override the auth_settings for an a single
2961
+ request; this effectively ignores the
2962
+ authentication in the spec for a single request.
2963
+ :type _request_auth: dict, optional
2964
+ :param _content_type: force content-type for the request.
2965
+ :type _content_type: str, Optional
2966
+ :param _headers: set to override the headers for a single
2967
+ request; this effectively ignores the headers
2968
+ in the spec for a single request.
2969
+ :type _headers: dict, optional
2970
+ :param _host_index: set to override the host_index for a single
2971
+ request; this effectively ignores the host_index
2972
+ in the spec for a single request.
2973
+ :type _host_index: int, optional
2974
+ :return: Returns the result object.
2975
+ """ # noqa: E501
2976
+
2977
+ _param = self._revoke_ssh_access_serialize(
2978
+ sandbox_id=sandbox_id,
2979
+ x_daytona_organization_id=x_daytona_organization_id,
2980
+ token=token,
2981
+ _request_auth=_request_auth,
2982
+ _content_type=_content_type,
2983
+ _headers=_headers,
2984
+ _host_index=_host_index
2985
+ )
2986
+
2987
+ _response_types_map: Dict[str, Optional[str]] = {
2988
+ '200': None,
2989
+ }
2990
+ response_data = self.api_client.call_api(
2991
+ *_param,
2992
+ _request_timeout=_request_timeout
2993
+ )
2994
+ response_data.read()
2995
+ return self.api_client.response_deserialize(
2996
+ response_data=response_data,
2997
+ response_types_map=_response_types_map,
2998
+ ).data
2999
+
3000
+
3001
+ @validate_call
3002
+ def revoke_ssh_access_with_http_info(
3003
+ self,
3004
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
3005
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3006
+ token: Annotated[Optional[StrictStr], Field(description="SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.")] = None,
3007
+ _request_timeout: Union[
3008
+ None,
3009
+ Annotated[StrictFloat, Field(gt=0)],
3010
+ Tuple[
3011
+ Annotated[StrictFloat, Field(gt=0)],
3012
+ Annotated[StrictFloat, Field(gt=0)]
3013
+ ]
3014
+ ] = None,
3015
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3016
+ _content_type: Optional[StrictStr] = None,
3017
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3018
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3019
+ ) -> ApiResponse[None]:
3020
+ """Revoke SSH access for sandbox
3021
+
3022
+
3023
+ :param sandbox_id: ID of the sandbox (required)
3024
+ :type sandbox_id: str
3025
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
3026
+ :type x_daytona_organization_id: str
3027
+ :param token: SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
3028
+ :type token: str
3029
+ :param _request_timeout: timeout setting for this request. If one
3030
+ number provided, it will be total request
3031
+ timeout. It can also be a pair (tuple) of
3032
+ (connection, read) timeouts.
3033
+ :type _request_timeout: int, tuple(int, int), optional
3034
+ :param _request_auth: set to override the auth_settings for an a single
3035
+ request; this effectively ignores the
3036
+ authentication in the spec for a single request.
3037
+ :type _request_auth: dict, optional
3038
+ :param _content_type: force content-type for the request.
3039
+ :type _content_type: str, Optional
3040
+ :param _headers: set to override the headers for a single
3041
+ request; this effectively ignores the headers
3042
+ in the spec for a single request.
3043
+ :type _headers: dict, optional
3044
+ :param _host_index: set to override the host_index for a single
3045
+ request; this effectively ignores the host_index
3046
+ in the spec for a single request.
3047
+ :type _host_index: int, optional
3048
+ :return: Returns the result object.
3049
+ """ # noqa: E501
3050
+
3051
+ _param = self._revoke_ssh_access_serialize(
3052
+ sandbox_id=sandbox_id,
3053
+ x_daytona_organization_id=x_daytona_organization_id,
3054
+ token=token,
3055
+ _request_auth=_request_auth,
3056
+ _content_type=_content_type,
3057
+ _headers=_headers,
3058
+ _host_index=_host_index
3059
+ )
3060
+
3061
+ _response_types_map: Dict[str, Optional[str]] = {
3062
+ '200': None,
3063
+ }
3064
+ response_data = self.api_client.call_api(
3065
+ *_param,
3066
+ _request_timeout=_request_timeout
3067
+ )
3068
+ response_data.read()
3069
+ return self.api_client.response_deserialize(
3070
+ response_data=response_data,
3071
+ response_types_map=_response_types_map,
3072
+ )
3073
+
3074
+
3075
+ @validate_call
3076
+ def revoke_ssh_access_without_preload_content(
3077
+ self,
3078
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
3079
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3080
+ token: Annotated[Optional[StrictStr], Field(description="SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.")] = None,
3081
+ _request_timeout: Union[
3082
+ None,
3083
+ Annotated[StrictFloat, Field(gt=0)],
3084
+ Tuple[
3085
+ Annotated[StrictFloat, Field(gt=0)],
3086
+ Annotated[StrictFloat, Field(gt=0)]
3087
+ ]
3088
+ ] = None,
3089
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3090
+ _content_type: Optional[StrictStr] = None,
3091
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3092
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3093
+ ) -> RESTResponseType:
3094
+ """Revoke SSH access for sandbox
3095
+
3096
+
3097
+ :param sandbox_id: ID of the sandbox (required)
3098
+ :type sandbox_id: str
3099
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
3100
+ :type x_daytona_organization_id: str
3101
+ :param token: SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
3102
+ :type token: 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._revoke_ssh_access_serialize(
3126
+ sandbox_id=sandbox_id,
3127
+ x_daytona_organization_id=x_daytona_organization_id,
3128
+ token=token,
3129
+ _request_auth=_request_auth,
3130
+ _content_type=_content_type,
3131
+ _headers=_headers,
3132
+ _host_index=_host_index
3133
+ )
3134
+
3135
+ _response_types_map: Dict[str, Optional[str]] = {
3136
+ '200': None,
3137
+ }
3138
+ response_data = self.api_client.call_api(
3139
+ *_param,
3140
+ _request_timeout=_request_timeout
3141
+ )
3142
+ return response_data.response
3143
+
3144
+
3145
+ def _revoke_ssh_access_serialize(
3146
+ self,
3147
+ sandbox_id,
3148
+ x_daytona_organization_id,
3149
+ token,
3150
+ _request_auth,
3151
+ _content_type,
3152
+ _headers,
3153
+ _host_index,
3154
+ ) -> RequestSerialized:
3155
+
3156
+ _host = None
3157
+
3158
+ _collection_formats: Dict[str, str] = {
3159
+ }
3160
+
3161
+ _path_params: Dict[str, str] = {}
3162
+ _query_params: List[Tuple[str, str]] = []
3163
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3164
+ _form_params: List[Tuple[str, str]] = []
3165
+ _files: Dict[
3166
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3167
+ ] = {}
3168
+ _body_params: Optional[bytes] = None
3169
+
3170
+ # process the path parameters
3171
+ if sandbox_id is not None:
3172
+ _path_params['sandboxId'] = sandbox_id
3173
+ # process the query parameters
3174
+ if token is not None:
3175
+
3176
+ _query_params.append(('token', token))
3177
+
3178
+ # process the header parameters
3179
+ if x_daytona_organization_id is not None:
3180
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
3181
+ # process the form parameters
3182
+ # process the body parameter
3183
+
3184
+
3185
+
3186
+
3187
+ # authentication setting
3188
+ _auth_settings: List[str] = [
3189
+ 'bearer',
3190
+ 'oauth2'
3191
+ ]
3192
+
3193
+ return self.api_client.param_serialize(
3194
+ method='DELETE',
3195
+ resource_path='/sandbox/{sandboxId}/ssh-access',
2619
3196
  path_params=_path_params,
2620
3197
  query_params=_query_params,
2621
3198
  header_params=_header_params,
@@ -4298,3 +4875,279 @@ class SandboxApi:
4298
4875
  )
4299
4876
 
4300
4877
 
4878
+
4879
+
4880
+ @validate_call
4881
+ def validate_ssh_access(
4882
+ self,
4883
+ token: Annotated[StrictStr, Field(description="SSH access token to validate")],
4884
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
4885
+ _request_timeout: Union[
4886
+ None,
4887
+ Annotated[StrictFloat, Field(gt=0)],
4888
+ Tuple[
4889
+ Annotated[StrictFloat, Field(gt=0)],
4890
+ Annotated[StrictFloat, Field(gt=0)]
4891
+ ]
4892
+ ] = None,
4893
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4894
+ _content_type: Optional[StrictStr] = None,
4895
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4896
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4897
+ ) -> SshAccessValidationDto:
4898
+ """Validate SSH access for sandbox
4899
+
4900
+
4901
+ :param token: SSH access token to validate (required)
4902
+ :type token: str
4903
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
4904
+ :type x_daytona_organization_id: str
4905
+ :param _request_timeout: timeout setting for this request. If one
4906
+ number provided, it will be total request
4907
+ timeout. It can also be a pair (tuple) of
4908
+ (connection, read) timeouts.
4909
+ :type _request_timeout: int, tuple(int, int), optional
4910
+ :param _request_auth: set to override the auth_settings for an a single
4911
+ request; this effectively ignores the
4912
+ authentication in the spec for a single request.
4913
+ :type _request_auth: dict, optional
4914
+ :param _content_type: force content-type for the request.
4915
+ :type _content_type: str, Optional
4916
+ :param _headers: set to override the headers for a single
4917
+ request; this effectively ignores the headers
4918
+ in the spec for a single request.
4919
+ :type _headers: dict, optional
4920
+ :param _host_index: set to override the host_index for a single
4921
+ request; this effectively ignores the host_index
4922
+ in the spec for a single request.
4923
+ :type _host_index: int, optional
4924
+ :return: Returns the result object.
4925
+ """ # noqa: E501
4926
+
4927
+ _param = self._validate_ssh_access_serialize(
4928
+ token=token,
4929
+ x_daytona_organization_id=x_daytona_organization_id,
4930
+ _request_auth=_request_auth,
4931
+ _content_type=_content_type,
4932
+ _headers=_headers,
4933
+ _host_index=_host_index
4934
+ )
4935
+
4936
+ _response_types_map: Dict[str, Optional[str]] = {
4937
+ '200': "SshAccessValidationDto",
4938
+ }
4939
+ response_data = self.api_client.call_api(
4940
+ *_param,
4941
+ _request_timeout=_request_timeout
4942
+ )
4943
+ response_data.read()
4944
+ return self.api_client.response_deserialize(
4945
+ response_data=response_data,
4946
+ response_types_map=_response_types_map,
4947
+ ).data
4948
+
4949
+
4950
+ @validate_call
4951
+ def validate_ssh_access_with_http_info(
4952
+ self,
4953
+ token: Annotated[StrictStr, Field(description="SSH access token to validate")],
4954
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
4955
+ _request_timeout: Union[
4956
+ None,
4957
+ Annotated[StrictFloat, Field(gt=0)],
4958
+ Tuple[
4959
+ Annotated[StrictFloat, Field(gt=0)],
4960
+ Annotated[StrictFloat, Field(gt=0)]
4961
+ ]
4962
+ ] = None,
4963
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4964
+ _content_type: Optional[StrictStr] = None,
4965
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4966
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4967
+ ) -> ApiResponse[SshAccessValidationDto]:
4968
+ """Validate SSH access for sandbox
4969
+
4970
+
4971
+ :param token: SSH access token to validate (required)
4972
+ :type token: str
4973
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
4974
+ :type x_daytona_organization_id: str
4975
+ :param _request_timeout: timeout setting for this request. If one
4976
+ number provided, it will be total request
4977
+ timeout. It can also be a pair (tuple) of
4978
+ (connection, read) timeouts.
4979
+ :type _request_timeout: int, tuple(int, int), optional
4980
+ :param _request_auth: set to override the auth_settings for an a single
4981
+ request; this effectively ignores the
4982
+ authentication in the spec for a single request.
4983
+ :type _request_auth: dict, optional
4984
+ :param _content_type: force content-type for the request.
4985
+ :type _content_type: str, Optional
4986
+ :param _headers: set to override the headers for a single
4987
+ request; this effectively ignores the headers
4988
+ in the spec for a single request.
4989
+ :type _headers: dict, optional
4990
+ :param _host_index: set to override the host_index for a single
4991
+ request; this effectively ignores the host_index
4992
+ in the spec for a single request.
4993
+ :type _host_index: int, optional
4994
+ :return: Returns the result object.
4995
+ """ # noqa: E501
4996
+
4997
+ _param = self._validate_ssh_access_serialize(
4998
+ token=token,
4999
+ x_daytona_organization_id=x_daytona_organization_id,
5000
+ _request_auth=_request_auth,
5001
+ _content_type=_content_type,
5002
+ _headers=_headers,
5003
+ _host_index=_host_index
5004
+ )
5005
+
5006
+ _response_types_map: Dict[str, Optional[str]] = {
5007
+ '200': "SshAccessValidationDto",
5008
+ }
5009
+ response_data = self.api_client.call_api(
5010
+ *_param,
5011
+ _request_timeout=_request_timeout
5012
+ )
5013
+ response_data.read()
5014
+ return self.api_client.response_deserialize(
5015
+ response_data=response_data,
5016
+ response_types_map=_response_types_map,
5017
+ )
5018
+
5019
+
5020
+ @validate_call
5021
+ def validate_ssh_access_without_preload_content(
5022
+ self,
5023
+ token: Annotated[StrictStr, Field(description="SSH access token to validate")],
5024
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
5025
+ _request_timeout: Union[
5026
+ None,
5027
+ Annotated[StrictFloat, Field(gt=0)],
5028
+ Tuple[
5029
+ Annotated[StrictFloat, Field(gt=0)],
5030
+ Annotated[StrictFloat, Field(gt=0)]
5031
+ ]
5032
+ ] = None,
5033
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
5034
+ _content_type: Optional[StrictStr] = None,
5035
+ _headers: Optional[Dict[StrictStr, Any]] = None,
5036
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5037
+ ) -> RESTResponseType:
5038
+ """Validate SSH access for sandbox
5039
+
5040
+
5041
+ :param token: SSH access token to validate (required)
5042
+ :type token: str
5043
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
5044
+ :type x_daytona_organization_id: str
5045
+ :param _request_timeout: timeout setting for this request. If one
5046
+ number provided, it will be total request
5047
+ timeout. It can also be a pair (tuple) of
5048
+ (connection, read) timeouts.
5049
+ :type _request_timeout: int, tuple(int, int), optional
5050
+ :param _request_auth: set to override the auth_settings for an a single
5051
+ request; this effectively ignores the
5052
+ authentication in the spec for a single request.
5053
+ :type _request_auth: dict, optional
5054
+ :param _content_type: force content-type for the request.
5055
+ :type _content_type: str, Optional
5056
+ :param _headers: set to override the headers for a single
5057
+ request; this effectively ignores the headers
5058
+ in the spec for a single request.
5059
+ :type _headers: dict, optional
5060
+ :param _host_index: set to override the host_index for a single
5061
+ request; this effectively ignores the host_index
5062
+ in the spec for a single request.
5063
+ :type _host_index: int, optional
5064
+ :return: Returns the result object.
5065
+ """ # noqa: E501
5066
+
5067
+ _param = self._validate_ssh_access_serialize(
5068
+ token=token,
5069
+ x_daytona_organization_id=x_daytona_organization_id,
5070
+ _request_auth=_request_auth,
5071
+ _content_type=_content_type,
5072
+ _headers=_headers,
5073
+ _host_index=_host_index
5074
+ )
5075
+
5076
+ _response_types_map: Dict[str, Optional[str]] = {
5077
+ '200': "SshAccessValidationDto",
5078
+ }
5079
+ response_data = self.api_client.call_api(
5080
+ *_param,
5081
+ _request_timeout=_request_timeout
5082
+ )
5083
+ return response_data.response
5084
+
5085
+
5086
+ def _validate_ssh_access_serialize(
5087
+ self,
5088
+ token,
5089
+ x_daytona_organization_id,
5090
+ _request_auth,
5091
+ _content_type,
5092
+ _headers,
5093
+ _host_index,
5094
+ ) -> RequestSerialized:
5095
+
5096
+ _host = None
5097
+
5098
+ _collection_formats: Dict[str, str] = {
5099
+ }
5100
+
5101
+ _path_params: Dict[str, str] = {}
5102
+ _query_params: List[Tuple[str, str]] = []
5103
+ _header_params: Dict[str, Optional[str]] = _headers or {}
5104
+ _form_params: List[Tuple[str, str]] = []
5105
+ _files: Dict[
5106
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
5107
+ ] = {}
5108
+ _body_params: Optional[bytes] = None
5109
+
5110
+ # process the path parameters
5111
+ # process the query parameters
5112
+ if token is not None:
5113
+
5114
+ _query_params.append(('token', token))
5115
+
5116
+ # process the header parameters
5117
+ if x_daytona_organization_id is not None:
5118
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
5119
+ # process the form parameters
5120
+ # process the body parameter
5121
+
5122
+
5123
+ # set the HTTP header `Accept`
5124
+ if 'Accept' not in _header_params:
5125
+ _header_params['Accept'] = self.api_client.select_header_accept(
5126
+ [
5127
+ 'application/json'
5128
+ ]
5129
+ )
5130
+
5131
+
5132
+ # authentication setting
5133
+ _auth_settings: List[str] = [
5134
+ 'bearer',
5135
+ 'oauth2'
5136
+ ]
5137
+
5138
+ return self.api_client.param_serialize(
5139
+ method='GET',
5140
+ resource_path='/sandbox/ssh-access/validate',
5141
+ path_params=_path_params,
5142
+ query_params=_query_params,
5143
+ header_params=_header_params,
5144
+ body=_body_params,
5145
+ post_params=_form_params,
5146
+ files=_files,
5147
+ auth_settings=_auth_settings,
5148
+ collection_formats=_collection_formats,
5149
+ _host=_host,
5150
+ _request_auth=_request_auth
5151
+ )
5152
+
5153
+