container.delete

Delete a Container.

The container must be stopped, unless force is set - which tears it down first.

A container whose dataset has child datasets or snapshots is refused unless recursive is set, which destroys them along with any clones of those snapshots - data that cannot be recovered afterwards.

This method is a job.

Type: object

Type: array
No Additional Items

Tuple Validation

Parameter 1: id

id

Type: integer

Container ID.

Parameter 2: options

options

Type: object Default: {"force": false, "recursive": false}

Container deletion options.

No Additional Properties

Force

Type: boolean Default: false

Force deletion of a container that is not stopped (running or suspended) by stopping it first.

Recursive

Type: boolean Default: false

Destroy everything the container's dataset carries along with the container: its child datasets and snapshots, any clones of those snapshots wherever in the pool they live, and any holds held on them - releasing a hold can break a replication task that depends on it. Deleting a container whose dataset has child datasets or snapshots fails without this. None of what is destroyed can be recovered afterwards.

Result

Type: null


Required roles: CONTAINER_WRITE