← All procedures

snapshot.delete

Delete a snapshot from S3

CLI
Package
@procedures/snapshot · README
Path
["snapshot","delete"]
CLI
mark snapshot delete --id <string> --bucket <string>
As data
{"$proc":["snapshot","delete"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/snapshot"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["snapshot","delete"], { id: "<id>", bucket: "<bucket>" });
console.log(JSON.stringify(result));

From the command line

$ mark snapshot delete --id <string> --bucket <string>

As data, in a program

{
  "$proc": ["snapshot", "delete"],
  "input": { "id": "<id>", "bucket": "<bucket>" }
}

Input

FieldTypeRequiredDefaultDescription
idstringyesSnapshot ID to delete
bucketstringyesS3 bucket containing snapshot

Output

FieldTypeRequiredDefaultDescription
deletedbooleanyesTrue when the snapshot was deleted
idstringyesThe snapshot id
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Snapshot ID to delete"
      },
      "bucket": {
        "type": "string",
        "description": "S3 bucket containing snapshot"
      }
    },
    "required": [
      "id",
      "bucket"
    ]
  },
  "output": {
    "type": "object",
    "properties": {
      "deleted": {
        "type": "boolean",
        "description": "True when the snapshot was deleted"
      },
      "id": {
        "type": "string",
        "description": "The snapshot id"
      }
    },
    "required": [
      "deleted",
      "id"
    ],
    "additionalProperties": {}
  }
}