Skip to content

Kinesis  >  Operations  >  decrease_stream_retention_period

decrease_stream_retention_period

Operation

decrease_stream_retention_period async

decrease_stream_retention_period(input: DecreaseStreamRetentionPeriodInput, plugins: list[Plugin] | None = None) -> DecreaseStreamRetentionPeriodOutput

Decreases the Kinesis data stream's retention period, which is the length of time data records are accessible after they are added to the stream. The minimum value of a stream's retention period is 24 hours.

Note

When invoking this API, you must use either the StreamARN or the StreamName parameter, or both. It is recommended that you use the StreamARN input parameter when you invoke this API.

This operation may result in lost data. For example, if the stream's retention period is 48 hours and is decreased to 24 hours, any data already in the stream that is older than 24 hours is inaccessible.

Parameters:

Name Type Description Default
input DecreaseStreamRetentionPeriodInput

An instance of DecreaseStreamRetentionPeriodInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
DecreaseStreamRetentionPeriodOutput

An instance of DecreaseStreamRetentionPeriodOutput.

Input

DecreaseStreamRetentionPeriodInput dataclass

Bases: _SerdeShape

Represents the input for DecreaseStreamRetentionPeriod.

Attributes

retention_period_hours class-attribute instance-attribute
retention_period_hours: int | None = ...

The new retention period of the stream, in hours. Must be less than the current retention period.

stream_arn class-attribute instance-attribute
stream_arn: str | None = ...

The ARN of the stream.

stream_id class-attribute instance-attribute
stream_id: str | None = ...

Not Implemented. Reserved for future use.

stream_name class-attribute instance-attribute
stream_name: str | None = ...

The name of the stream to modify.

Output

DecreaseStreamRetentionPeriodOutput dataclass

Bases: _SerdeShape

Dataclass for DecreaseStreamRetentionPeriodOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.