DecreaseStreamRetentionPeriod
Written by
Updated at February 10, 2023
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.
Request
The request contains data in JSON format.
{
"RetentionPeriodHours": number,
"StreamName": "string"
}
Request 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 |
Response
If successful, an HTTP 200 code and empty body are returned.
Errors
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.