StorageBoxesClient

class StorageBoxesClient(client: Client)[source]

A client for the Storage Boxes API.

See https://docs.hetzner.cloud/reference/hetzner#storage-boxes.

actions: ResourceActionsClient

Storage Boxes scoped actions client

Type:

ResourceActionsClient

change_protection(storage_box: StorageBox | BoundStorageBox, *, delete: bool | None = None) BoundAction[source]

Changes the protection of a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-change-protection

Parameters:
  • storage_box – Storage Box to update.

  • delete – Prevents the Storage Box from being deleted.

change_subaccount_home_directory(subaccount: StorageBoxSubaccount | BoundStorageBoxSubaccount, home_directory: str) BoundAction[source]

Change the home directory of a Storage Box Subaccount.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccount-actions-change-home-directory

Parameters:
  • subaccount – Storage Box Subaccount to update.

  • home_directory – Home directory for the Subaccount.

change_type(storage_box: StorageBox | BoundStorageBox, storage_box_type: StorageBoxType | BoundStorageBoxType) BoundAction[source]

Changes the type of a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-change-type

Parameters:
  • storage_box – Storage Box to update.

  • storage_box_type – Storage Box Type to change to.

create(*, name: str, password: str, location: BoundLocation | Location, storage_box_type: BoundStorageBoxType | StorageBoxType, ssh_keys: list[str | SSHKey | BoundSSHKey] | None = None, access_settings: StorageBoxAccessSettings | None = None, labels: dict[str, str] | None = None) CreateStorageBoxResponse[source]

Creates a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-create-a-storage-box

Parameters:
  • name – Name of the Storage Box.

  • password – Password of the Storage Box.

  • location – Location of the Storage Box.

  • storage_box_type – Type of the Storage Box.

  • ssh_keys – SSH public keys of the Storage Box.

  • access_settings – Access settings of the Storage Box.

  • labels – User-defined labels (key/value pairs) for the Storage Box.

create_snapshot(storage_box: StorageBox | BoundStorageBox, *, description: str | None = None, labels: dict[str, str] | None = None) CreateStorageBoxSnapshotResponse[source]

Creates a Snapshot of the Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-create-a-snapshot

Parameters:
  • storage_box – Storage Box to create a Snapshot from.

  • description – Description of the Snapshot.

  • labels – User-defined labels (key/value pairs) for the Snapshot.

create_subaccount(storage_box: StorageBox | BoundStorageBox, *, name: str | None = None, home_directory: str, password: str, access_settings: StorageBoxSubaccountAccessSettings | None = None, description: str | None = None, labels: dict[str, str] | None = None) CreateStorageBoxSubaccountResponse[source]

Creates a Subaccount for the Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-create-a-subaccount

Parameters:
  • storage_box – Storage Box to create a Subaccount for.

  • name – Name of the Subaccount.

  • home_directory – Home directory of the Subaccount.

  • password – Password of the Subaccount.

  • access_settings – Access settings of the Subaccount.

  • description – Description of the Subaccount.

  • labels – User-defined labels (key/value pairs) for the Subaccount.

delete(storage_box: BoundStorageBox | StorageBox) DeleteStorageBoxResponse[source]

Deletes a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-delete-a-storage-box

Parameters:

storage_box – Storage Box to delete.

delete_snapshot(snapshot: StorageBoxSnapshot | BoundStorageBoxSnapshot) DeleteStorageBoxSnapshotResponse[source]

Deletes a Storage Box Snapshot.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-delete-a-snapshot

Parameters:

snapshot – Storage Box Snapshot to delete.

delete_subaccount(subaccount: StorageBoxSubaccount | BoundStorageBoxSubaccount) DeleteStorageBoxSubaccountResponse[source]

Deletes a Storage Box Subaccount.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-delete-a-subaccount

Parameters:

subaccount – Storage Box Subaccount to delete.

disable_snapshot_plan(storage_box: StorageBox | BoundStorageBox) BoundAction[source]

Disable the snapshot plan of a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-disable-snapshot-plan

Parameters:

storage_box – Storage Box to update.

enable_snapshot_plan(storage_box: StorageBox | BoundStorageBox, snapshot_plan: StorageBoxSnapshotPlan) BoundAction[source]

Enable the snapshot plan of a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-enable-snapshot-plan

Parameters:
  • storage_box – Storage Box to update.

  • snapshot_plan – Snapshot Plan to enable.

get_actions(storage_box: StorageBox | BoundStorageBox, *, status: list[Literal['running', 'success', 'error']] | None = None, sort: list[Literal['id', 'id:asc', 'id:desc', 'command', 'command:asc', 'command:desc', 'status', 'status:asc', 'status:desc', 'started', 'started:asc', 'started:desc', 'finished', 'finished:asc', 'finished:desc']] | None = None) list[BoundAction][source]

Returns all Actions for a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-list-actions-for-a-storage-box

Parameters:
  • storage_box – Storage Box to get the Actions for.

  • status – Filter the actions by status. The response will only contain actions matching the specified statuses.

  • sort – Sort resources by field and direction.

get_actions_list(storage_box: StorageBox | BoundStorageBox, *, status: list[Literal['running', 'success', 'error']] | None = None, sort: list[Literal['id', 'id:asc', 'id:desc', 'command', 'command:asc', 'command:desc', 'status', 'status:asc', 'status:desc', 'started', 'started:asc', 'started:desc', 'finished', 'finished:asc', 'finished:desc']] | None = None, page: int | None = None, per_page: int | None = None) ActionsPageResult[source]

Returns a paginated list of Actions for a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-list-actions-for-a-storage-box

Parameters:
  • storage_box – Storage Box to get the Actions for.

  • status – Filter the Actions by status.

  • sort – Sort Actions by field and direction.

  • page – Page number to get.

  • per_page – Maximum number of Actions returned per page.

get_all(*, name: str | None = None, label_selector: str | None = None, sort: list[str] | None = None) list[BoundStorageBox][source]

Returns all Storage Boxes.

See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-list-storage-boxes

Parameters:
  • name – Name of the Storage Box.

  • label_selector – Filter resources by labels. The response will only contain resources matching the label selector.

  • sort – Sort resources by field and direction.

get_by_id(id: int) BoundStorageBox[source]

Returns a specific Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-get-a-storage-box

Parameters:

id – ID of the Storage Box.

get_by_name(name: str) BoundStorageBox | None[source]

Returns a specific Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-list-storage-boxes

Parameters:

name – Name of the Storage Box.

get_folders(storage_box: BoundStorageBox | StorageBox, *, path: str | None = None) StorageBoxFoldersResponse[source]

Lists the (sub)folders contained in a Storage Box.

Files are not part of the response.

See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-list-folders-of-a-storage-box

Parameters:
  • storage_box – Storage Box to list the folders from.

  • path – Relative path to list the folders from.

get_list(*, name: str | None = None, label_selector: str | None = None, sort: list[str] | None = None, page: int | None = None, per_page: int | None = None) StorageBoxesPageResult[source]

Returns a paginated list of Storage Boxes for a specific page.

See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-list-storage-boxes

Parameters:
  • name – Name of the Storage Box.

  • label_selector – Filter resources by labels. The response will only contain resources matching the label selector.

  • sort – Sort resources by field and direction.

  • page – Page number to return.

  • per_page – Maximum number of entries returned per page.

get_snapshot_all(storage_box: StorageBox | BoundStorageBox, *, name: str | None = None, is_automatic: bool | None = None, label_selector: str | None = None, sort: list[str] | None = None) list[BoundStorageBoxSnapshot][source]

Returns all Snapshots for a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-list-snapshots

Parameters:
  • storage_box – Storage Box to get the Snapshots from.

  • name – Filter resources by their name. The response will only contain the resources matching exactly the specified name.

  • is_automatic – Filter whether the snapshot was made by a Snapshot Plan.

  • label_selector – Filter resources by labels. The response will only contain resources matching the label selector.

  • sort – Sort resources by field and direction.

get_snapshot_by_id(storage_box: StorageBox | BoundStorageBox, id: int) BoundStorageBoxSnapshot[source]

Returns a single Snapshot from a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-get-a-snapshot

Parameters:
  • storage_box – Storage Box to get the Snapshot from.

  • id – ID of the Snapshot.

get_snapshot_by_name(storage_box: StorageBox | BoundStorageBox, name: str) BoundStorageBoxSnapshot | None[source]

Returns a single Snapshot from a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-list-snapshots

Parameters:
  • storage_box – Storage Box to get the Snapshot from.

  • name – Name of the Snapshot.

get_snapshot_list(storage_box: StorageBox | BoundStorageBox, *, name: str | None = None, is_automatic: bool | None = None, label_selector: str | None = None, sort: list[str] | None = None) StorageBoxSnapshotsPageResult[source]

Returns all Snapshots for a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-list-snapshots

Parameters:
  • storage_box – Storage Box to get the Snapshots from.

  • name – Filter resources by their name. The response will only contain the resources matching exactly the specified name.

  • is_automatic – Filter whether the snapshot was made by a Snapshot Plan.

  • label_selector – Filter resources by labels. The response will only contain resources matching the label selector.

  • sort – Sort resources by field and direction.

get_subaccount_all(storage_box: StorageBox | BoundStorageBox, *, name: str | None = None, username: str | None = None, label_selector: str | None = None, sort: list[str] | None = None) list[BoundStorageBoxSubaccount][source]

Returns all Subaccounts for a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-list-subaccounts

Parameters:
  • storage_box – Storage Box to get the Subaccount from.

  • name – Filter resources by their name. The response will only contain the resources matching exactly the specified name.

  • username – Filter resources by their username. The response will only contain the resources matching exactly the specified username.

  • label_selector – Filter resources by labels. The response will only contain resources matching the label selector.

  • sort – Sort resources by field and direction.

get_subaccount_by_id(storage_box: StorageBox | BoundStorageBox, id: int) BoundStorageBoxSubaccount[source]

Returns a single Subaccount from a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-get-a-subaccount

Parameters:
  • storage_box – Storage Box to get the Subaccount from.

  • id – ID of the Subaccount.

get_subaccount_by_name(storage_box: StorageBox | BoundStorageBox, name: str) BoundStorageBoxSubaccount | None[source]

Returns a single Subaccount from a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-list-subaccounts

Parameters:
  • storage_box – Storage Box to get the Subaccount from.

  • name – Name of the Subaccount.

get_subaccount_by_username(storage_box: StorageBox | BoundStorageBox, username: str) BoundStorageBoxSubaccount | None[source]

Returns a single Subaccount from a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-list-subaccounts

Parameters:
  • storage_box – Storage Box to get the Subaccount from.

  • username – User name of the Subaccount.

get_subaccount_list(storage_box: StorageBox | BoundStorageBox, *, name: str | None = None, username: str | None = None, label_selector: str | None = None, sort: list[str] | None = None) StorageBoxSubaccountsPageResult[source]

Returns all Subaccounts for a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-list-subaccounts

Parameters:
  • storage_box – Storage Box to get the Subaccount from.

  • name – Filter resources by their name. The response will only contain the resources matching exactly the specified name.

  • username – Filter resources by their username. The response will only contain the resources matching exactly the specified username.

  • label_selector – Filter resources by labels. The response will only contain resources matching the label selector.

  • sort – Sort resources by field and direction.

reset_password(storage_box: StorageBox | BoundStorageBox, password: str) BoundAction[source]

Reset the password of a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-reset-password

Parameters:
  • storage_box – Storage Box to update.

  • password – New password.

reset_subaccount_password(subaccount: StorageBoxSubaccount | BoundStorageBoxSubaccount, password: str) BoundAction[source]

Reset the password of a Storage Box Subaccount.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccount-actions-reset-password

Parameters:
  • subaccount – Storage Box Subaccount to update.

  • password – Password for the Subaccount.

rollback_snapshot(storage_box: StorageBox | BoundStorageBox, snapshot: StorageBoxSnapshot | BoundStorageBoxSnapshot) BoundAction[source]

Rollback the Storage Box to the given snapshot.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-rollback-snapshot

Parameters:
  • storage_box – Storage Box to update.

  • snapshot – Snapshot to rollback to.

update(storage_box: BoundStorageBox | StorageBox, *, name: str | None = None, labels: dict[str, str] | None = None) BoundStorageBox[source]

Updates a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-update-a-storage-box

Parameters:
  • storage_box – Storage Box to update.

  • name – Name of the Storage Box.

  • labels – User-defined labels (key/value pairs) for the Storage Box.

update_access_settings(storage_box: StorageBox | BoundStorageBox, access_settings: StorageBoxAccessSettings) BoundAction[source]

Update the access settings of a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-update-access-settings

Parameters:
  • storage_box – Storage Box to update.

  • access_settings – New access settings for the Storage Box.

update_snapshot(snapshot: StorageBoxSnapshot | BoundStorageBoxSnapshot, *, description: str | None = None, labels: dict[str, str] | None = None) BoundStorageBoxSnapshot[source]

Updates a Storage Box Snapshot.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-update-a-snapshot

Parameters:
  • snapshot – Storage Box Snapshot to update.

  • description – Description of the Snapshot.

  • labels – User-defined labels (key/value pairs) for the Snapshot.

update_subaccount(subaccount: StorageBoxSubaccount | BoundStorageBoxSubaccount, *, name: str | None = None, description: str | None = None, labels: dict[str, str] | None = None) BoundStorageBoxSubaccount[source]

Updates a Storage Box Subaccount.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-update-a-subaccount

Parameters:
  • subaccount – Storage Box Subaccount to update.

  • name – Name of the Subaccount.

  • description – Description of the Subaccount.

  • labels – User-defined labels (key/value pairs) for the Subaccount.

update_subaccount_access_settings(subaccount: StorageBoxSubaccount | BoundStorageBoxSubaccount, access_settings: StorageBoxSubaccountAccessSettings) BoundAction[source]

Update the access settings of a Storage Box Subaccount.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccount-actions-update-access-settings

Parameters:
  • subaccount – Storage Box Subaccount to update.

  • access_settings – Access settings for the Subaccount.

class StorageBoxesPageResult(storage_boxes, meta)[source]
meta: Meta

Alias for field number 1

storage_boxes: list[BoundStorageBox]

Alias for field number 0

class StorageBoxSnapshotsPageResult(snapshots, meta)[source]
meta: Meta

Alias for field number 1

snapshots: list[BoundStorageBoxSnapshot]

Alias for field number 0

class StorageBoxSubaccountsPageResult(subaccounts, meta)[source]
meta: Meta

Alias for field number 1

subaccounts: list[BoundStorageBoxSubaccount]

Alias for field number 0

class BoundStorageBox(client: StorageBoxesClient, data: dict[str, Any], complete: bool = True)[source]
change_protection(*, delete: bool | None = None) BoundAction[source]

Changes the protection of a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-change-protection

Parameters:

delete – Prevents the Storage Box from being deleted.

change_type(storage_box_type: StorageBoxType | BoundStorageBoxType) BoundAction[source]

Changes the type of a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-change-type

Parameters:

storage_box_type – Storage Box Type to change to.

create_snapshot(*, description: str | None = None, labels: dict[str, str] | None = None) CreateStorageBoxSnapshotResponse[source]

Creates a Snapshot of the Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-create-a-snapshot

Parameters:
  • description – Description of the Snapshot.

  • labels – User-defined labels (key/value pairs) for the Snapshot.

create_subaccount(*, name: str | None = None, home_directory: str, password: str, access_settings: StorageBoxSubaccountAccessSettings | None = None, description: str | None = None, labels: dict[str, str] | None = None) CreateStorageBoxSubaccountResponse[source]

Creates a Subaccount for the Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-create-a-subaccount

Parameters:
  • storage_box – Storage Box to create a Subaccount for.

  • name – Name of the Subaccount.

  • home_directory – Home directory of the Subaccount.

  • password – Password of the Subaccount.

  • access_settings – Access settings of the Subaccount.

  • description – Description of the Subaccount.

  • labels – User-defined labels (key/value pairs) for the Subaccount.

delete() DeleteStorageBoxResponse[source]

Deletes a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-delete-a-storage-box

disable_snapshot_plan() BoundAction[source]

Disable the snapshot plan of a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-disable-snapshot-plan

enable_snapshot_plan(snapshot_plan: StorageBoxSnapshotPlan) BoundAction[source]

Enable the snapshot plan of a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-enable-snapshot-plan

Parameters:

snapshot_plan – Snapshot Plan to enable.

get_actions(*, status: list[Literal['running', 'success', 'error']] | None = None, sort: list[Literal['id', 'id:asc', 'id:desc', 'command', 'command:asc', 'command:desc', 'status', 'status:asc', 'status:desc', 'started', 'started:asc', 'started:desc', 'finished', 'finished:asc', 'finished:desc']] | None = None) list[BoundAction][source]

Returns all Actions for a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-list-actions-for-a-storage-box

Parameters:
  • status – Filter the actions by status. The response will only contain actions matching the specified statuses.

  • sort – Sort resources by field and direction.

get_actions_list(*, status: list[Literal['running', 'success', 'error']] | None = None, sort: list[Literal['id', 'id:asc', 'id:desc', 'command', 'command:asc', 'command:desc', 'status', 'status:asc', 'status:desc', 'started', 'started:asc', 'started:desc', 'finished', 'finished:asc', 'finished:desc']] | None = None, page: int | None = None, per_page: int | None = None) ActionsPageResult[source]

Returns a paginated list of Actions for a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-list-actions-for-a-storage-box

Parameters:
  • status – Filter the Actions by status.

  • sort – Sort Actions by field and direction.

  • page – Page number to get.

  • per_page – Maximum number of Actions returned per page.

get_folders(*, path: str | None = None) StorageBoxFoldersResponse[source]

Lists the (sub)folders contained in a Storage Box.

Files are not part of the response.

See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-list-folders-of-a-storage-box

Parameters:

path – Relative path to list the folders from.

get_snapshot_all(*, name: str | None = None, is_automatic: bool | None = None, label_selector: str | None = None, sort: list[str] | None = None) list[BoundStorageBoxSnapshot][source]

Returns all Snapshots for a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-list-snapshots

Parameters:
  • name – Filter resources by their name. The response will only contain the resources matching exactly the specified name.

  • is_automatic – Filter whether the snapshot was made by a Snapshot Plan.

  • label_selector – Filter resources by labels. The response will only contain resources matching the label selector.

  • sort – Sort resources by field and direction.

get_snapshot_by_id(id: int) BoundStorageBoxSnapshot[source]

Returns a single Snapshot from a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-get-a-snapshot

Parameters:

id – ID of the Snapshot.

get_snapshot_by_name(name: str) BoundStorageBoxSnapshot | None[source]

Returns a single Snapshot from a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-list-snapshots

Parameters:

name – Name of the Snapshot.

get_snapshot_list(*, name: str | None = None, is_automatic: bool | None = None, label_selector: str | None = None, sort: list[str] | None = None) StorageBoxSnapshotsPageResult[source]

Returns all Snapshots for a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-list-snapshots

Parameters:
  • name – Filter resources by their name. The response will only contain the resources matching exactly the specified name.

  • is_automatic – Filter wether the snapshot was made by a Snapshot Plan.

  • label_selector – Filter resources by labels. The response will only contain resources matching the label selector.

  • sort – Sort resources by field and direction.

get_subaccount_all(*, name: str | None = None, username: str | None = None, label_selector: str | None = None, sort: list[str] | None = None) list[BoundStorageBoxSubaccount][source]

Returns all Subaccounts for a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-list-subaccounts

Parameters:
  • name – Filter resources by their name. The response will only contain the resources matching exactly the specified name.

  • username – Filter resources by their username. The response will only contain the resources matching exactly the specified username.

  • label_selector – Filter resources by labels. The response will only contain resources matching the label selector.

  • sort – Sort resources by field and direction.

get_subaccount_by_id(id: int) BoundStorageBoxSubaccount[source]

Returns a single Subaccount from a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-get-a-subaccount

Parameters:

id – ID of the Subaccount.

get_subaccount_by_name(name: str) BoundStorageBoxSubaccount | None[source]

Returns a single Subaccount from a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-list-subaccounts

Parameters:

name – Name of the Subaccount.

get_subaccount_by_username(username: str) BoundStorageBoxSubaccount | None[source]

Returns a single Subaccount from a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-list-subaccounts

Parameters:

username – User name of the Subaccount.

get_subaccount_list(*, name: str | None = None, username: str | None = None, label_selector: str | None = None, sort: list[str] | None = None) StorageBoxSubaccountsPageResult[source]

Returns all Subaccounts for a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-list-subaccounts

Parameters:
  • name – Filter resources by their name. The response will only contain the resources matching exactly the specified name.

  • username – Filter resources by their username. The response will only contain the resources matching exactly the specified username.

  • label_selector – Filter resources by labels. The response will only contain resources matching the label selector.

  • sort – Sort resources by field and direction.

model

alias of StorageBox

reset_password(password: str) BoundAction[source]

Reset the password of a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-reset-password

Parameters:

password – New password.

rollback_snapshot(snapshot: StorageBoxSnapshot | BoundStorageBoxSnapshot) BoundAction[source]

Rollback the Storage Box to the given snapshot.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-rollback-snapshot

Parameters:

snapshot – Snapshot to rollback to.

update(*, name: str | None = None, labels: dict[str, str] | None = None) BoundStorageBox[source]

Updates a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-update-a-storage-box

Parameters:
  • name – Name of the Storage Box.

  • labels – User-defined labels (key/value pairs) for the Storage Box.

update_access_settings(access_settings: StorageBoxAccessSettings) BoundAction[source]

Update the access settings of a Storage Box.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-update-access-settings

Parameters:

access_settings – New access settings for the Storage Box.

class BoundStorageBoxSnapshot(client: StorageBoxesClient, data: dict[str, Any], complete: bool = True)[source]
delete() DeleteStorageBoxSnapshotResponse[source]

Deletes a Storage Box Snapshot.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-delete-a-snapshot

model

alias of StorageBoxSnapshot

update(*, description: str | None = None, labels: dict[str, str] | None = None) BoundStorageBoxSnapshot[source]

Updates a Storage Box Snapshot.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-update-a-snapshot

Parameters:
  • description – Description of the Snapshot.

  • labels – User-defined labels (key/value pairs) for the Snapshot.

class BoundStorageBoxSubaccount(client: StorageBoxesClient, data: dict[str, Any], complete: bool = True)[source]
change_home_directory(home_directory: str) BoundAction[source]

Change the home directory of a Storage Box Subaccount.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccount-actions-change-home-directory

Parameters:

home_directory – Home directory for the Subaccount.

delete() DeleteStorageBoxSubaccountResponse[source]

Deletes a Storage Box Subaccount.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-delete-a-subaccount

model

alias of StorageBoxSubaccount

reset_password(password: str) BoundAction[source]

Reset the password of a Storage Box Subaccount.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccount-actions-reset-password

Parameters:

password – Password for the Subaccount.

update(*, name: str | None = None, description: str | None = None, labels: dict[str, str] | None = None) BoundStorageBoxSubaccount[source]

Updates a Storage Box Subaccount.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-update-a-subaccount

Parameters:
  • name – Name of the Subaccount.

  • description – Description of the Subaccount.

  • labels – User-defined labels (key/value pairs) for the Subaccount.

update_access_settings(access_settings: StorageBoxSubaccountAccessSettings) BoundAction[source]

Update the access settings of a Storage Box Subaccount.

See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccount-actions-update-access-settings

Parameters:

access_settings – Access settings for the Subaccount.

class StorageBox(id: int | None = None, name: str | None = None, storage_box_type: BoundStorageBoxType | StorageBoxType | None = None, location: BoundLocation | Location | None = None, system: str | None = None, server: str | None = None, username: str | None = None, labels: dict[str, str] | None = None, protection: dict[str, bool] | None = None, snapshot_plan: StorageBoxSnapshotPlan | None = None, access_settings: StorageBoxAccessSettings | None = None, stats: StorageBoxStats | None = None, status: Literal['active', 'initializing', 'locked'] | None = None, created: str | None = None)[source]

Storage Box Domain.

See https://docs.hetzner.cloud/reference/hetzner#storage-boxes.

class StorageBoxAccessSettings(reachable_externally: bool | None = None, samba_enabled: bool | None = None, ssh_enabled: bool | None = None, webdav_enabled: bool | None = None, zfs_enabled: bool | None = None)[source]

Storage Box Access Settings Domain.

to_payload() dict[str, Any][source]

Generates the request payload from this domain object.

class StorageBoxSnapshotPlan(max_snapshots: int, hour: int, minute: int, day_of_week: int | None = None, day_of_month: int | None = None)[source]

Storage Box Snapshot Plan Domain.

to_payload() dict[str, Any][source]

Generates the request payload from this domain object.

class StorageBoxStats(size: int | None = None, size_data: int | None = None, size_snapshots: int | None = None)[source]

Storage Box Stats Domain.

StorageBoxStatus

alias of Literal[‘active’, ‘initializing’, ‘locked’]

class StorageBoxSnapshot(id: int | None = None, name: str | None = None, description: str | None = None, is_automatic: bool | None = None, labels: dict[str, str] | None = None, storage_box: BoundStorageBox | StorageBox | None = None, created: str | None = None, stats: StorageBoxSnapshotStats | None = None)[source]

Storage Box Snapshot Domain.

class StorageBoxSnapshotStats(size: int, size_filesystem: int)[source]

Storage Box Snapshot Stats Domain.

class StorageBoxSubaccount(id: int | None = None, name: str | None = None, username: str | None = None, description: str | None = None, server: str | None = None, home_directory: str | None = None, access_settings: StorageBoxSubaccountAccessSettings | None = None, labels: dict[str, str] | None = None, storage_box: BoundStorageBox | StorageBox | None = None, created: str | None = None)[source]

Storage Box Subaccount Domain.

class StorageBoxSubaccountAccessSettings(reachable_externally: bool | None = None, samba_enabled: bool | None = None, ssh_enabled: bool | None = None, webdav_enabled: bool | None = None, readonly: bool | None = None)[source]

Storage Box Subaccount Access Settings Domain.

to_payload() dict[str, Any][source]

Generates the request payload from this domain object.

class CreateStorageBoxResponse(storage_box: BoundStorageBox, action: BoundAction)[source]

Create Storage Box Response Domain.

class CreateStorageBoxSnapshotResponse(snapshot: BoundStorageBoxSnapshot, action: BoundAction)[source]

Create Storage Box Snapshot Response Domain.

class CreateStorageBoxSubaccountResponse(subaccount: BoundStorageBoxSubaccount, action: BoundAction)[source]

Create Storage Box Subaccount Response Domain.

class StorageBoxFoldersResponse(folders: list[str])[source]

Storage Box Folders Response Domain.

class DeleteStorageBoxResponse(action: BoundAction)[source]

Delete Storage Box Response Domain.

class DeleteStorageBoxSnapshotResponse(action: BoundAction)[source]

Delete Storage Box Snapshot Response Domain.

class DeleteStorageBoxSubaccountResponse(action: BoundAction)[source]

Delete Storage Box Subaccount Response Domain.