NATS CreateBucket

NATS CreateBucket

Certified

Create NATS Key/Value bucket

Creates a Key/Value bucket on the target NATS cluster. Renders name and metadata before creation, sets maxHistoryPerKey to 1 by default, and lets you cap bucket and value sizes in bytes.

yaml
type: io.kestra.plugin.nats.kv.CreateBucket

Creates a new Key/Value bucket, with all required properties.

yaml
id: nats_kv_create_bucket
namespace: company.team

tasks:
  - id: create_bucket
    type: io.kestra.plugin.nats.kv.CreateBucket
    url: nats://localhost:4222
    username: nats_user
    password: "{{ secret('NATS_PASSWORD') }}"
    name: my_bucket

Creates a new Key/Value bucket.

yaml
id: nats_kv_create_bucket
namespace: company.team

tasks:
  - id: create_bucket
    type: io.kestra.plugin.nats.kv.CreateBucket
    url: nats://localhost:4222
    username: nats_user
    password: "{{ secret('NATS_PASSWORD') }}"
    name: my_bucket
    description: my bucket for special purposes
    historyPerKey: 2
    bucketSize: 1024
    valueSize: 1024
    metadata: {"key1":"value1","key2":"value2"}
Properties
Min length1

Bucket name

Rendered bucket identifier; must be unique within the NATS account.

Min length1

URL to connect to NATS server

The format is (nats://)server_url: port. You can also provide a connection token like so: nats://token@server_url: port

Bucket size limit

Optional maximum bucket size in bytes; leave unset to use the server default.

Credentials files authentification

Bucket description

Optional human-readable description stored with the bucket.

Default1

Max history per key

Maximum revisions retained for each key; defaults to 1 to keep only the latest value.

Bucket metadata

Optional string map persisted as NATS Key/Value metadata.

Plaintext authentication password

Reference (ref) of the pluginDefaults to apply to this task.

Token authentification

Plaintext authentication username

Value size limit

Optional maximum size in bytes for any single entry in the bucket.

Bucket name

Name of the created bucket.

Default0

Bucket size limit

Maximum bucket size in bytes if configured, otherwise zero.

Bucket description

Description stored alongside the bucket.

Default0

Total entries

Number of entries including historical revisions.

Default0

Max history per key

Configured revision cap per key.

SubTypestring

Bucket metadata

Metadata map returned by NATS.

Default0

Value size limit

Maximum entry size in bytes if configured, otherwise zero.