← All procedures

s3.listAll

List ALL objects in S3 bucket, following continuation tokens (unbounded by 1000)

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

Use it

In TypeScript

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

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

From the command line

$ mark s3 listAll --bucket <string>

As data, in a program

{ "$proc": ["s3", "listAll"], "input": { "bucket": "<bucket>" } }

Input

FieldTypeRequiredDefaultDescription
bucketstringyesS3 bucket name
prefixstringnoFilter objects by prefix
maxKeysnumbernoPage size for each underlying request (default/max 1000); paging is automatic
delimiterstringnoDelimiter for hierarchical listing (e.g., "/")

Output

FieldTypeRequiredDefaultDescription
contentsobject[]yesThe objects of all pages
commonPrefixesstring[]yesThe common prefixes of all pages (with a delimiter)
keyCountnumberyesThe number of keys
pageCountnumberyesThe number of list requests
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "bucket": {
        "type": "string",
        "description": "S3 bucket name"
      },
      "prefix": {
        "description": "Filter objects by prefix",
        "type": "string"
      },
      "maxKeys": {
        "description": "Page size for each underlying request (default/max 1000); paging is automatic",
        "type": "number"
      },
      "delimiter": {
        "description": "Delimiter for hierarchical listing (e.g., \"/\")",
        "type": "string"
      }
    },
    "required": [
      "bucket"
    ]
  },
  "output": {
    "type": "object",
    "properties": {
      "contents": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "key": {
              "type": "string",
              "description": "The object key"
            },
            "size": {
              "type": "number",
              "description": "The size, in bytes"
            },
            "lastModified": {
              "type": "string",
              "description": "The time of the last change (ISO 8601)"
            },
            "etag": {
              "type": "string",
              "description": "The ETag, without quotes"
            },
            "storageClass": {
              "description": "The storage class",
              "type": "string"
            }
          },
          "required": [
            "key",
            "size",
            "lastModified",
            "etag"
          ],
          "additionalProperties": {}
        },
        "description": "The objects of all pages"
      },
      "commonPrefixes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The common prefixes of all pages (with a delimiter)"
      },
      "keyCount": {
        "type": "number",
        "description": "The number of keys"
      },
      "pageCount": {
        "type": "number",
        "description": "The number of list requests"
      }
    },
    "required": [
      "contents",
      "commonPrefixes",
      "keyCount",
      "pageCount"
    ],
    "additionalProperties": {}
  }
}