github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/volume/snapshot-delete.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: volume snapshot delete'
     4  description: |
     5    Delete external volume snapshots.
     6  ---
     7  
     8  # Command: volume snapshot delete
     9  
    10  The `volume snapshot delete` command deletes a snapshot of an existing
    11  [Container Storage Interface (CSI)][csi] volume. Only CSI plugins that
    12  implement the [Controller][csi_plugins_internals] interface support this
    13  command.
    14  
    15  ## Usage
    16  
    17  ```plaintext
    18  nomad volume snapshot delete [plugin_id] [snapshot_id]
    19  ```
    20  
    21  The `volume snapshot delete` command requires both the plugin ID and the
    22  snapshot ID. The volume that was the source of the snapshot does not still
    23  need to be [registered] with Nomad in order to be deleted.
    24  
    25  When ACLs are enabled, this command requires a token with the `csi-write-
    26  volume` and `plugin:read` capabilities.
    27  
    28  ## General Options
    29  
    30  @include 'general_options.mdx'
    31  
    32  ## Snapshot Delete Options
    33  
    34  - `-secret`: Secrets to pass to the plugin to delete the
    35    snapshot. Accepts multiple flags in the form `-secret key=value`
    36  
    37  ## Examples
    38  
    39  Delete a volume snapshot:
    40  
    41  ```shell-session
    42  $ nomad volume snapshot delete aws-ebs0 snap-12345
    43  Deleted snapshot snap-12345.
    44  ```
    45  
    46  [csi]: https://github.com/container-storage-interface/spec
    47  [csi_plugin]: /docs/job-specification/csi_plugin
    48  [registered]: /docs/commands/volume/register
    49  [csi_plugins_internals]: /docs/concepts/plugins/csi#csi-plugins