mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-03 23:51:48 +00:00
chore(deps): update dependency hcloud to v2.16.0 (#792)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [hcloud](https://redirect.github.com/hetznercloud/hcloud-python) ([changelog](https://redirect.github.com/hetznercloud/hcloud-python/blob/main/CHANGELOG.md)) | `2.15.0` → `2.16.0` |  |  | --- ### Release Notes <details> <summary>hetznercloud/hcloud-python (hcloud)</summary> ### [`v2.16.0`](https://redirect.github.com/hetznercloud/hcloud-python/blob/HEAD/CHANGELOG.md#v2160) [Compare Source](https://redirect.github.com/hetznercloud/hcloud-python/compare/v2.15.0...v2.16.0) ##### Storage Boxes support is now generally available The experimental phase for Storage Boxes is over, and Storage Boxes support is now generally available. ##### Features - **servers**: allow setting user\_data for rebuild ([#​627](https://redirect.github.com/hetznercloud/hcloud-python/issues/627)) - Storage Box support no longer experimental ([#​626](https://redirect.github.com/hetznercloud/hcloud-python/issues/626)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/ansible-collections/hetzner.hcloud). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi44NS4xIiwidXBkYXRlZEluVmVyIjoiNDIuODUuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: jo <ljonas@riseup.net>
This commit is contained in:
parent
8e0517e4be
commit
7f535fef44
5 changed files with 10 additions and 215 deletions
|
|
@ -1,3 +1,3 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
__version__ = "2.15.0" # x-releaser-pleaser-version
|
__version__ = "2.16.0" # x-releaser-pleaser-version
|
||||||
|
|
|
||||||
|
|
@ -361,14 +361,16 @@ class BoundServer(BoundModelBase[Server], Server):
|
||||||
def rebuild(
|
def rebuild(
|
||||||
self,
|
self,
|
||||||
image: Image | BoundImage,
|
image: Image | BoundImage,
|
||||||
|
user_data: str | None = None,
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
**kwargs: Any,
|
**kwargs: Any,
|
||||||
) -> RebuildResponse:
|
) -> RebuildResponse:
|
||||||
"""Rebuilds a server overwriting its disk with the content of an image, thereby destroying all data on the target server.
|
"""Rebuilds a server overwriting its disk with the content of an image, thereby destroying all data on the target server.
|
||||||
|
|
||||||
:param image: Image to use for the rebuilt server
|
:param image: Image to use for the rebuilt server
|
||||||
|
:param user_data: Cloud-Init user data to use during Server rebuild (optional)
|
||||||
"""
|
"""
|
||||||
return self._client.rebuild(self, image=image)
|
return self._client.rebuild(self, image=image, user_data=user_data)
|
||||||
|
|
||||||
def change_type(
|
def change_type(
|
||||||
self,
|
self,
|
||||||
|
|
@ -1039,6 +1041,7 @@ class ServersClient(
|
||||||
self,
|
self,
|
||||||
server: Server | BoundServer,
|
server: Server | BoundServer,
|
||||||
image: Image | BoundImage,
|
image: Image | BoundImage,
|
||||||
|
user_data: str | None = None,
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
**kwargs: Any,
|
**kwargs: Any,
|
||||||
) -> RebuildResponse:
|
) -> RebuildResponse:
|
||||||
|
|
@ -1046,8 +1049,12 @@ class ServersClient(
|
||||||
|
|
||||||
:param server: Server to rebuild
|
:param server: Server to rebuild
|
||||||
:param image: Image to use for the rebuilt server
|
:param image: Image to use for the rebuilt server
|
||||||
|
:param user_data: Cloud-Init user data to use during Server rebuild (optional)
|
||||||
"""
|
"""
|
||||||
data: dict[str, Any] = {"image": image.id_or_name}
|
data: dict[str, Any] = {"image": image.id_or_name}
|
||||||
|
if user_data is not None:
|
||||||
|
data["user_data"] = user_data
|
||||||
|
|
||||||
response = self._client.request(
|
response = self._client.request(
|
||||||
url=f"{self._base_url}/{server.id}/actions/rebuild",
|
url=f"{self._base_url}/{server.id}/actions/rebuild",
|
||||||
method="POST",
|
method="POST",
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,6 @@ class StorageBoxTypesClient(ResourceClientBase):
|
||||||
A client for the Storage Box Types API.
|
A client for the Storage Box Types API.
|
||||||
|
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-types.
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-types.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_base_url = "/storage_box_types"
|
_base_url = "/storage_box_types"
|
||||||
|
|
@ -49,9 +46,6 @@ class StorageBoxTypesClient(ResourceClientBase):
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-types-get-a-storage-box-type
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-types-get-a-storage-box-type
|
||||||
|
|
||||||
:param id: ID of the Storage Box Type.
|
:param id: ID of the Storage Box Type.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
response = self._client.request(
|
response = self._client.request(
|
||||||
method="GET",
|
method="GET",
|
||||||
|
|
@ -66,9 +60,6 @@ class StorageBoxTypesClient(ResourceClientBase):
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-types-list-storage-box-types
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-types-list-storage-box-types
|
||||||
|
|
||||||
:param name: Name of the Storage Box Type.
|
:param name: Name of the Storage Box Type.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._get_first_by(self.get_list, name=name)
|
return self._get_first_by(self.get_list, name=name)
|
||||||
|
|
||||||
|
|
@ -86,9 +77,6 @@ class StorageBoxTypesClient(ResourceClientBase):
|
||||||
:param name: Name of the Storage Box Type.
|
:param name: Name of the Storage Box Type.
|
||||||
:param page: Page number to return.
|
:param page: Page number to return.
|
||||||
:param per_page: Maximum number of entries returned per page.
|
:param per_page: Maximum number of entries returned per page.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
params: dict[str, Any] = {}
|
params: dict[str, Any] = {}
|
||||||
if name is not None:
|
if name is not None:
|
||||||
|
|
@ -120,9 +108,6 @@ class StorageBoxTypesClient(ResourceClientBase):
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-types-list-storage-box-types
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-types-list-storage-box-types
|
||||||
|
|
||||||
:param name: Name of the Storage Box Type.
|
:param name: Name of the Storage Box Type.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._iter_pages(
|
return self._iter_pages(
|
||||||
self.get_list,
|
self.get_list,
|
||||||
|
|
|
||||||
|
|
@ -98,9 +98,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
:param sort: Sort Actions by field and direction.
|
:param sort: Sort Actions by field and direction.
|
||||||
:param page: Page number to get.
|
:param page: Page number to get.
|
||||||
:param per_page: Maximum number of Actions returned per page.
|
:param per_page: Maximum number of Actions returned per page.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.get_actions_list(
|
return self._client.get_actions_list(
|
||||||
self,
|
self,
|
||||||
|
|
@ -123,9 +120,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
|
|
||||||
:param status: Filter the actions by status. The response will only contain actions matching the specified statuses.
|
:param status: Filter the actions by status. The response will only contain actions matching the specified statuses.
|
||||||
:param sort: Sort resources by field and direction.
|
:param sort: Sort resources by field and direction.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.get_actions(
|
return self._client.get_actions(
|
||||||
self,
|
self,
|
||||||
|
|
@ -146,9 +140,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
|
|
||||||
:param name: Name of the Storage Box.
|
:param name: Name of the Storage Box.
|
||||||
:param labels: User-defined labels (key/value pairs) for the Storage Box.
|
:param labels: User-defined labels (key/value pairs) for the Storage Box.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.update(
|
return self._client.update(
|
||||||
self,
|
self,
|
||||||
|
|
@ -161,9 +152,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
Deletes a Storage Box.
|
Deletes a Storage Box.
|
||||||
|
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-delete-a-storage-box
|
See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-delete-a-storage-box
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.delete(self)
|
return self._client.delete(self)
|
||||||
|
|
||||||
|
|
@ -180,9 +168,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-list-folders-of-a-storage-box
|
See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-list-folders-of-a-storage-box
|
||||||
|
|
||||||
:param path: Relative path to list the folders from.
|
:param path: Relative path to list the folders from.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.get_folders(
|
return self._client.get_folders(
|
||||||
self,
|
self,
|
||||||
|
|
@ -200,9 +185,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-change-protection
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-change-protection
|
||||||
|
|
||||||
:param delete: Prevents the Storage Box from being deleted.
|
:param delete: Prevents the Storage Box from being deleted.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.change_protection(
|
return self._client.change_protection(
|
||||||
self,
|
self,
|
||||||
|
|
@ -219,9 +201,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-change-type
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-change-type
|
||||||
|
|
||||||
:param storage_box_type: Storage Box Type to change to.
|
:param storage_box_type: Storage Box Type to change to.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.change_type(
|
return self._client.change_type(
|
||||||
self,
|
self,
|
||||||
|
|
@ -238,9 +217,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-reset-password
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-reset-password
|
||||||
|
|
||||||
:param password: New password.
|
:param password: New password.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.reset_password(
|
return self._client.reset_password(
|
||||||
self,
|
self,
|
||||||
|
|
@ -257,9 +233,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-update-access-settings
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-update-access-settings
|
||||||
|
|
||||||
:param access_settings: New access settings for the Storage Box.
|
:param access_settings: New access settings for the Storage Box.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.update_access_settings(
|
return self._client.update_access_settings(
|
||||||
self,
|
self,
|
||||||
|
|
@ -276,9 +249,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-rollback-snapshot
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-rollback-snapshot
|
||||||
|
|
||||||
:param snapshot: Snapshot to rollback to.
|
:param snapshot: Snapshot to rollback to.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.rollback_snapshot(
|
return self._client.rollback_snapshot(
|
||||||
self,
|
self,
|
||||||
|
|
@ -292,9 +262,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
Disable the snapshot plan of a Storage Box.
|
Disable the snapshot plan of a Storage Box.
|
||||||
|
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-disable-snapshot-plan
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-disable-snapshot-plan
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.disable_snapshot_plan(self)
|
return self._client.disable_snapshot_plan(self)
|
||||||
|
|
||||||
|
|
@ -308,9 +275,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-enable-snapshot-plan
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-enable-snapshot-plan
|
||||||
|
|
||||||
:param snapshot_plan: Snapshot Plan to enable.
|
:param snapshot_plan: Snapshot Plan to enable.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.enable_snapshot_plan(
|
return self._client.enable_snapshot_plan(
|
||||||
self,
|
self,
|
||||||
|
|
@ -330,9 +294,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-get-a-snapshot
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-get-a-snapshot
|
||||||
|
|
||||||
:param id: ID of the Snapshot.
|
:param id: ID of the Snapshot.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.get_snapshot_by_id(self, id=id)
|
return self._client.get_snapshot_by_id(self, id=id)
|
||||||
|
|
||||||
|
|
@ -346,9 +307,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-list-snapshots
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-list-snapshots
|
||||||
|
|
||||||
:param name: Name of the Snapshot.
|
:param name: Name of the Snapshot.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.get_snapshot_by_name(self, name=name)
|
return self._client.get_snapshot_by_name(self, name=name)
|
||||||
|
|
||||||
|
|
@ -369,9 +327,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
:param is_automatic: Filter wether the snapshot was made by a Snapshot Plan.
|
:param is_automatic: Filter wether the snapshot was made by a Snapshot Plan.
|
||||||
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
||||||
:param sort: Sort resources by field and direction.
|
:param sort: Sort resources by field and direction.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.get_snapshot_list(
|
return self._client.get_snapshot_list(
|
||||||
self,
|
self,
|
||||||
|
|
@ -398,9 +353,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
:param is_automatic: Filter whether the snapshot was made by a Snapshot Plan.
|
:param is_automatic: Filter whether the snapshot was made by a Snapshot Plan.
|
||||||
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
||||||
:param sort: Sort resources by field and direction.
|
:param sort: Sort resources by field and direction.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.get_snapshot_all(
|
return self._client.get_snapshot_all(
|
||||||
self,
|
self,
|
||||||
|
|
@ -423,9 +375,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
|
|
||||||
:param description: Description of the Snapshot.
|
:param description: Description of the Snapshot.
|
||||||
:param labels: User-defined labels (key/value pairs) for the Snapshot.
|
:param labels: User-defined labels (key/value pairs) for the Snapshot.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.create_snapshot(
|
return self._client.create_snapshot(
|
||||||
self,
|
self,
|
||||||
|
|
@ -446,9 +395,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-get-a-subaccount
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-get-a-subaccount
|
||||||
|
|
||||||
:param id: ID of the Subaccount.
|
:param id: ID of the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.get_subaccount_by_id(self, id=id)
|
return self._client.get_subaccount_by_id(self, id=id)
|
||||||
|
|
||||||
|
|
@ -462,9 +408,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-list-subaccounts
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-list-subaccounts
|
||||||
|
|
||||||
:param name: Name of the Subaccount.
|
:param name: Name of the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.get_subaccount_by_name(self, name=name)
|
return self._client.get_subaccount_by_name(self, name=name)
|
||||||
|
|
||||||
|
|
@ -478,9 +421,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-list-subaccounts
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-list-subaccounts
|
||||||
|
|
||||||
:param username: User name of the Subaccount.
|
:param username: User name of the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.get_subaccount_by_username(self, username=username)
|
return self._client.get_subaccount_by_username(self, username=username)
|
||||||
|
|
||||||
|
|
@ -501,9 +441,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
:param username: Filter resources by their username. The response will only contain the resources matching exactly the specified username.
|
:param username: Filter resources by their username. The response will only contain the resources matching exactly the specified username.
|
||||||
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
||||||
:param sort: Sort resources by field and direction.
|
:param sort: Sort resources by field and direction.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.get_subaccount_list(
|
return self._client.get_subaccount_list(
|
||||||
self,
|
self,
|
||||||
|
|
@ -530,9 +467,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
:param username: Filter resources by their username. The response will only contain the resources matching exactly the specified username.
|
:param username: Filter resources by their username. The response will only contain the resources matching exactly the specified username.
|
||||||
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
||||||
:param sort: Sort resources by field and direction.
|
:param sort: Sort resources by field and direction.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.get_subaccount_all(
|
return self._client.get_subaccount_all(
|
||||||
self,
|
self,
|
||||||
|
|
@ -564,9 +498,6 @@ class BoundStorageBox(BoundModelBase[StorageBox], StorageBox):
|
||||||
:param access_settings: Access settings of the Subaccount.
|
:param access_settings: Access settings of the Subaccount.
|
||||||
:param description: Description of the Subaccount.
|
:param description: Description of the Subaccount.
|
||||||
:param labels: User-defined labels (key/value pairs) for the Subaccount.
|
:param labels: User-defined labels (key/value pairs) for the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.create_subaccount(
|
return self._client.create_subaccount(
|
||||||
self,
|
self,
|
||||||
|
|
@ -623,9 +554,6 @@ class BoundStorageBoxSnapshot(BoundModelBase[StorageBoxSnapshot], StorageBoxSnap
|
||||||
|
|
||||||
:param description: Description of the Snapshot.
|
:param description: Description of the Snapshot.
|
||||||
:param labels: User-defined labels (key/value pairs) for the Snapshot.
|
:param labels: User-defined labels (key/value pairs) for the Snapshot.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.update_snapshot(
|
return self._client.update_snapshot(
|
||||||
self,
|
self,
|
||||||
|
|
@ -640,9 +568,6 @@ class BoundStorageBoxSnapshot(BoundModelBase[StorageBoxSnapshot], StorageBoxSnap
|
||||||
Deletes a Storage Box Snapshot.
|
Deletes a Storage Box Snapshot.
|
||||||
|
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-delete-a-snapshot
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-delete-a-snapshot
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.delete_snapshot(self)
|
return self._client.delete_snapshot(self)
|
||||||
|
|
||||||
|
|
@ -695,9 +620,6 @@ class BoundStorageBoxSubaccount(
|
||||||
:param name: Name of the Subaccount.
|
:param name: Name of the Subaccount.
|
||||||
:param description: Description of the Subaccount.
|
:param description: Description of the Subaccount.
|
||||||
:param labels: User-defined labels (key/value pairs) for the Subaccount.
|
:param labels: User-defined labels (key/value pairs) for the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.update_subaccount(
|
return self._client.update_subaccount(
|
||||||
self,
|
self,
|
||||||
|
|
@ -713,9 +635,6 @@ class BoundStorageBoxSubaccount(
|
||||||
Deletes a Storage Box Subaccount.
|
Deletes a Storage Box Subaccount.
|
||||||
|
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-delete-a-subaccount
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-delete-a-subaccount
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.delete_subaccount(self)
|
return self._client.delete_subaccount(self)
|
||||||
|
|
||||||
|
|
@ -729,9 +648,6 @@ class BoundStorageBoxSubaccount(
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccount-actions-change-home-directory
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccount-actions-change-home-directory
|
||||||
|
|
||||||
:param home_directory: Home directory for the Subaccount.
|
:param home_directory: Home directory for the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.change_subaccount_home_directory(
|
return self._client.change_subaccount_home_directory(
|
||||||
self, home_directory=home_directory
|
self, home_directory=home_directory
|
||||||
|
|
@ -748,8 +664,6 @@ class BoundStorageBoxSubaccount(
|
||||||
|
|
||||||
:param password: Password for the Subaccount.
|
:param password: Password for the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.reset_subaccount_password(self, password=password)
|
return self._client.reset_subaccount_password(self, password=password)
|
||||||
|
|
||||||
|
|
@ -763,9 +677,6 @@ class BoundStorageBoxSubaccount(
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccount-actions-update-access-settings
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccount-actions-update-access-settings
|
||||||
|
|
||||||
:param access_settings: Access settings for the Subaccount.
|
:param access_settings: Access settings for the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._client.update_subaccount_access_settings(
|
return self._client.update_subaccount_access_settings(
|
||||||
self,
|
self,
|
||||||
|
|
@ -796,9 +707,6 @@ class StorageBoxesClient(
|
||||||
A client for the Storage Boxes API.
|
A client for the Storage Boxes API.
|
||||||
|
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-boxes.
|
See https://docs.hetzner.cloud/reference/hetzner#storage-boxes.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_base_url = "/storage_boxes"
|
_base_url = "/storage_boxes"
|
||||||
|
|
@ -821,9 +729,6 @@ class StorageBoxesClient(
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-get-a-storage-box
|
See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-get-a-storage-box
|
||||||
|
|
||||||
:param id: ID of the Storage Box.
|
:param id: ID of the Storage Box.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
response = self._client.request(
|
response = self._client.request(
|
||||||
method="GET",
|
method="GET",
|
||||||
|
|
@ -838,9 +743,6 @@ class StorageBoxesClient(
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-list-storage-boxes
|
See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-list-storage-boxes
|
||||||
|
|
||||||
:param name: Name of the Storage Box.
|
:param name: Name of the Storage Box.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._get_first_by(self.get_list, name=name)
|
return self._get_first_by(self.get_list, name=name)
|
||||||
|
|
||||||
|
|
@ -863,9 +765,6 @@ class StorageBoxesClient(
|
||||||
:param sort: Sort resources by field and direction.
|
:param sort: Sort resources by field and direction.
|
||||||
:param page: Page number to return.
|
:param page: Page number to return.
|
||||||
:param per_page: Maximum number of entries returned per page.
|
:param per_page: Maximum number of entries returned per page.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
params: dict[str, Any] = {}
|
params: dict[str, Any] = {}
|
||||||
if name is not None:
|
if name is not None:
|
||||||
|
|
@ -904,9 +803,6 @@ class StorageBoxesClient(
|
||||||
:param name: Name of the Storage Box.
|
:param name: Name of the Storage Box.
|
||||||
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
||||||
:param sort: Sort resources by field and direction.
|
:param sort: Sort resources by field and direction.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._iter_pages(
|
return self._iter_pages(
|
||||||
self.get_list,
|
self.get_list,
|
||||||
|
|
@ -938,9 +834,6 @@ class StorageBoxesClient(
|
||||||
:param ssh_keys: SSH public keys of the Storage Box.
|
:param ssh_keys: SSH public keys of the Storage Box.
|
||||||
:param access_settings: Access settings of the Storage Box.
|
:param access_settings: Access settings of the Storage Box.
|
||||||
:param labels: User-defined labels (key/value pairs) for the Storage Box.
|
:param labels: User-defined labels (key/value pairs) for the Storage Box.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
data: dict[str, Any] = {
|
data: dict[str, Any] = {
|
||||||
"name": name,
|
"name": name,
|
||||||
|
|
@ -984,9 +877,6 @@ class StorageBoxesClient(
|
||||||
:param storage_box: Storage Box to update.
|
:param storage_box: Storage Box to update.
|
||||||
:param name: Name of the Storage Box.
|
:param name: Name of the Storage Box.
|
||||||
:param labels: User-defined labels (key/value pairs) for the Storage Box.
|
:param labels: User-defined labels (key/value pairs) for the Storage Box.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
data: dict[str, Any] = {}
|
data: dict[str, Any] = {}
|
||||||
if name is not None:
|
if name is not None:
|
||||||
|
|
@ -1012,9 +902,6 @@ class StorageBoxesClient(
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-delete-a-storage-box
|
See https://docs.hetzner.cloud/reference/hetzner#storage-boxes-delete-a-storage-box
|
||||||
|
|
||||||
:param storage_box: Storage Box to delete.
|
:param storage_box: Storage Box to delete.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
response = self._client.request(
|
response = self._client.request(
|
||||||
method="DELETE",
|
method="DELETE",
|
||||||
|
|
@ -1040,9 +927,6 @@ class StorageBoxesClient(
|
||||||
|
|
||||||
:param storage_box: Storage Box to list the folders from.
|
:param storage_box: Storage Box to list the folders from.
|
||||||
:param path: Relative path to list the folders from.
|
:param path: Relative path to list the folders from.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
params: dict[str, Any] = {}
|
params: dict[str, Any] = {}
|
||||||
if path is not None:
|
if path is not None:
|
||||||
|
|
@ -1075,9 +959,6 @@ class StorageBoxesClient(
|
||||||
:param sort: Sort Actions by field and direction.
|
:param sort: Sort Actions by field and direction.
|
||||||
:param page: Page number to get.
|
:param page: Page number to get.
|
||||||
:param per_page: Maximum number of Actions returned per page.
|
:param per_page: Maximum number of Actions returned per page.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._get_actions_list(
|
return self._get_actions_list(
|
||||||
f"{self._base_url}/{storage_box.id}",
|
f"{self._base_url}/{storage_box.id}",
|
||||||
|
|
@ -1102,9 +983,6 @@ class StorageBoxesClient(
|
||||||
:param storage_box: Storage Box to get the Actions for.
|
:param storage_box: Storage Box to get the Actions for.
|
||||||
:param status: Filter the actions by status. The response will only contain actions matching the specified statuses.
|
:param status: Filter the actions by status. The response will only contain actions matching the specified statuses.
|
||||||
:param sort: Sort resources by field and direction.
|
:param sort: Sort resources by field and direction.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._iter_pages(
|
return self._iter_pages(
|
||||||
self.get_actions_list,
|
self.get_actions_list,
|
||||||
|
|
@ -1126,9 +1004,6 @@ class StorageBoxesClient(
|
||||||
|
|
||||||
:param storage_box: Storage Box to update.
|
:param storage_box: Storage Box to update.
|
||||||
:param delete: Prevents the Storage Box from being deleted.
|
:param delete: Prevents the Storage Box from being deleted.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
data: dict[str, Any] = {}
|
data: dict[str, Any] = {}
|
||||||
if delete is not None:
|
if delete is not None:
|
||||||
|
|
@ -1153,9 +1028,6 @@ class StorageBoxesClient(
|
||||||
|
|
||||||
:param storage_box: Storage Box to update.
|
:param storage_box: Storage Box to update.
|
||||||
:param storage_box_type: Storage Box Type to change to.
|
:param storage_box_type: Storage Box Type to change to.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
data: dict[str, Any] = {
|
data: dict[str, Any] = {
|
||||||
"storage_box_type": storage_box_type.id_or_name,
|
"storage_box_type": storage_box_type.id_or_name,
|
||||||
|
|
@ -1180,9 +1052,6 @@ class StorageBoxesClient(
|
||||||
|
|
||||||
:param storage_box: Storage Box to update.
|
:param storage_box: Storage Box to update.
|
||||||
:param password: New password.
|
:param password: New password.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
data: dict[str, Any] = {
|
data: dict[str, Any] = {
|
||||||
"password": password,
|
"password": password,
|
||||||
|
|
@ -1207,9 +1076,6 @@ class StorageBoxesClient(
|
||||||
|
|
||||||
:param storage_box: Storage Box to update.
|
:param storage_box: Storage Box to update.
|
||||||
:param access_settings: New access settings for the Storage Box.
|
:param access_settings: New access settings for the Storage Box.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
data: dict[str, Any] = access_settings.to_payload()
|
data: dict[str, Any] = access_settings.to_payload()
|
||||||
|
|
||||||
|
|
@ -1232,9 +1098,6 @@ class StorageBoxesClient(
|
||||||
|
|
||||||
:param storage_box: Storage Box to update.
|
:param storage_box: Storage Box to update.
|
||||||
:param snapshot: Snapshot to rollback to.
|
:param snapshot: Snapshot to rollback to.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
data: dict[str, Any] = {
|
data: dict[str, Any] = {
|
||||||
"snapshot": snapshot.id_or_name,
|
"snapshot": snapshot.id_or_name,
|
||||||
|
|
@ -1257,9 +1120,6 @@ class StorageBoxesClient(
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-disable-snapshot-plan
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-actions-disable-snapshot-plan
|
||||||
|
|
||||||
:param storage_box: Storage Box to update.
|
:param storage_box: Storage Box to update.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
response = self._client.request(
|
response = self._client.request(
|
||||||
method="POST",
|
method="POST",
|
||||||
|
|
@ -1279,9 +1139,6 @@ class StorageBoxesClient(
|
||||||
|
|
||||||
:param storage_box: Storage Box to update.
|
:param storage_box: Storage Box to update.
|
||||||
:param snapshot_plan: Snapshot Plan to enable.
|
:param snapshot_plan: Snapshot Plan to enable.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
data: dict[str, Any] = snapshot_plan.to_payload()
|
data: dict[str, Any] = snapshot_plan.to_payload()
|
||||||
|
|
||||||
|
|
@ -1307,9 +1164,6 @@ class StorageBoxesClient(
|
||||||
|
|
||||||
:param storage_box: Storage Box to get the Snapshot from.
|
:param storage_box: Storage Box to get the Snapshot from.
|
||||||
:param id: ID of the Snapshot.
|
:param id: ID of the Snapshot.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
response = self._client.request(
|
response = self._client.request(
|
||||||
method="GET",
|
method="GET",
|
||||||
|
|
@ -1329,9 +1183,6 @@ class StorageBoxesClient(
|
||||||
|
|
||||||
:param storage_box: Storage Box to get the Snapshot from.
|
:param storage_box: Storage Box to get the Snapshot from.
|
||||||
:param name: Name of the Snapshot.
|
:param name: Name of the Snapshot.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._get_first_by(self.get_snapshot_list, storage_box, name=name)
|
return self._get_first_by(self.get_snapshot_list, storage_box, name=name)
|
||||||
|
|
||||||
|
|
@ -1354,9 +1205,6 @@ class StorageBoxesClient(
|
||||||
:param is_automatic: Filter whether the snapshot was made by a Snapshot Plan.
|
:param is_automatic: Filter whether the snapshot was made by a Snapshot Plan.
|
||||||
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
||||||
:param sort: Sort resources by field and direction.
|
:param sort: Sort resources by field and direction.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
params: dict[str, Any] = {}
|
params: dict[str, Any] = {}
|
||||||
if name is not None:
|
if name is not None:
|
||||||
|
|
@ -1399,9 +1247,6 @@ class StorageBoxesClient(
|
||||||
:param is_automatic: Filter whether the snapshot was made by a Snapshot Plan.
|
:param is_automatic: Filter whether the snapshot was made by a Snapshot Plan.
|
||||||
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
||||||
:param sort: Sort resources by field and direction.
|
:param sort: Sort resources by field and direction.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
# The endpoint does not have pagination, forward to the list method.
|
# The endpoint does not have pagination, forward to the list method.
|
||||||
result, _ = self.get_snapshot_list(
|
result, _ = self.get_snapshot_list(
|
||||||
|
|
@ -1428,9 +1273,6 @@ class StorageBoxesClient(
|
||||||
:param storage_box: Storage Box to create a Snapshot from.
|
:param storage_box: Storage Box to create a Snapshot from.
|
||||||
:param description: Description of the Snapshot.
|
:param description: Description of the Snapshot.
|
||||||
:param labels: User-defined labels (key/value pairs) for the Snapshot.
|
:param labels: User-defined labels (key/value pairs) for the Snapshot.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
data: dict[str, Any] = {}
|
data: dict[str, Any] = {}
|
||||||
if description is not None:
|
if description is not None:
|
||||||
|
|
@ -1468,9 +1310,6 @@ class StorageBoxesClient(
|
||||||
:param snapshot: Storage Box Snapshot to update.
|
:param snapshot: Storage Box Snapshot to update.
|
||||||
:param description: Description of the Snapshot.
|
:param description: Description of the Snapshot.
|
||||||
:param labels: User-defined labels (key/value pairs) for the Snapshot.
|
:param labels: User-defined labels (key/value pairs) for the Snapshot.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
if snapshot.storage_box is None:
|
if snapshot.storage_box is None:
|
||||||
raise ValueError("snapshot storage_box property is none")
|
raise ValueError("snapshot storage_box property is none")
|
||||||
|
|
@ -1498,9 +1337,6 @@ class StorageBoxesClient(
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-delete-a-snapshot
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-snapshots-delete-a-snapshot
|
||||||
|
|
||||||
:param snapshot: Storage Box Snapshot to delete.
|
:param snapshot: Storage Box Snapshot to delete.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
if snapshot.storage_box is None:
|
if snapshot.storage_box is None:
|
||||||
raise ValueError("snapshot storage_box property is none")
|
raise ValueError("snapshot storage_box property is none")
|
||||||
|
|
@ -1528,9 +1364,6 @@ class StorageBoxesClient(
|
||||||
|
|
||||||
:param storage_box: Storage Box to get the Subaccount from.
|
:param storage_box: Storage Box to get the Subaccount from.
|
||||||
:param id: ID of the Subaccount.
|
:param id: ID of the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
response = self._client.request(
|
response = self._client.request(
|
||||||
method="GET",
|
method="GET",
|
||||||
|
|
@ -1550,9 +1383,6 @@ class StorageBoxesClient(
|
||||||
|
|
||||||
:param storage_box: Storage Box to get the Subaccount from.
|
:param storage_box: Storage Box to get the Subaccount from.
|
||||||
:param name: Name of the Subaccount.
|
:param name: Name of the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._get_first_by(
|
return self._get_first_by(
|
||||||
self.get_subaccount_list,
|
self.get_subaccount_list,
|
||||||
|
|
@ -1572,9 +1402,6 @@ class StorageBoxesClient(
|
||||||
|
|
||||||
:param storage_box: Storage Box to get the Subaccount from.
|
:param storage_box: Storage Box to get the Subaccount from.
|
||||||
:param username: User name of the Subaccount.
|
:param username: User name of the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
return self._get_first_by(
|
return self._get_first_by(
|
||||||
self.get_subaccount_list,
|
self.get_subaccount_list,
|
||||||
|
|
@ -1601,9 +1428,6 @@ class StorageBoxesClient(
|
||||||
:param username: Filter resources by their username. The response will only contain the resources matching exactly the specified username.
|
:param username: Filter resources by their username. The response will only contain the resources matching exactly the specified username.
|
||||||
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
||||||
:param sort: Sort resources by field and direction.
|
:param sort: Sort resources by field and direction.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
params: dict[str, Any] = {}
|
params: dict[str, Any] = {}
|
||||||
if name is not None:
|
if name is not None:
|
||||||
|
|
@ -1647,9 +1471,6 @@ class StorageBoxesClient(
|
||||||
:param username: Filter resources by their username. The response will only contain the resources matching exactly the specified username.
|
:param username: Filter resources by their username. The response will only contain the resources matching exactly the specified username.
|
||||||
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
:param label_selector: Filter resources by labels. The response will only contain resources matching the label selector.
|
||||||
:param sort: Sort resources by field and direction.
|
:param sort: Sort resources by field and direction.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
# The endpoint does not have pagination, forward to the list method.
|
# The endpoint does not have pagination, forward to the list method.
|
||||||
result, _ = self.get_subaccount_list(
|
result, _ = self.get_subaccount_list(
|
||||||
|
|
@ -1684,9 +1505,6 @@ class StorageBoxesClient(
|
||||||
:param access_settings: Access settings of the Subaccount.
|
:param access_settings: Access settings of the Subaccount.
|
||||||
:param description: Description of the Subaccount.
|
:param description: Description of the Subaccount.
|
||||||
:param labels: User-defined labels (key/value pairs) for the Subaccount.
|
:param labels: User-defined labels (key/value pairs) for the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
data: dict[str, Any] = {
|
data: dict[str, Any] = {
|
||||||
"home_directory": home_directory,
|
"home_directory": home_directory,
|
||||||
|
|
@ -1733,9 +1551,6 @@ class StorageBoxesClient(
|
||||||
:param name: Name of the Subaccount.
|
:param name: Name of the Subaccount.
|
||||||
:param description: Description of the Subaccount.
|
:param description: Description of the Subaccount.
|
||||||
:param labels: User-defined labels (key/value pairs) for the Subaccount.
|
:param labels: User-defined labels (key/value pairs) for the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
if subaccount.storage_box is None:
|
if subaccount.storage_box is None:
|
||||||
raise ValueError("subaccount storage_box property is none")
|
raise ValueError("subaccount storage_box property is none")
|
||||||
|
|
@ -1765,9 +1580,6 @@ class StorageBoxesClient(
|
||||||
See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-delete-a-subaccount
|
See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccounts-delete-a-subaccount
|
||||||
|
|
||||||
:param subaccount: Storage Box Subaccount to delete.
|
:param subaccount: Storage Box Subaccount to delete.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
if subaccount.storage_box is None:
|
if subaccount.storage_box is None:
|
||||||
raise ValueError("subaccount storage_box property is none")
|
raise ValueError("subaccount storage_box property is none")
|
||||||
|
|
@ -1792,9 +1604,6 @@ class StorageBoxesClient(
|
||||||
|
|
||||||
:param subaccount: Storage Box Subaccount to update.
|
:param subaccount: Storage Box Subaccount to update.
|
||||||
:param home_directory: Home directory for the Subaccount.
|
:param home_directory: Home directory for the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
if subaccount.storage_box is None:
|
if subaccount.storage_box is None:
|
||||||
raise ValueError("subaccount storage_box property is none")
|
raise ValueError("subaccount storage_box property is none")
|
||||||
|
|
@ -1822,9 +1631,6 @@ class StorageBoxesClient(
|
||||||
|
|
||||||
:param subaccount: Storage Box Subaccount to update.
|
:param subaccount: Storage Box Subaccount to update.
|
||||||
:param password: Password for the Subaccount.
|
:param password: Password for the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
if subaccount.storage_box is None:
|
if subaccount.storage_box is None:
|
||||||
raise ValueError("subaccount storage_box property is none")
|
raise ValueError("subaccount storage_box property is none")
|
||||||
|
|
@ -1852,9 +1658,6 @@ class StorageBoxesClient(
|
||||||
|
|
||||||
:param subaccount: Storage Box Subaccount to update.
|
:param subaccount: Storage Box Subaccount to update.
|
||||||
:param access_settings: Access settings for the Subaccount.
|
:param access_settings: Access settings for the Subaccount.
|
||||||
|
|
||||||
Experimental:
|
|
||||||
Storage Box support is experimental, breaking changes may occur within minor releases.
|
|
||||||
"""
|
"""
|
||||||
if subaccount.storage_box is None:
|
if subaccount.storage_box is None:
|
||||||
raise ValueError("subaccount storage_box property is none")
|
raise ValueError("subaccount storage_box property is none")
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ from textwrap import dedent
|
||||||
logger = logging.getLogger("vendor")
|
logger = logging.getLogger("vendor")
|
||||||
|
|
||||||
HCLOUD_SOURCE_URL = "https://github.com/hetznercloud/hcloud-python"
|
HCLOUD_SOURCE_URL = "https://github.com/hetznercloud/hcloud-python"
|
||||||
HCLOUD_VERSION = "v2.15.0"
|
HCLOUD_VERSION = "v2.16.0"
|
||||||
HCLOUD_VENDOR_PATH = "plugins/module_utils/_vendor/hcloud"
|
HCLOUD_VENDOR_PATH = "plugins/module_utils/_vendor/hcloud"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue