From 48e9c9878df77c791b15223cfbfe76ed5c26e5d3 Mon Sep 17 00:00:00 2001 From: Onno Vos Date: Fri, 20 Sep 2024 12:21:29 +0200 Subject: [PATCH] Add spec --- src/aws_rds_iam_token.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/aws_rds_iam_token.erl b/src/aws_rds_iam_token.erl index d1a0b171..07df30c9 100644 --- a/src/aws_rds_iam_token.erl +++ b/src/aws_rds_iam_token.erl @@ -7,7 +7,11 @@ %%==================================================================== %% API %%==================================================================== -create(Client, DBEndpoint, DBPort, DBUser) -> +-spec create(aws_client:client(), binary(), non_neg_integer(), binary()) -> {ok, binary()}. +create(Client, DBEndpoint, DBPort, DBUser) when is_map(Client) andalso + is_binary(DBEndpoint) andalso + is_integer(DBPort) andalso + is_binary(DBUser) -> Method = <<"GET">>, QueryParams = [{<<"Action">>, <<"connect">>}, {<<"DBUser">>, DBUser}], Endpoint = <<"https://", DBEndpoint/binary, ":", (integer_to_binary(DBPort))/binary>>,