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
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
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. DecreaseStreamRetentionPeriod

DecreaseStreamRetentionPeriod

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

Decreases the retention period for messages in a stream.

Possible values: 4 hours, 12 hours, 24 hours.

This operation may result in data loss. For example, if the retention period is reduced from 24 to 12 hours, data that has been in the stream for more than 12 hours becomes unavailable.

RequestRequest

The request contains data in JSON format.

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

Request parametersRequest parameters

Parameter Description
RetentionPeriodHours Message retention period, hours.
Must be less than the current time.

Type: Integer
Possible values 4, 12.
Required: Yes
StreamName The name of the stream.

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

ResponseResponse

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

ErrorsErrors

Parameter 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
ResourceNotFoundException The requested resource was not found. 400

Errors that are common to all methods may occur.

Was the article helpful?

Previous
CreateStream
Next
DeleteStream
© 2025 Direct Cursus Technology L.L.C.