zfs.resource.snapshot.count

Count ZFS snapshots per dataset.

This method provides a fast way to count snapshots without retrieving full snapshot information. Useful for UI displays and quota checks.

Examples:

Count snapshots for root filesystems only:

{}

Count all snapshots recursively:

{"recursive": true}

Count snapshots for a specific dataset:

{"paths": ["tank/data"]}

Count snapshots for a dataset and all of its children:

{"paths": ["tank"], "recursive": true}
Type: object

Type: array
No Additional Items

Tuple Validation

Parameter 1: data

data

Type: object Default: {"paths": [], "recursive": false}

Count parameters for counting ZFS snapshots.

No Additional Properties

Paths

Type: array of string Default: []

Dataset paths to count snapshots for. If empty, counts all snapshots.

All items must be unique

No Additional Items
Each item of this array must be:
Type: string

Recursive

Type: boolean Default: false

Include snapshots from child datasets when counting.

Result

Type: object

Mapping of dataset names to their snapshot counts.

Each additional property must conform to the following schema

Type: integer


Required roles: SNAPSHOT_READ