Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds functionality to update a stream's retention period #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions lib/ex_aws/kinesis.ex
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,22 @@ defmodule ExAws.Kinesis do
request(:delete_stream, %{"StreamName" => stream_name})
end

@doc "
You can increase the retention period up to a maximum of 8760 hours (365 days)
or decrease the retention period down to a minimum of 24 hours
"
@type retention_period_opts ::
:increase_stream_retention_period |
:decrease_stream_retention_period
@spec update_retention_period(stream_name :: stream_name, retention_period_hours :: pos_integer, action :: retention_period_opts) :: ExAws.Operation.JSON.t
def update_retention_period(stream_name, retention_period_hours, action) do
data = %{
"StreamName" => stream_name,
"RetentionPeriodHours" => retention_period_hours
}
request(action, data)
end

## Records
######################

Expand Down