Files
dynamix-python-sdk/src/dynamix_sdk/api/cloudapi/bservice/get.py
T

58 lines
1.6 KiB
Python
Raw Normal View History

2025-06-06 08:20:45 +03:00
import dynamix_sdk.base as _base
import dynamix_sdk.api._nested as _nested
2026-10-30 17:01:06 +03:00
class CloudapiBserviceGetResultModel(_base.ResultModel):
2025-07-21 20:27:59 +07:00
account_id: int
account_name: str
base_domain: str
2025-06-06 08:20:45 +03:00
cpu_count_total: int
2025-07-21 20:27:59 +07:00
created_by: str
created_timestamp: int
deleted_by: str
deleted_timestamp: int
2025-06-06 08:20:45 +03:00
disk_size_total_gb: int
2025-07-21 20:27:59 +07:00
grid_id: int
2025-06-06 08:20:45 +03:00
groups: list[_nested.BServiceGroupAPIResultNM]
2025-07-21 20:27:59 +07:00
guid: int
id: int
2025-06-06 08:20:45 +03:00
milestones: int
2025-07-21 20:27:59 +07:00
name: str
parent_service_id: int
parent_service_type: str
2025-06-06 08:20:45 +03:00
ram_size_total_mb: int
2025-07-21 20:27:59 +07:00
rg_id: int
rg_name: str
2025-06-06 08:20:45 +03:00
snapshots: list[_nested.BServiceSnapshotAPIResultNM]
2025-11-25 18:09:46 +03:00
ssh_public_key: str
ssh_user_name: str
2025-07-21 20:27:59 +07:00
status: _nested.BServiceStatus
tech_status: _nested.BServiceTechStatus
updated_by: str
updated_timestamp: int
user_managed: bool
2025-06-06 08:20:45 +03:00
vms: list[_nested.BServiceVMAPIResultNM]
2025-07-21 20:27:59 +07:00
zone_id: int
2026-02-11 12:20:55 +03:00
@_base.computed_field
def created_datetime(self) -> _base.datetime | None:
2025-07-21 20:27:59 +07:00
return self._get_datetime_from_timestamp(self.created_timestamp)
2026-02-11 12:20:55 +03:00
@_base.computed_field
def deleted_datetime(self) -> _base.datetime | None:
2025-07-21 20:27:59 +07:00
return self._get_datetime_from_timestamp(self.deleted_timestamp)
2026-02-11 12:20:55 +03:00
@_base.computed_field
def updated_datetime(self) -> _base.datetime | None:
2025-07-21 20:27:59 +07:00
return self._get_datetime_from_timestamp(self.updated_timestamp)
2025-06-06 08:20:45 +03:00
2026-09-18 16:06:25 +07:00
class CloudapiBserviceGetImpl(_base.APIFunctionImpl):
http_method = _base.HTTPMethod.POST
def __call__(
2025-06-06 08:20:45 +03:00
self,
*,
bservice_id: int,
) -> CloudapiBserviceGetResultModel:
2026-09-18 16:06:25 +07:00
raise NotImplementedError