Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Data Streams
  • Access management
  • Pricing policy
    • Overview
    • All methods
      • CreateStream
      • DecreaseStreamRetentionPeriod
      • DeleteStream
      • DescribeStream
      • IncreaseStreamRetentionPeriod
      • GetRecords
      • GetShardIterator
      • ListStreams
      • PutRecord
      • PutRecords
      • UpdateShardCount
    • Common errors
    • Examples
  • FAQ

In this article:

  • Request
  • Request parameters
  • Response
  • Errors
  1. Amazon Kinesis Data Streams compatible HTTP API
  2. Methods
  3. CreateStream

CreateStream

Written by
Yandex Cloud
Updated at February 10, 2023
  • Request
    • Request parameters
  • Response
  • Errors

Creates a stream.

If successful, the method initiates the creation of a stream, changes its status to CREATING, and returns HTTP code 200. Reads and writes are only allowed for a stream in the ACTIVE status. To find out the status of a stream, use the DescribeStream method.

If you try to create more streams than set in the quota for your account, the request returns LimitExceededException.

RequestRequest

The request contains data in JSON format.

{
  "StreamName": "string",
  "ShardCount": number,
  "WriteQuotaKbPerSec": number,
  "RetentionPeriodHours": number
}

Request parametersRequest parameters

Parameter Description
StreamName The name of the stream being created.

Type: String
Size: 1-128 characters.
Possible values: [a-zA-Z][a-zA-Z0-9-]+*(?<!-)$
Required: Yes
ShardCount Number of shards in a stream.

Type: Integer
Minimum value: 1.
Required: Yes
WriteQuotaKbPerSec The limit on writing data to a stream, KB/s.

Type: Integer
Possible values: 128, 512, 1024.
Required: No
RetentionPeriodHours The message retention period, hours.

Type: Integer
Possible values 4, 12, 24.
Required: No

ResponseResponse

If successful, HTTP 200 code and an empty body are returned.

ErrorsErrors

Error type Description HTTP code
InvalidArgumentException The argument is invalid. For more information, see the error message. 400
LimitExceededException The request limit is exceeded. 400
ResourceInUseException The resource is being used by another operation. 400

Errors that are common to all methods may occur.

Was the article helpful?

Previous
All methods
Next
DecreaseStreamRetentionPeriod
Yandex project
© 2025 Yandex.Cloud LLC