Skip to content

DescribeBackupPolicy

Source: src/AWS/EFS/DescribeBackupPolicy.ts

Runtime binding for the DescribeBackupPolicy operation (IAM action elasticfilesystem:DescribeBackupPolicy on the file system ARN).

Reads whether AWS Backup automatic backups are enabled for the bound FileSystem. A file system that has never had a backup policy fails with the typed PolicyNotFound. Provide the implementation with Effect.provide(AWS.EFS.DescribeBackupPolicyHttp).

const describeBackupPolicy = yield* AWS.EFS.DescribeBackupPolicy(files);
const status = yield* describeBackupPolicy().pipe(
Effect.map((r) => r.BackupPolicy?.Status ?? "DISABLED"),
Effect.catchTag("PolicyNotFound", () => Effect.succeed("DISABLED")),
);