
NATS CreateBucket
CertifiedCreate NATS Key/Value bucket
NATS CreateBucket
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.
type: io.kestra.plugin.nats.kv.CreateBucketExamples
Creates a new Key/Value bucket, with all required properties.
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.
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
name *Requiredstring
1Bucket name
Rendered bucket identifier; must be unique within the NATS account.
url *Requiredstring
1URL 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
bucketSize integerstring
Bucket size limit
Optional maximum bucket size in bytes; leave unset to use the server default.
creds string
Credentials files authentification
description string
Bucket description
Optional human-readable description stored with the bucket.
historyPerKey integerstring
1Max history per key
Maximum revisions retained for each key; defaults to 1 to keep only the latest value.
metadata object
Bucket metadata
Optional string map persisted as NATS Key/Value metadata.
password string
Plaintext authentication password
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
token string
Token authentification
username string
Plaintext authentication username
valueSize integerstring
Value size limit
Optional maximum size in bytes for any single entry in the bucket.
Outputs
bucket string
Bucket name
Name of the created bucket.
bucketSize integer
0Bucket size limit
Maximum bucket size in bytes if configured, otherwise zero.
description string
Bucket description
Description stored alongside the bucket.
entryCount integer
0Total entries
Number of entries including historical revisions.
history integer
0Max history per key
Configured revision cap per key.
metadata object
Bucket metadata
Metadata map returned by NATS.
valueSize integer
0Value size limit
Maximum entry size in bytes if configured, otherwise zero.