hetzner.hcloud.storage_box_snapshot_info module – Gather infos about Hetzner Storage Box Snapshots.
Note
This module is part of the hetzner.hcloud collection (version 6.4.0).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install hetzner.hcloud.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: hetzner.hcloud.storage_box_snapshot_info.
Synopsis
Gather infos about Hetzner Storage Box Snapshots.
See the Storage Boxes API documentation for more details.
Experimental: Storage Box support is experimental, breaking changes may occur within minor releases. See https://github.com/ansible-collections/hetzner.hcloud/issues/756 for more details.
Aliases: hcloud_storage_box_snapshot_info
Requirements
The below requirements are needed on the host that executes this module.
python-dateutil >= 2.7.5
requests >=2.20
Parameters
Parameter |
Comments |
|---|---|
The endpoint for the Hetzner Cloud API. You can also set this option by using the Default: |
|
The endpoint for the Hetzner API. You can also set this option by using the Default: |
|
The token for the Hetzner Cloud API. You can also set this option by using the |
|
ID of the Storage Box Snapshot to get. If the ID is invalid, the module will fail. |
|
Label selector to filter the Storage Box Snapshots to get. |
|
Name of the Storage Box Snapshot to get. |
|
ID or Name of the parent Storage Box. Using the ID is preferred, to reduce the amount of API requests. |
See Also
See also
- Documentation for Hetzner APIs
Complete reference for the Hetzner APIs.
Examples
- name: Gather all Storage Box Snapshots
hetzner.hcloud.storage_box_snapshot_info:
storage_box: my-storage-box
register: output
- name: Gather Storage Box Snapshots by label
hetzner.hcloud.storage_box_snapshot_info:
storage_box: my-storage-box
label_selector: key=value
register: output
- name: Gather Storage Box Snapshot by id
hetzner.hcloud.storage_box_snapshot_info:
storage_box: 497436
id: 405920
register: output
- name: Gather Storage Box Snapshot by name
hetzner.hcloud.storage_box_snapshot_info:
storage_box: my-storage-box
name: 2025-02-12T11-35-19
register: output
- name: Print the gathered infos
debug:
var: output.hcloud_storage_box_snapshot_info
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
List of Storage Box Snapshots. Returned: always |
|
Point in time when the Storage Box Snapshot was created (in RFC3339 format). Returned: always Sample: |
|
Description of the Storage Box Snapshot. Returned: always Sample: |
|
ID of the Storage Box Snapshot. Returned: always Sample: |
|
Whether the Storage Box Snapshot was created automatically. Returned: always Sample: |
|
User-defined labels (key-value pairs) of the Storage Box Snapshot. Returned: always Sample: |
|
Name of the Storage Box Snapshot. Returned: always Sample: |
|
Statistics of the Storage Box Snapshot. Returned: always |
|
Current storage requirements of the Snapshot in bytes. Returned: always Sample: |
|
Size of the compressed file system contained in the Snapshot in bytes. Returned: always Sample: |
|
ID of the parent Storage Box. Returned: always Sample: |