- TypeScript
- Python
- Go
- Rust
Storage classes
Check available classes and the default for the basin’s location before choosing one:- TypeScript
- Go
- Rust
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Manage streams with S2 SDKs: list streams, create them, inspect configuration, and delete them.
// List streams
const streams = await basin.streams.list({ prefix: "user-" });
// Create a stream
await basin.streams.create({
stream: "user-actions",
config: {
/* optional configuration */
},
});
// Get configuration
const streamConfig = await basin.streams.getConfig({ stream: "user-actions" });
// Delete
await basin.streams.delete({ stream: "user-actions" });
# List streams
streams = await basin.list_streams(prefix="user-")
# Create a stream
await basin.create_stream(
"user-actions",
# config=StreamConfig(...) # optional
)
# Get configuration
config = await basin.get_stream_config("user-actions")
# Delete
await basin.delete_stream("user-actions")
// List streams
streams, _ := basin.Streams.List(ctx, &s2.ListStreamsArgs{Prefix: "user-"})
// Create a stream
basin.Streams.Create(ctx, s2.CreateStreamArgs{
Stream: "user-actions",
Config: &s2.StreamConfig{ /* optional */ },
})
// Get configuration
config, _ := basin.Streams.GetConfig(ctx, "user-actions")
// Delete
basin.Streams.Delete(ctx, "user-actions")
// List streams
let streams = basin
.list_streams(ListStreamsInput::new().with_prefix("user-".parse()?))
.await?;
// Create a stream
// Optionally, pass `.with_config(StreamConfig { .. })` to CreateStreamInput.
basin
.create_stream(CreateStreamInput::new("user-actions".parse()?))
.await?;
// Get configuration
let config = basin.get_stream_config("user-actions".parse()?).await?;
// Delete
basin
.delete_stream(DeleteStreamInput::new("user-actions".parse()?))
.await?;
const locations = await s2.locations.list();
const config = { storageClass: "express" };
locations, err := client.Locations.List(ctx)
if err != nil {
return err
}
config := s2.StreamConfig{StorageClass: s2.Ptr("express")}
let locations = client.list_locations().await?;
let config = StreamConfig::default().with_storage_class("express");
