volume_snapshot
Manage volume snapshots on the cloudscale.ch IaaS service
Collection: cloudscale_ch.cloud
Full Name: cloudscale_ch.cloud.volume_snapshot
Synopsis
Manage volume snapshots on the cloudscale.ch IaaS service
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| api_url | str | Cloudscale API URL; defaults from CLOUDSCALE_API_URL or https://api.cloudscale.ch/v1. | ||
| api_token | str | API bearer token; defaults from CLOUDSCALE_API_TOKEN. | ||
| api_timeout | int | Request timeout seconds; defaults from CLOUDSCALE_API_TIMEOUT or 45. | ||
| name | str | Name of the volume snapshot. Either I(name) or I(uuid) are required. | ||
| source_volume | str | UUID of the volume this snapshot belongs to. If I(name) and I(source_volume) are present, a new volume snapshot is created. This parameter has no effect on existing volume snapshots (I(uuid) option is present). | ||
| state | str | present | State of the volume snapshot. | |
| tags | dict | Tags assigned to the volume snapshot. Set this to C({}) to clear any tags. | ||
| uuid | str | UUID of the volume snapshot. |
Example
yaml
# Create a volume snapshot for a volume
- name: Create a volume snapshot
cloudscale_ch.cloud.volume_snapshot:
name: 'pre-dist-upgrade'
source_volume: '2db69ba3-1864-4608-853a-0771b6885a3a'
tags: {}
api_token: xxxxx
# Get a volume snapshot by name
- name: Get facts of a volume snapshot
cloudscale_ch.cloud.volume_snapshot:
name: 'pre-dist-upgrade'
api_token: xxxxx
# Delete a volume snapshot
- name: Delete a volume snapshot
cloudscale_ch.cloud.volume_snapshot:
uuid: '351d461c-2333-455f-b788-db11bf0b4aa2'
state: absent