community.general.scaleway_database_backup module – Scaleway database backups management module
Note
This module is part of the community.general collection (version 9.5.1).
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 community.general
.
To use it in a playbook, specify: community.general.scaleway_database_backup
.
New in community.general 1.2.0
Synopsis
This module manages database backups on Scaleway account https://developer.scaleway.com.
Parameters
Parameter |
Comments |
---|---|
HTTP timeout to Scaleway API in seconds. Default: |
|
Scaleway OAuth token. |
|
Scaleway API URL. Default: |
|
Name used to identify the database. Required for Ignored when |
|
Expiration datetime of the database backup (ISO 8601 format). Ignored when |
|
UUID used to identify the database backup. Required for |
|
UUID of the instance associated to the database backup. Required for Ignored when |
|
Name used to identify the database backup. Required for Ignored when |
|
List of parameters passed to the query string. Default: |
|
Scaleway region to use (for example Choices:
|
|
Indicate desired state of the database backup.
Choices:
|
|
Validate SSL certs of the Scaleway API. Choices:
|
|
Wait for the instance to reach its desired state before returning. Choices:
|
|
Time to wait before every attempt to check the state of the backup. Default: |
|
Time to wait for the backup to reach the expected state. Default: |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Notes
Note
Also see the API documentation on https://developer.scaleway.com/.
If
api_token
is not set within the module, the following environment variables can be used in decreasing order of precedenceSCW_TOKEN
,SCW_API_KEY
,SCW_OAUTH_TOKEN
orSCW_API_TOKEN
.If one wants to use a different
api_url
one can also set theSCW_API_URL
environment variable.
Examples
- name: Create a backup
community.general.scaleway_database_backup:
name: 'my_backup'
state: present
region: 'fr-par'
database_name: 'my-database'
instance_id: '50968a80-2909-4e5c-b1af-a2e19860dddb'
- name: Export a backup
community.general.scaleway_database_backup:
id: '6ef1125a-037e-494f-a911-6d9c49a51691'
state: exported
region: 'fr-par'
- name: Restore a backup
community.general.scaleway_database_backup:
id: '6ef1125a-037e-494f-a911-6d9c49a51691'
state: restored
region: 'fr-par'
database_name: 'my-new-database'
instance_id: '50968a80-2909-4e5c-b1af-a2e19860dddb'
- name: Remove a backup
community.general.scaleway_database_backup:
id: '6ef1125a-037e-494f-a911-6d9c49a51691'
state: absent
region: 'fr-par'
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Backup metadata. Returned: when Sample: |