NATS Object Store icon

NATS Object Store

Store and retrieve objects (files, data) in NATS JetStream Object Store - manage buckets and objects

Overview

This node interacts with NATS JetStream Object Store, specifically managing buckets and objects within those buckets. The "Get Status" operation under the "Bucket" resource retrieves the current status or metadata of a specified object store bucket.

Common scenarios for this node include:

  • Monitoring the state or configuration of an object store bucket before performing further operations.
  • Verifying bucket existence and properties in automated workflows.
  • Integrating with systems that rely on NATS JetStream for object storage to programmatically check bucket health or details.

For example, you might use this node to confirm that a bucket named "my-files" exists and is properly configured before uploading files into it.

Properties

Name Meaning
Bucket Name Name of the Object Store bucket to get the status of. Bucket names can only contain alphanumeric characters, dashes, and underscores.

Output

The output JSON contains the status information of the specified bucket. This typically includes metadata such as bucket configuration, creation time, and other relevant details provided by the NATS JetStream Object Store API.

No binary data output is involved in this operation.

Example output structure (conceptual):

{
  "bucket": "my-files",
  "created": "2023-01-01T12:00:00Z",
  "config": {
    "maxBytes": 104857600,
    "storage": "file",
    "replicas": 1
  },
  "info": {
    "objectCount": 42,
    "totalBytes": 1234567
  }
}

Dependencies

  • Requires a valid connection to a NATS JetStream server.
  • Needs an API key credential for authenticating with the NATS server.
  • The node uses internal utilities to create and close connections to NATS.
  • No additional external services are required beyond the NATS JetStream environment.

Troubleshooting

  • Invalid Bucket Name: If the bucket name contains invalid characters, the node will throw a validation error. Ensure bucket names only contain alphanumeric characters, dashes, and underscores.
  • Unknown Operation: If an unsupported operation is selected, the node will report an "Unknown bucket operation" error.
  • Connection Issues: Failure to connect to the NATS server due to incorrect credentials or network issues will cause errors. Verify your API key and network connectivity.
  • Bucket Not Found: If the specified bucket does not exist, the node may return an error or empty status. Confirm the bucket name is correct and exists in the NATS JetStream environment.
  • Use the "Continue On Fail" option to handle errors gracefully in workflows.

Links and References

Discussion