Skip to main content
PATCH
/
basins
/
{basin}
Reconfigure Basin
curl --request PATCH \
  --url https://api.example.com/basins/{basin} \
  --header 'Content-Type: application/json' \
  --data '
{
  "default_stream_config": {
    "storage_class": "<string>",
    "retention_policy": {},
    "timestamping": {
      "mode": "<string>",
      "uncapped": true
    },
    "delete_on_empty": {
      "min_age_secs": 123
    }
  },
  "create_stream_on_append": true,
  "create_stream_on_read": true
}
'
{
  "default_stream_config": {},
  "create_stream_on_append": true,
  "create_stream_on_read": true
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/s2-streamstore/s2/llms.txt

Use this file to discover all available pages before exploring further.

Reconfigure an existing basin. Only the specified fields will be updated.

Path Parameters

basin
string
required
Basin name.

Body Parameters

default_stream_config
object
Basin configuration to update.Set to null to clear the entire default stream configuration.
create_stream_on_append
boolean
Create a stream on append if it doesn’t exist.
create_stream_on_read
boolean
Create a stream on read if it doesn’t exist.

Response

Returns the updated basin configuration with the same structure as Get Basin Config.
default_stream_config
object
Default stream configuration.
create_stream_on_append
boolean
Create stream on append if it doesn’t exist.
create_stream_on_read
boolean
Create stream on read if it doesn’t exist.

Example

curl -X PATCH "https://aws.s2.dev/v1/basins/my-basin" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "default_stream_config": {
      "retention_policy": {"age": 2592000}
    },
    "create_stream_on_append": true
  }'

Response

{
  "default_stream_config": {
    "storage_class": "standard",
    "retention_policy": {"age": 2592000},
    "timestamping": {
      "mode": "client-prefer",
      "uncapped": false
    },
    "delete_on_empty": {
      "min_age_secs": 0
    }
  },
  "create_stream_on_append": true,
  "create_stream_on_read": false
}

Notes

  • Only specified fields are updated; unspecified fields retain their current values
  • Setting a field to null clears it and restores the default value
  • Omitting a field leaves it unchanged

Error Responses

  • 404 Not Found - Basin does not exist
  • 400 Bad Request - Invalid basin name or configuration
  • 403 Forbidden - Insufficient permissions
  • 408 Request Timeout - Request timed out

Build docs developers (and LLMs) love