Cloudflare/k2
@swamp/cloudflare/k2v2026.10.01.1
01README
Cloudflare k2 infrastructure models
02Release Notes
- Added: streams
03Models
@swamp/cloudflare/k2/streamsv2026.10.01.1streams.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| http? | object | |
| retention_seconds? | number | Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive. |
| worker_binding? | string | |
| name? | string | Specifies the name of the K2 stream. |
| apiToken? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email. |
| email? | string | Cloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey. |
fn create()
Create a Streams
fn get(id: string)
Get a Streams
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Streams |
fn lookup()
Look up an existing Streams by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Streams by ID into state for management
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Streams to import |
fn update(identifier?: string)
Update Streams attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Streams by id (e.g. one discovered by list) |
fn delete(id: string)
Delete the Streams
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Streams |
fn sync(identifier?: string)
Sync Streams state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Streams by id (e.g. one discovered by list) |
Resources
state(infinite)— Streams resource state
04Stats
A
100 / 100
Downloads
13
Archive size
9.1 KB
Verified by Swamp
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
05Platforms
06Labels