Skip to content

Commit 5f4e31b

Browse files
committed
Bump aws_beam_core to include sig4va and global region support
1 parent 0d9c612 commit 5f4e31b

428 files changed

Lines changed: 2527 additions & 970 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

rebar.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{erl_opts, [nowarn_unused_type, debug_info, {d, maps_support}]}.
22
{deps, [{hackney, "1.25.0"},
33
{jsx, "3.0.0"},
4-
{aws_beam_core, "1.2.0"}
4+
{aws_beam_core, "1.2.1"}
55
]}.
66
{project_plugins, [rebar3_hex, rebar3_ex_doc, rebar3_check_app_calls]}.
77
{hex, [{doc, #{provider => ex_doc}}]}.

rebar.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{"1.2.0",
2-
[{<<"aws_beam_core">>,{pkg,<<"aws_beam_core">>,<<"1.2.0">>},0},
2+
[{<<"aws_beam_core">>,{pkg,<<"aws_beam_core">>,<<"1.2.1">>},0},
33
{<<"aws_credentials">>,{pkg,<<"aws_credentials">>,<<"1.0.3">>},1},
44
{<<"aws_signature">>,{pkg,<<"aws_signature">>,<<"0.4.2">>},1},
55
{<<"certifi">>,{pkg,<<"certifi">>,<<"2.15.0">>},1},
@@ -15,7 +15,7 @@
1515
{<<"unicode_util_compat">>,{pkg,<<"unicode_util_compat">>,<<"0.7.1">>},1}]}.
1616
[
1717
{pkg_hash,[
18-
{<<"aws_beam_core">>, <<"EA9C7289EEEE2C42F97E4208D7447DF2074084C2E000F3F2B132FF6DB626D56F">>},
18+
{<<"aws_beam_core">>, <<"AE573A3673A51713CFBBED1C2BE7A14E59207DD9E2399C50FC2CB8AC9E375B17">>},
1919
{<<"aws_credentials">>, <<"7CDAA99D0ED11C3B93A5F80E5673969F1E4379EDBB4907EB13D161CF2DE0826E">>},
2020
{<<"aws_signature">>, <<"1B35482C89FF5B91F5EAD647A2BBC0D9620877479B44800915DE92BACF9F1476">>},
2121
{<<"certifi">>, <<"0E6E882FCDAAA0A5A9F2B3DB55B1394DBA07E8D6D9BCAD08318FB604C6839712">>},
@@ -30,7 +30,7 @@
3030
{<<"ssl_verify_fun">>, <<"354C321CF377240C7B8716899E182CE4890C5938111A1296ADD3EC74CF1715DF">>},
3131
{<<"unicode_util_compat">>, <<"A48703A25C170EEDADCA83B11E88985AF08D35F37C6F664D6DCFB106A97782FC">>}]},
3232
{pkg_hash_ext,[
33-
{<<"aws_beam_core">>, <<"C61C637B9AFDCB01AE00BCB881C477F8C0BE1B27C28A5C6BB886CD029C91466D">>},
33+
{<<"aws_beam_core">>, <<"373120ACEF83ECAFAADB7E286693FB54DA5CFC0947A325C29164F931B01E8848">>},
3434
{<<"aws_credentials">>, <<"D3ACC14D953C7F00BF544FE81A3A8D9C30C073A7526EA3CC2D6220D9468FF6D3">>},
3535
{<<"aws_signature">>, <<"1DF4A2D1DFF200C7BDFA8F9F935EFC71A51273ADFC6DD39A9F2CC937E01BAA01">>},
3636
{<<"certifi">>, <<"B147ED22CE71D72EAFDAD94F055165C1C182F61A2FF49DF28BCC71D1D5B94A60">>},

src/aws_accessanalyzer.erl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3344,15 +3344,19 @@ do_request(Client, Method, Path, Query, Headers0, Input, Options, SuccessStatusC
33443344
DefaultHost = build_host(<<"access-analyzer">>, Client1),
33453345
URL0 = build_url(DefaultHost, Path, Client1),
33463346
PathBin = erlang:iolist_to_binary(Path),
3347-
{URL1, Host} = aws_util:apply_endpoint_url_override(URL0, DefaultHost, PathBin, <<"AWS_ENDPOINT_URL_ACCESSANALYZER">>),
3347+
{URL1, Host} = aws_util:apply_endpoint_url_override(URL0, DefaultHost, PathBin, <<"AWS_ENDPOINT_URL_AWS_ACCESSANALYZER">>),
33483348
URL = aws_request:add_query(URL1, Query),
33493349
AdditionalHeaders1 = [ {<<"Host">>, Host}
33503350
, {<<"Content-Type">>, <<"application/x-amz-json-1.1">>}
33513351
],
33523352
Payload =
33533353
case proplists:get_value(send_body_as_binary, Options) of
3354-
true ->
3355-
maps:get(<<"Body">>, Input, <<"">>);
3354+
true when is_list(Input) ->
3355+
proplists:get_value(<<"Body">>, Input, <<"">>);
3356+
true when Input =:= undefined ->
3357+
<<"">>;
3358+
true ->
3359+
maps:get(<<"Body">>, Input, <<"">>);
33563360
false ->
33573361
encode_payload(Input)
33583362
end,
@@ -3429,6 +3433,7 @@ build_host(_EndpointPrefix, #{region := <<"local">>}) ->
34293433
<<"localhost">>;
34303434
build_host(EndpointPrefix, #{region := Region, endpoint := Endpoint}) ->
34313435
aws_util:binary_join([EndpointPrefix, Region, Endpoint], <<".">>).
3436+
34323437
build_url(Host, Path0, Client) ->
34333438
Proto = aws_client:proto(Client),
34343439
Path = erlang:iolist_to_binary(Path0),
@@ -3440,3 +3445,4 @@ encode_payload(undefined) ->
34403445
<<>>;
34413446
encode_payload(Input) ->
34423447
jsx:encode(Input).
3448+

src/aws_account.erl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,15 +1044,19 @@ do_request(Client, Method, Path, Query, Headers0, Input, Options, SuccessStatusC
10441044
DefaultHost = build_host(<<"account">>, Client1),
10451045
URL0 = build_url(DefaultHost, Path, Client1),
10461046
PathBin = erlang:iolist_to_binary(Path),
1047-
{URL1, Host} = aws_util:apply_endpoint_url_override(URL0, DefaultHost, PathBin, <<"AWS_ENDPOINT_URL_ACCOUNT">>),
1047+
{URL1, Host} = aws_util:apply_endpoint_url_override(URL0, DefaultHost, PathBin, <<"AWS_ENDPOINT_URL_AWS_ACCOUNT">>),
10481048
URL = aws_request:add_query(URL1, Query),
10491049
AdditionalHeaders1 = [ {<<"Host">>, Host}
10501050
, {<<"Content-Type">>, <<"application/x-amz-json-1.1">>}
10511051
],
10521052
Payload =
10531053
case proplists:get_value(send_body_as_binary, Options) of
1054-
true ->
1055-
maps:get(<<"Body">>, Input, <<"">>);
1054+
true when is_list(Input) ->
1055+
proplists:get_value(<<"Body">>, Input, <<"">>);
1056+
true when Input =:= undefined ->
1057+
<<"">>;
1058+
true ->
1059+
maps:get(<<"Body">>, Input, <<"">>);
10561060
false ->
10571061
encode_payload(Input)
10581062
end,
@@ -1129,6 +1133,7 @@ build_host(_EndpointPrefix, #{region := <<"local">>}) ->
11291133
<<"localhost">>;
11301134
build_host(EndpointPrefix, #{endpoint := Endpoint}) ->
11311135
aws_util:binary_join([EndpointPrefix, Endpoint], <<".">>).
1136+
11321137
build_url(Host, Path0, Client) ->
11331138
Proto = aws_client:proto(Client),
11341139
Path = erlang:iolist_to_binary(Path0),
@@ -1140,3 +1145,4 @@ encode_payload(undefined) ->
11401145
<<>>;
11411146
encode_payload(Input) ->
11421147
jsx:encode(Input).
1148+

src/aws_acm.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ request(Client, Action, Input, Options) ->
12121212
do_request(Client, Action, Input0, Options) ->
12131213
Client1 = Client#{service => <<"acm">>},
12141214
DefaultHost = build_host(<<"acm">>, Client1),
1215-
{URL, Host} = aws_util:apply_endpoint_url_override(build_url(DefaultHost, Client1), DefaultHost, <<"/">>, <<"AWS_ENDPOINT_URL_ACM">>),
1215+
{URL, Host} = aws_util:apply_endpoint_url_override(build_url(DefaultHost, Client1), DefaultHost, <<"/">>, <<"AWS_ENDPOINT_URL_AWS_ACM">>),
12161216
Headers = [
12171217
{<<"Host">>, Host},
12181218
{<<"Content-Type">>, <<"application/x-amz-json-1.1">>},

src/aws_acm_pca.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1800,7 +1800,7 @@ request(Client, Action, Input, Options) ->
18001800
do_request(Client, Action, Input0, Options) ->
18011801
Client1 = Client#{service => <<"acm-pca">>},
18021802
DefaultHost = build_host(<<"acm-pca">>, Client1),
1803-
{URL, Host} = aws_util:apply_endpoint_url_override(build_url(DefaultHost, Client1), DefaultHost, <<"/">>, <<"AWS_ENDPOINT_URL_ACM_PCA">>),
1803+
{URL, Host} = aws_util:apply_endpoint_url_override(build_url(DefaultHost, Client1), DefaultHost, <<"/">>, <<"AWS_ENDPOINT_URL_AWS_ACM_PCA">>),
18041804
Headers = [
18051805
{<<"Host">>, Host},
18061806
{<<"Content-Type">>, <<"application/x-amz-json-1.1">>},

src/aws_aiops.erl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -847,15 +847,19 @@ do_request(Client, Method, Path, Query, Headers0, Input, Options, SuccessStatusC
847847
DefaultHost = build_host(<<"aiops">>, Client1),
848848
URL0 = build_url(DefaultHost, Path, Client1),
849849
PathBin = erlang:iolist_to_binary(Path),
850-
{URL1, Host} = aws_util:apply_endpoint_url_override(URL0, DefaultHost, PathBin, <<"AWS_ENDPOINT_URL_AIOPS">>),
850+
{URL1, Host} = aws_util:apply_endpoint_url_override(URL0, DefaultHost, PathBin, <<"AWS_ENDPOINT_URL_AWS_AIOPS">>),
851851
URL = aws_request:add_query(URL1, Query),
852852
AdditionalHeaders1 = [ {<<"Host">>, Host}
853853
, {<<"Content-Type">>, <<"application/x-amz-json-1.1">>}
854854
],
855855
Payload =
856856
case proplists:get_value(send_body_as_binary, Options) of
857-
true ->
858-
maps:get(<<"Body">>, Input, <<"">>);
857+
true when is_list(Input) ->
858+
proplists:get_value(<<"Body">>, Input, <<"">>);
859+
true when Input =:= undefined ->
860+
<<"">>;
861+
true ->
862+
maps:get(<<"Body">>, Input, <<"">>);
859863
false ->
860864
encode_payload(Input)
861865
end,
@@ -932,6 +936,7 @@ build_host(_EndpointPrefix, #{region := <<"local">>}) ->
932936
<<"localhost">>;
933937
build_host(EndpointPrefix, #{region := Region, endpoint := Endpoint}) ->
934938
aws_util:binary_join([EndpointPrefix, Region, Endpoint], <<".">>).
939+
935940
build_url(Host, Path0, Client) ->
936941
Proto = aws_client:proto(Client),
937942
Path = erlang:iolist_to_binary(Path0),
@@ -943,3 +948,4 @@ encode_payload(undefined) ->
943948
<<>>;
944949
encode_payload(Input) ->
945950
jsx:encode(Input).
951+

src/aws_amp.erl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3235,15 +3235,19 @@ do_request(Client, Method, Path, Query, Headers0, Input, Options, SuccessStatusC
32353235
DefaultHost = build_host(<<"aps">>, Client1),
32363236
URL0 = build_url(DefaultHost, Path, Client1),
32373237
PathBin = erlang:iolist_to_binary(Path),
3238-
{URL1, Host} = aws_util:apply_endpoint_url_override(URL0, DefaultHost, PathBin, <<"AWS_ENDPOINT_URL_AMP">>),
3238+
{URL1, Host} = aws_util:apply_endpoint_url_override(URL0, DefaultHost, PathBin, <<"AWS_ENDPOINT_URL_AWS_AMP">>),
32393239
URL = aws_request:add_query(URL1, Query),
32403240
AdditionalHeaders1 = [ {<<"Host">>, Host}
32413241
, {<<"Content-Type">>, <<"application/x-amz-json-1.1">>}
32423242
],
32433243
Payload =
32443244
case proplists:get_value(send_body_as_binary, Options) of
3245-
true ->
3246-
maps:get(<<"Body">>, Input, <<"">>);
3245+
true when is_list(Input) ->
3246+
proplists:get_value(<<"Body">>, Input, <<"">>);
3247+
true when Input =:= undefined ->
3248+
<<"">>;
3249+
true ->
3250+
maps:get(<<"Body">>, Input, <<"">>);
32473251
false ->
32483252
encode_payload(Input)
32493253
end,
@@ -3320,6 +3324,7 @@ build_host(_EndpointPrefix, #{region := <<"local">>}) ->
33203324
<<"localhost">>;
33213325
build_host(EndpointPrefix, #{region := Region, endpoint := Endpoint}) ->
33223326
aws_util:binary_join([EndpointPrefix, Region, Endpoint], <<".">>).
3327+
33233328
build_url(Host, Path0, Client) ->
33243329
Proto = aws_client:proto(Client),
33253330
Path = erlang:iolist_to_binary(Path0),
@@ -3331,3 +3336,4 @@ encode_payload(undefined) ->
33313336
<<>>;
33323337
encode_payload(Input) ->
33333338
jsx:encode(Input).
3339+

src/aws_amplify.erl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2676,15 +2676,19 @@ do_request(Client, Method, Path, Query, Headers0, Input, Options, SuccessStatusC
26762676
DefaultHost = build_host(<<"amplify">>, Client1),
26772677
URL0 = build_url(DefaultHost, Path, Client1),
26782678
PathBin = erlang:iolist_to_binary(Path),
2679-
{URL1, Host} = aws_util:apply_endpoint_url_override(URL0, DefaultHost, PathBin, <<"AWS_ENDPOINT_URL_AMPLIFY">>),
2679+
{URL1, Host} = aws_util:apply_endpoint_url_override(URL0, DefaultHost, PathBin, <<"AWS_ENDPOINT_URL_AWS_AMPLIFY">>),
26802680
URL = aws_request:add_query(URL1, Query),
26812681
AdditionalHeaders1 = [ {<<"Host">>, Host}
26822682
, {<<"Content-Type">>, <<"application/x-amz-json-1.1">>}
26832683
],
26842684
Payload =
26852685
case proplists:get_value(send_body_as_binary, Options) of
2686-
true ->
2687-
maps:get(<<"Body">>, Input, <<"">>);
2686+
true when is_list(Input) ->
2687+
proplists:get_value(<<"Body">>, Input, <<"">>);
2688+
true when Input =:= undefined ->
2689+
<<"">>;
2690+
true ->
2691+
maps:get(<<"Body">>, Input, <<"">>);
26882692
false ->
26892693
encode_payload(Input)
26902694
end,
@@ -2761,6 +2765,7 @@ build_host(_EndpointPrefix, #{region := <<"local">>}) ->
27612765
<<"localhost">>;
27622766
build_host(EndpointPrefix, #{region := Region, endpoint := Endpoint}) ->
27632767
aws_util:binary_join([EndpointPrefix, Region, Endpoint], <<".">>).
2768+
27642769
build_url(Host, Path0, Client) ->
27652770
Proto = aws_client:proto(Client),
27662771
Path = erlang:iolist_to_binary(Path0),
@@ -2772,3 +2777,4 @@ encode_payload(undefined) ->
27722777
<<>>;
27732778
encode_payload(Input) ->
27742779
jsx:encode(Input).
2780+

src/aws_amplifybackend.erl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,15 +2256,19 @@ do_request(Client, Method, Path, Query, Headers0, Input, Options, SuccessStatusC
22562256
DefaultHost = build_host(<<"amplifybackend">>, Client1),
22572257
URL0 = build_url(DefaultHost, Path, Client1),
22582258
PathBin = erlang:iolist_to_binary(Path),
2259-
{URL1, Host} = aws_util:apply_endpoint_url_override(URL0, DefaultHost, PathBin, <<"AWS_ENDPOINT_URL_AMPLIFYBACKEND">>),
2259+
{URL1, Host} = aws_util:apply_endpoint_url_override(URL0, DefaultHost, PathBin, <<"AWS_ENDPOINT_URL_AWS_AMPLIFYBACKEND">>),
22602260
URL = aws_request:add_query(URL1, Query),
22612261
AdditionalHeaders1 = [ {<<"Host">>, Host}
22622262
, {<<"Content-Type">>, <<"application/x-amz-json-1.1">>}
22632263
],
22642264
Payload =
22652265
case proplists:get_value(send_body_as_binary, Options) of
2266-
true ->
2267-
maps:get(<<"Body">>, Input, <<"">>);
2266+
true when is_list(Input) ->
2267+
proplists:get_value(<<"Body">>, Input, <<"">>);
2268+
true when Input =:= undefined ->
2269+
<<"">>;
2270+
true ->
2271+
maps:get(<<"Body">>, Input, <<"">>);
22682272
false ->
22692273
encode_payload(Input)
22702274
end,
@@ -2341,6 +2345,7 @@ build_host(_EndpointPrefix, #{region := <<"local">>}) ->
23412345
<<"localhost">>;
23422346
build_host(EndpointPrefix, #{region := Region, endpoint := Endpoint}) ->
23432347
aws_util:binary_join([EndpointPrefix, Region, Endpoint], <<".">>).
2348+
23442349
build_url(Host, Path0, Client) ->
23452350
Proto = aws_client:proto(Client),
23462351
Path = erlang:iolist_to_binary(Path0),
@@ -2352,3 +2357,4 @@ encode_payload(undefined) ->
23522357
<<>>;
23532358
encode_payload(Input) ->
23542359
jsx:encode(Input).
2360+

0 commit comments

Comments
 (0)