Skip to content

DescribeSnapshots

Source: src/AWS/FSx/DescribeSnapshots.ts

Runtime binding for the DescribeSnapshots operation (IAM action fsx:DescribeSnapshots on *).

Lists FSx for OpenZFS snapshots — optionally filtered by volume-id or file-system-id — from inside a function runtime. Pairs with CreateSnapshot to poll a runtime-initiated snapshot until it reaches AVAILABLE. Provide the implementation with Effect.provide(AWS.FSx.DescribeSnapshotsHttp).

const describeSnapshots = yield* AWS.FSx.DescribeSnapshots();
const response = yield* describeSnapshots({
Filters: [{ Name: "volume-id", Values: [volumeId] }],
});
yield* Effect.log(`${response.Snapshots?.length ?? 0} snapshots`);