diff --git a/.latest-tag-aws-sdk-go b/.latest-tag-aws-sdk-go index 6433472b..a5ec4910 100644 --- a/.latest-tag-aws-sdk-go +++ b/.latest-tag-aws-sdk-go @@ -1 +1 @@ -v1.50.26 +v1.50.27 diff --git a/src/aws_amplifyuibuilder.erl b/src/aws_amplifyuibuilder.erl index 0cf75357..b3b58d0d 100644 --- a/src/aws_amplifyuibuilder.erl +++ b/src/aws_amplifyuibuilder.erl @@ -65,6 +65,9 @@ list_forms/3, list_forms/5, list_forms/6, + list_tags_for_resource/2, + list_tags_for_resource/4, + list_tags_for_resource/5, list_themes/3, list_themes/5, list_themes/6, @@ -74,6 +77,10 @@ refresh_token/4, start_codegen_job/4, start_codegen_job/5, + tag_resource/3, + tag_resource/4, + untag_resource/3, + untag_resource/4, update_component/5, update_component/6, update_form/5, @@ -539,6 +546,29 @@ list_forms(Client, AppId, EnvironmentName, QueryMap, HeadersMap, Options0) request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). +%% @doc Returns a list of tags for a specified Amazon Resource Name (ARN). +list_tags_for_resource(Client, ResourceArn) + when is_map(Client) -> + list_tags_for_resource(Client, ResourceArn, #{}, #{}). + +list_tags_for_resource(Client, ResourceArn, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + list_tags_for_resource(Client, ResourceArn, QueryMap, HeadersMap, []). + +list_tags_for_resource(Client, ResourceArn, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/tags/", aws_util:encode_uri(ResourceArn), ""], + SuccessStatusCode = 200, + Options = [{send_body_as_binary, false}, + {receive_body_as_binary, false} + | Options0], + + Headers = [], + + Query_ = [], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + %% @doc Retrieves a list of themes for a specified Amplify app and backend %% environment. list_themes(Client, AppId, EnvironmentName) @@ -642,6 +672,53 @@ start_codegen_job(Client, AppId, EnvironmentName, Input0, Options0) -> {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Tags the resource with a tag key and value. +tag_resource(Client, ResourceArn, Input) -> + tag_resource(Client, ResourceArn, Input, []). +tag_resource(Client, ResourceArn, Input0, Options0) -> + Method = post, + Path = ["/tags/", aws_util:encode_uri(ResourceArn), ""], + SuccessStatusCode = 200, + Options = [{send_body_as_binary, false}, + {receive_body_as_binary, false}, + {append_sha256_content_hash, false} + | Options0], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Untags a resource with a specified Amazon Resource Name (ARN). +untag_resource(Client, ResourceArn, Input) -> + untag_resource(Client, ResourceArn, Input, []). +untag_resource(Client, ResourceArn, Input0, Options0) -> + Method = delete, + Path = ["/tags/", aws_util:encode_uri(ResourceArn), ""], + SuccessStatusCode = 200, + Options = [{send_body_as_binary, false}, + {receive_body_as_binary, false}, + {append_sha256_content_hash, false} + | Options0], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + QueryMapping = [ + {<<"tagKeys">>, <<"tagKeys">>} + ], + {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Updates an existing component. update_component(Client, AppId, EnvironmentName, Id, Input) -> update_component(Client, AppId, EnvironmentName, Id, Input, []).