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

57 lines
1.4 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
2025-07-21 20:27:59 +07:00
class CloudapiBserviceGetResultModel(_base.BaseAPIResultModel):
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
@property
def created_datetime(self):
return self._get_datetime_from_timestamp(self.created_timestamp)
@property
def deleted_datetime(self):
return self._get_datetime_from_timestamp(self.deleted_timestamp)
@property
def updated_datetime(self):
return self._get_datetime_from_timestamp(self.updated_timestamp)
2025-06-06 08:20:45 +03:00
class CloudapiBserviceGetProtocol(_base.BasePostAPIFunctionProtocol):
def get(
self,
*,
bservice_id: int,
) -> CloudapiBserviceGetResultModel:
...