exclusive_start_shard_id_opt() = {exclusive_start_shard_id, string()}
explicit_hash_key() = binary() | undefined
get_records_limit() = 1..10000
list_shards_opts() = [exclusive_start_shard_id_opt() | max_results_opt() | next_token_opt() | stream_creation_timestamp_opt()]
max_results_opt() = {max_results, non_neg_integer()}
next_token_opt() = {next_token, string()}
ordering() = binary() | undefined
partition_key() = binary()
payload() = binary() | string()
put_records_item() = {Data::binary(), PartitionKey::binary()} | {Data::binary(), ExplicitHashKey::binary(), PartitionKey::binary()}
put_records_items() = [put_records_item()]
stream_creation_timestamp_opt() = {stream_creation_timestamp, integer()}
add_tags_to_stream(StreamName::binary(), Tags::[{binary(), binary()}, ...]) -> ok | {error, any()}
Kinesis API:
http://docs.aws.amazon.com/kinesis/latest/APIReference/API_AddTagsToStream.html
Adds or updates tags for the specified Amazon Kinesis stream.
erlcloud_kinesis:add_tags_to_stream(<<"stream_name">>, [{<<"tag_key">>, <<"tag_value">>}]). ok.add_tags_to_stream(StreamName::binary(), Tags::[{binary(), binary()}, ...], Config::aws_config()) -> ok | {error, any()}
configure(AccessKeyID::string(), SecretAccessKey::string()) -> ok
configure(AccessKeyID::string(), SecretAccessKey::string(), Host::string()) -> ok
configure(AccessKeyID::string(), SecretAccessKey::string(), Host::string(), Port::non_neg_integer()) -> ok
create_stream(StreamName::binary(), ShardCount::1..100000) -> erlcloud_kinesis_impl:json_return()
Kinesis API:
http://docs.aws.amazon.com/kinesis/latest/APIReference/API_CreateStream.html
This operation adds a new Amazon Kinesis stream to your AWS account.
erlcloud_kinesis:create_stream(<<"test">>, 2).
{ok,{incomplete,#Fun<jsx_decoder.1.688044>}}
create_stream(StreamName::binary(), ShardCount::1..100000, Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
delete_stream(StreamName::binary()) -> erlcloud_kinesis_impl:json_return()
Kinesis API:
http://docs.aws.amazon.com/kinesis/latest/APIReference/API_DeleteStream.html
This operation deletes a stream and all of its shards and data.
erlcloud_kinesis:delete_stream(<<"test">>).
{ok,{incomplete,#Fun<jsx_decoder.1.688044>}}
delete_stream(StreamName::binary(), Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
describe_stream(StreamName::binary()) -> erlcloud_kinesis_impl:json_return()
Kinesis API:
http://docs.aws.amazon.com/kinesis/latest/APIReference/API_DescribeStream.html
This operation returns the following information about the stream: the current status of the stream, the stream Amazon Resource Name (ARN), and an array of shard objects that comprise the stream.
erlcloud_kinesis:describe_stream(<<"staging">>).
{ok,[{<<"StreamDescription">>,
[{<<"HasMoreShards">>,false},
{<<"Shards">>,
[[{<<"HashKeyRange">>,
[{<<"EndingHashKey">>,
<<"170141183460469231731687303715884105727">>},
{<<"StartingHashKey">>,<<"0">>}]},
{<<"SequenceNumberRange">>,
[{<<"StartingSequenceNumber">>,
<<"495372647485535624187345081927970814089871018992"...>>}]},
{<<"ShardId">>,<<"shardId-000000000000">>}],
[{<<"HashKeyRange">>,
[{<<"EndingHashKey">>,
<<"340282366920938463463374607431768211455">>},
{<<"StartingHashKey">>,
<<"170141183460469231731687303715884105728">>}]},
{<<"SequenceNumberRange">>,
[{<<"StartingSequenceNumber">>,
<<"49537264748575863163933038815938617127259750"...>>}]},
{<<"ShardId">>,<<"shardId-000000000001">>}]]},
{<<"StreamARN">>,
<<"arn:aws:kinesis:us-east-1:821148768124:stream/staging">>},
{<<"StreamName">>,<<"staging">>},
{<<"StreamStatus">>,<<"ACTIVE">>}]}]}
describe_stream(StreamName::binary(), Config::get_records_limit() | aws_config()) -> erlcloud_kinesis_impl:json_return()
describe_stream(StreamName::binary(), Limit::get_records_limit(), Config::string() | aws_config()) -> erlcloud_kinesis_impl:json_return()
describe_stream(StreamName::binary(), Limit::get_records_limit(), ExclusiveStartShardId::string(), Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
describe_stream_summary(StreamName::binary()) -> erlcloud_kinesis_impl:json_return()
Kinesis API:
http://docs.aws.amazon.com/kinesis/latest/APIReference/API_DescribeStreamSummary.html
Provides a summarized description of the specified Kinesis data stream without the shard list.
erlcloud_kinesis:describe_stream_summary(<<"staging">>).
{ok,[{<<"StreamDescriptionSummary">>,
[{<<EncryptionType">>,<<"NONE">>},
{<<"EnhancedMonitoring">>,[[{<<"ShardLevelMetrics">>,[<<"ALL">>]}]]},
{<<"KeyId">>,<<"staging">>},
{<<"OpenShardCount">>,10},
{<<"RetentionPeriodHours">>,24},
{<<"StreamARN">>,
<<"arn:aws:kinesis:us-east-1:821148768124:stream/staging">>},
{<<"StreamName">>,<<"staging">>},
{<<"StreamStatus">>,<<"ACTIVE">>}]}]}
describe_stream_summary(StreamName::binary(), Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
disable_enhanced_monitoring(StreamName::binary()) -> erlcloud_kinesis_impl:json_return()
Kinesis API:
https://docs.aws.amazon.com/kinesis/latest/APIReference/API_DisableEnhancedMonitoring.html
Disables enhanced monitoring.
erlcloud_kinesis:disable_enhanced_monitoring(<<"staging">>, [<<"ALL">>]).
{ok,[
{<<"CurrentShardLevelMetrics">>,[{<<"ShardLevelMetrics">>,[<<"ALL">>]}]},
{<<"DesiredShardLevelMetrics">>,[]},
{<<"StreamName">>,<<"staging">>}
]}
disable_enhanced_monitoring(StreamName::binary(), Config::[binary()] | aws_config()) -> erlcloud_kinesis_impl:json_return()
disable_enhanced_monitoring(StreamName::binary(), Metrics::[binary()], Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
enable_enhanced_monitoring(StreamName::binary()) -> erlcloud_kinesis_impl:json_return()
Kinesis API:
https://docs.aws.amazon.com/kinesis/latest/APIReference/API_EnableEnhancedMonitoring.html
nables enhanced Kinesis data stream monitoring for shard-level metrics.
erlcloud_kinesis:enable_enhanced_monitoring(<<"staging">>, [<<"ALL">>]).
{ok,[
{<<"CurrentShardLevelMetrics">>,[]},
{<<"DesiredShardLevelMetrics">>,[{<<"ShardLevelMetrics">>,[<<"ALL">>]}]},
{<<"StreamName">>,<<"staging">>}
]}
enable_enhanced_monitoring(StreamName::binary(), Config::[binary()] | aws_config()) -> erlcloud_kinesis_impl:json_return()
enable_enhanced_monitoring(StreamName::binary(), Metrics::[binary()], Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
get_records(ShardIterator::binary()) -> erlcloud_kinesis_impl:json_return()
Kinesis API:
http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetRecords.html
This operation returns one or more data records from a shard. A GetRecords operation request can retrieve up to 10 MB of data.
{ok, [{_, A2}]} = erlcloud_kinesis:get_shard_terator(<<"test">>, <<"shardId-000000000000">>, <<"TRIM_HORIZON">>).
{ok,[{<<"ShardIterator">>,
<<"AAAAAAAAAAEuncwaAk+GTC2TIdmdg5w6dIuZ4Scu6vaMGPtaPUfopvw9cBm2NM3Rlj9WyI5JFJr2ahuSh3Z187AdW4Lug86E"...>>}]}
erlcloud_kinesis:get_records(A2).
{ok,[{<<"NextShardIterator">>,
<<"AAAAAAAAAAEkuCmrC+QDW1gUywyu7G8GxvRyM6GSMkcHQ9wrvCJBW87mjn9C8YEckkipaoJySwgKXMmn1BwSPjnjiUCsu6pc"...>>},
{<<"Records">>,
[[{<<"Data">>,<<"asdasd">>},
{<<"PartitionKey">>,<<"key">>},
{<<"SequenceNumber">>,
<<"49537292605574028653758531131893428543501381406818304001">>}],
[{<<"Data">>,<<"asdasd 213123123">>},
{<<"PartitionKey">>,<<"key">>},
{<<"SequenceNumber">>,
<<"49537292605574028653758541428570459745183078607853977601">>}]]}]}
get_records(ShardIterator::binary(), Config::get_records_limit() | aws_config()) -> erlcloud_kinesis_impl:json_return()
get_records(ShardIterator::binary(), Limit::get_records_limit(), Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
get_records(ShardIterator::binary(), Limit::get_records_limit(), Options::proplist(), Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
get_shard_iterator(StreamName::binary(), ShardId::binary(), ShardIteratorType::binary()) -> erlcloud_kinesis_impl:json_return()
Kinesis API:
http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html
This operation returns a shard iterator in ShardIterator. The shard iterator specifies the position in the shard from which you want to start reading data records sequentially.
erlcloud_kinesis:get_shard_iterator(<<"test">>, <<"shardId-000000000001">>, <<"TRIM_HORIZON">>).
{ok,[{<<"ShardIterator">>,
<<"AAAAAAAAAAFHJejL6/AjDShV3pIXsxYZT7Xj2G6EHxokHqT2D1stIOVYUEyprlUGWUepKqUDaR0+hB6qTlKvZa+fsBRqgHi4"...>>}]}
get_shard_iterator(StreamName::binary(), ShardId::binary(), ShardIteratorType::binary(), Config::binary() | integer() | float() | aws_config()) -> erlcloud_kinesis_impl:json_return()
get_shard_iterator(StreamName::binary(), ShardId::binary(), ShardIteratorType::binary(), Timestamp::binary() | integer() | float(), Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
list_all_tags_for_stream(StreamName::binary()) -> {ok, proplist()} | {error, any()}
Wrapper around 'list_tags_for_stream' to return {ok, <list_of_all_tags>}.
erlcloud_kinesis:list_all_tags_for_stream(<<"stream_name">>). {ok, [{<<"k1">>, <<"v1">>}, {<<"k2">>, <<"v2">>}] }.list_all_tags_for_stream(StreamName::binary(), Config::aws_config()) -> {ok, proplist()} | {error, any()}
list_shards(StreamNameOrOptions::binary() | list_shards_opts()) -> erlcloud_kinesis_impl:json_return() | {error, any()}
Kinesis API:
https://docs.aws.amazon.com/kinesis/latest/APIReference/API_ListShards.html
This operation returns the following information about the stream: an array of shard objects that comprise the stream.
erlcloud_kinesis:list_shards(<<"staging">>).
{ok, [
{<<"NextToken">>, <<"AAAAAAAAAAGK9EEG0sJqVhCUS2JsgigQ5dcpB4q9PYswrH2oK44Skbjtm+WR0xA7/hrAFFsohevH1/OyPnbzKBS1byPyCZuVcokYtQe/b1m4c0SCI7jctPT0oUTLRdwSRirKm9dp9YC/EL+kZHOvYAUnztVGsOAPEFC3ECf/bVC927bDZBbRRzy/44OHfWmrCLcbcWqehRh5D14WnL3yLsumhiHDkyuxSlkBepauvMnNLtTOlRtmQ5Q5reoujfq2gzeCSOtLcfXgBMztJqohPdgMzjTQSbwB9Am8rMpHLsDbSdMNXmITvw==">>},
{<<"Shards">>, [
[
{<<"ShardId">>, <<"shardId-000000000001">>},
{<<"HashKeyRange">>, [
{<<"EndingHashKey">>, <<"68056473384187692692674921486353642280">>},
{<<"StartingHashKey">>, <<"34028236692093846346337460743176821145">>}
]},
{<<"SequenceNumberRange">>, [
{<<"StartingSequenceNumber">>, <<"49579844037727333356165064238440708846556371693205002258">>}
]}
], [
{<<"ShardId">>, <<"shardId-000000000002">>},
{<<"HashKeyRange">>, [
{<<"EndingHashKey">>, <<"102084710076281539039012382229530463436">>},
{<<"StartingHashKey">>, <<"68056473384187692692674921486353642281">>}
]},
{<<"SequenceNumberRange">>, [
{<<"StartingSequenceNumber">>, <<"49579844037749634101363594861582244564829020124710982690">>}
]}
], [
{<<"ShardId">>, <<"shardId-000000000003">>},
{<<"HashKeyRange">>, [
{<<"EndingHashKey">>, <<"136112946768375385385349842972707284581">>},
{<<"StartingHashKey">>, <<"102084710022876281539039012382229530463437">>}
]},
{<<"SequenceNumberRange">>, [
{<<"StartingSequenceNumber">>, <<"49579844037771934846562125484723780283101668556216963122">>}
]}
]
]}
]}
list_shards(StreamName::binary() | list_shards_opts(), Config::list_shards_opts() | aws_config()) -> erlcloud_kinesis_impl:json_return()
list_shards(StreamName::binary(), Options::list_shards_opts(), Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
list_streams() -> erlcloud_kinesis_impl:json_return()
Kinesis API:
http://docs.aws.amazon.com/kinesis/latest/APIReference/API_ListStreams.html
This operation returns an array of the names of all the streams that are associated with the AWS account making the ListStreams request.
erlcloud_kinesis:list_streams().
{ok,[{<<"HasMoreStreams">>,false},
{<<"StreamNames">>,[<<"staging">>]}]}
list_streams(Config::binary() | aws_config()) -> erlcloud_kinesis_impl:json_return()
list_streams(ExclusiveStartStreamName::binary(), Config::1..100 | aws_config()) -> erlcloud_kinesis_impl:json_return()
list_streams(ExclusiveStartStreamName::binary(), Limit::1..100, Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
list_tags_for_stream(StreamName::binary()) -> {ok, proplist()} | {error, any()}
Kinesis API:
http://docs.aws.amazon.com/kinesis/latest/APIReference/API_ListTagsForStream.html
Lists the tags for the specified Amazon Kinesis stream.
erlcloud_kinesis:list_tags_for_stream(<<"stream_name">>, <<"key2">>, 2). {ok, [ {<<"HasMoreTags">>, true}, {<<"Tags">>, [[{<<"Key">>, <<"k1">>}, {<<"Value">>, <<"v1">>}], [{<<"Key">>, <<"k2">>}, {<<"Value">>, <<"v2">>}]]} ] }.list_tags_for_stream(StreamName::binary(), Config::aws_config()) -> {ok, proplist()} | {error, any()}
list_tags_for_stream(StreamName::binary(), ESK::binary() | undefined, Limit::integer() | undefined) -> {ok, proplist()} | {error, any()}
list_tags_for_stream(StreamName::binary(), ESK::binary() | undefined, Limit::integer() | undefined, Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
merge_shards(StreamName::binary(), AdjacentShardToMerge::binary(), ShardToMerge::binary()) -> erlcloud_kinesis_impl:json_return()
Kinesis API:
http://docs.aws.amazon.com/kinesis/latest/APIReference/API_MergeShards.html
This operation merges two adjacent shards in a stream and combines them into a single shard to reduce the stream's capacity to ingest and transport data. Two shards are considered adjacent if the union of the hash key ranges for the two shards form a contiguous set with no gaps.
erlcloud_kinesis:merge_shards(<<"test">>, <<"shardId-000000000001">>, <<"shardId-000000000003">>).
{ok,{incomplete,#Fun<jsx_decoder.1.688044>}}
merge_shards(StreamName::binary(), AdjacentShardToMerge::binary(), ShardToMerge::binary(), Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
new(AccessKeyID::string(), SecretAccessKey::string()) -> aws_config()
new(AccessKeyID::string(), SecretAccessKey::string(), Host::string()) -> aws_config()
put_record(StreamName::binary(), PartitionKey::partition_key(), Data::payload()) -> erlcloud_kinesis_impl:json_return()
Kinesis API:
http://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecord.html
This operation puts a data record into an Amazon Kinesis stream from a producer.
erlcloud_kinesis:put_record(<<"test">>, <<"key">>, <<"asdasd">>).
{ok,[{<<"SequenceNumber">>,
<<"49537292605574028653758531131893428543501381406818304001">>},
{<<"ShardId">>,<<"shardId-000000000000">>}]}
erlcloud_kinesis:put_record(<<"test">>, <<"key">>, <<"asdasd 213123123">>).
{ok,[{<<"SequenceNumber">>,
<<"49537292605574028653758541428570459745183078607853977601">>},
{<<"ShardId">>,<<"shardId-000000000000">>}]}
put_record(StreamName::binary(), PartitionKey::partition_key(), Data::payload(), Config::explicit_hash_key() | aws_config()) -> erlcloud_kinesis_impl:json_return()
put_record(StreamName::binary(), PartitionKey::partition_key(), Data::payload(), ExplicitHashKey::explicit_hash_key(), Config::ordering() | aws_config()) -> erlcloud_kinesis_impl:json_return()
put_record(StreamName::binary(), PartitionKey::partition_key(), Data::payload(), ExplicitHashKey::explicit_hash_key(), Ordering::ordering(), Config::proplist() | aws_config()) -> erlcloud_kinesis_impl:json_return()
put_record(StreamName::binary(), PartitionKey::partition_key(), Data::payload(), ExplicitHashKey::explicit_hash_key(), Ordering::ordering(), Options::proplist(), Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
put_records(StreamName::binary(), Items::put_records_items()) -> erlcloud_kinesis_impl:json_return()
put_records(StreamName::binary(), Items::put_records_items(), EncodingFun::function() | aws_config()) -> erlcloud_kinesis_impl:json_return()
put_records(StreamName::binary(), Items::put_records_items(), EncodingFun::function(), Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
remove_tags_from_stream(StreamName::binary(), TagKeys::[binary(), ...]) -> ok | {error, any()}
Kinesis API:
http://docs.aws.amazon.com/kinesis/latest/APIReference/API_RemoveTagsFromStream.html
Removes tags from the specified Amazon Kinesis stream.
erlcloud_kinesis:remove_tags_from_stream(<<"stream_name">>, [<<"tag_key">>]). ok.remove_tags_from_stream(StreamName::binary(), TagKeys::[binary(), ...], Config::aws_config()) -> ok | {error, any()}
split_shards(StreamName::binary(), ShardToSplit::binary(), NewStartingHashKey::binary()) -> erlcloud_kinesis_impl:json_return()
Kinesis API:
http://docs.aws.amazon.com/kinesis/latest/APIReference/API_SplitShard.html
This operation splits a shard into two new shards in the stream, to increase the stream's capacity to ingest and transport data.
erlcloud_kinesis:split_shards(<<"test">>, <<"shardId-000000000000">>, <<"10">>).
{ok,{incomplete,#Fun<jsx_decoder.1.688044>}}
split_shards(StreamName::binary(), ShardToSplit::binary(), NewStartingHashKey::binary(), Config::aws_config()) -> erlcloud_kinesis_impl:json_return()
Generated by EDoc