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>>,