Skip to main content

Cloudflare/k2

@swamp/cloudflare/k2v2026.10.01.1· 6d agoMODELS
01README

Cloudflare k2 infrastructure models

02Release Notes
  • Added: streams
03Models1
@swamp/cloudflare/k2/streamsv2026.10.01.1streams.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
http?object
retention_seconds?numberSets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.
worker_binding?string
name?stringSpecifies the name of the K2 stream.
apiToken?stringCloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiKey?stringCloudflare 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?stringCloudflare 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
ArgumentTypeDescription
idstringThe 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
ArgumentTypeDescription
idstringThe ID of the Streams to import
fn update(identifier?: string)
Update Streams attributes
ArgumentTypeDescription
identifier?stringTarget a specific Streams by id (e.g. one discovered by list)
fn delete(id: string)
Delete the Streams
ArgumentTypeDescription
idstringThe ID of the Streams
fn sync(identifier?: string)
Sync Streams state from Cloudflare
ArgumentTypeDescription
identifier?stringTarget 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