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 CloudapiDisksGetResultModel(_base.BaseAPIResultModel):
|
|
|
|
|
account_id: int
|
|
|
|
|
account_name: str
|
|
|
|
|
acl: dict
|
|
|
|
|
created_by: str
|
|
|
|
|
created_timestamp: int
|
|
|
|
|
deleted_by: str
|
|
|
|
|
deleted_timestamp: int
|
|
|
|
|
description: str
|
|
|
|
|
destruction_timestamp: int
|
|
|
|
|
device_name: str | None = None
|
|
|
|
|
grid_id: int
|
|
|
|
|
id: int
|
|
|
|
|
image_id: int
|
|
|
|
|
image_ids: list[int]
|
|
|
|
|
io_tune: _nested.IOTuneAPIResultNM
|
2025-06-30 15:09:41 +03:00
|
|
|
milestones: int
|
2025-07-21 20:27:59 +07:00
|
|
|
name: str
|
|
|
|
|
params: str
|
|
|
|
|
parent_id: int
|
|
|
|
|
present_to: dict[str, int]
|
|
|
|
|
purge_timestamp: int
|
|
|
|
|
replication: _nested.ReplicationAPIResultNM | dict
|
|
|
|
|
res_id: str
|
|
|
|
|
res_name: str
|
|
|
|
|
role: str
|
|
|
|
|
sep_id: int
|
|
|
|
|
sep_pool_name: str
|
|
|
|
|
sep_type: _nested.SEPType
|
|
|
|
|
shared: bool
|
|
|
|
|
size_available: float
|
|
|
|
|
size_max_gb: int
|
|
|
|
|
size_used: float
|
|
|
|
|
snapshots: list[_nested.SnapshotAPIResultNM]
|
|
|
|
|
status: _nested.DiskStatus
|
2025-11-25 18:09:46 +03:00
|
|
|
storage_policy_id: int
|
2025-07-21 20:27:59 +07:00
|
|
|
tech_status: _nested.DiskTechStatus
|
2025-11-25 18:09:46 +03:00
|
|
|
to_clean: bool
|
2025-07-21 20:27:59 +07:00
|
|
|
type: _nested.DiskType
|
|
|
|
|
updated_by: str
|
2025-06-30 15:09:41 +03:00
|
|
|
vm_id: int | None
|
|
|
|
|
vm_name: str | None
|
2025-06-06 08:20:45 +03:00
|
|
|
vms: dict[str, str]
|
2025-07-21 20:27:59 +07:00
|
|
|
updated_timestamp: int = 0
|
|
|
|
|
|
|
|
|
|
@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 destruction_datetime(self):
|
|
|
|
|
return self._get_datetime_from_timestamp(self.destruction_timestamp)
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
def purge_datetime(self):
|
|
|
|
|
return self._get_datetime_from_timestamp(self.purge_timestamp)
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
def updated_datetime(self):
|
|
|
|
|
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
2025-06-06 08:20:45 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class CloudapiDisksGetProtocol(_base.BasePostAPIFunctionProtocol):
|
|
|
|
|
def get(
|
|
|
|
|
self,
|
|
|
|
|
*,
|
|
|
|
|
disk_id: int,
|
|
|
|
|
) -> CloudapiDisksGetResultModel: ...
|