Skip to main content

backup_policies

Creates, updates, deletes, gets or lists a backup_policies resource.

Overview

Namebackup_policies
TypeResource
Idaws.efs.backup_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
statusstringDescribes the status of the file system's backup policy. ENABLED – EFS is automatically backing up the file system. ENABLING – EFS is turning on automatic backups for the file system. DISABLED – Automatic back ups are turned off for the file system. DISABLING – EFS is turning off automatic backups for the file system. (ENABLED, ENABLING, DISABLED, DISABLING)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_backup_policyselectfile_system_id, regionReturns the backup policy for the specified EFS file system.
put_backup_policyreplacefile_system_id, region, BackupPolicyUpdates the file system's backup policy. Use this action to start or stop automatic backups of the file system.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
file_system_idstringSpecifies which EFS file system to update the backup policy for.
regionstringAWS region (default: us-east-1)

SELECT examples

Returns the backup policy for the specified EFS file system.

SELECT
status
FROM aws.efs.backup_policies
WHERE file_system_id = '{{ file_system_id }}' -- required
AND region = '{{ region }}' -- required
;

REPLACE examples

Updates the file system's backup policy. Use this action to start or stop automatic backups of the file system.

REPLACE aws.efs.backup_policies
SET
BackupPolicy = '{{ BackupPolicy }}'
WHERE
file_system_id = '{{ file_system_id }}' --required
AND region = '{{ region }}' --required
AND BackupPolicy = '{{ BackupPolicy }}' --required
RETURNING
backup_policy;