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

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

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

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.