Skip to content

Commit

Permalink
Update services based on v1.47.9 of AWS Go SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Nov 11, 2023
1 parent cf8ee28 commit bfbf31b
Show file tree
Hide file tree
Showing 5 changed files with 176 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .latest-tag-aws-sdk-go
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.47.8
v1.47.9
117 changes: 95 additions & 22 deletions src/aws_controltower.erl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
%% controls to your organizational units, programmatically.
%%
%% In AWS Control Tower, the terms "control" and
%% "guardrail" are synonyms. .
%% "guardrail" are synonyms.
%%
%% To call these APIs, you'll need to know:
%%
Expand All @@ -15,6 +15,9 @@
%% </li> <li> the ARN associated with the target organizational unit (OU),
%% which we call the `targetIdentifier'.
%%
%% </li> <li> the ARN associated with a resource that you wish to tag or
%% untag.
%%
%% </li> </ul> To get the `controlIdentifier' for your AWS Control Tower
%% control:
%%
Expand All @@ -28,9 +31,9 @@
%%
%% A quick-reference list of control identifers for the AWS Control Tower
%% legacy Strongly recommended and Elective controls is given in Resource
%% identifiers for APIs and guardrails in the Controls reference guide
%% section of the AWS Control Tower User Guide. Remember that Mandatory
%% controls cannot be added or removed.
%% identifiers for APIs and controls in the Controls reference guide section
%% of the AWS Control Tower User Guide. Remember that Mandatory controls
%% cannot be added or removed.
%%
%% ARN format: `arn:aws:controltower:{REGION}::control/{CONTROL_NAME}'
%%
Expand Down Expand Up @@ -90,7 +93,14 @@
get_enabled_control/2,
get_enabled_control/3,
list_enabled_controls/2,
list_enabled_controls/3]).
list_enabled_controls/3,
list_tags_for_resource/2,
list_tags_for_resource/4,
list_tags_for_resource/5,
tag_resource/3,
tag_resource/4,
untag_resource/3,
untag_resource/4]).

-include_lib("hackney/include/hackney_lib.hrl").

Expand Down Expand Up @@ -131,7 +141,7 @@ disable_control(Client, Input0, Options0) ->
%% It starts an asynchronous operation that creates AWS resources on the
%% specified organizational unit and the accounts it contains. The resources
%% created will vary according to the control that you specify. For usage
%% examples, see the AWS Control Tower User Guide
%% examples, see the AWS Control Tower User Guide .
enable_control(Client, Input) ->
enable_control(Client, Input, []).
enable_control(Client, Input0, Options0) ->
Expand Down Expand Up @@ -159,7 +169,7 @@ enable_control(Client, Input0, Options0) ->
%%
%% Displays a message in case of error. Details for an operation are
%% available for 90 days. For usage examples, see the AWS Control Tower User
%% Guide
%% Guide .
get_control_operation(Client, Input) ->
get_control_operation(Client, Input, []).
get_control_operation(Client, Input0, Options0) ->
Expand All @@ -182,22 +192,9 @@ get_control_operation(Client, Input0, Options0) ->

request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode).

%% @doc Provides details about the enabled control.
%% @doc Retrieves details about an enabled control.
%%
%% For usage examples, see the AWS Control Tower User Guide .
%%
%% == Returned values ==
%%
%% <ul> <li> TargetRegions: Shows target AWS Regions where the enabled
%% control is available to be deployed.
%%
%% </li> <li> StatusSummary: Provides a detailed summary of the deployment
%% status.
%%
%% </li> <li> DriftSummary: Provides a detailed summary of the drifted
%% status.
%%
%% </li> </ul>
get_enabled_control(Client, Input) ->
get_enabled_control(Client, Input, []).
get_enabled_control(Client, Input0, Options0) ->
Expand All @@ -223,7 +220,7 @@ get_enabled_control(Client, Input0, Options0) ->
%% @doc Lists the controls enabled by AWS Control Tower on the specified
%% organizational unit and the accounts it contains.
%%
%% For usage examples, see the AWS Control Tower User Guide
%% For usage examples, see the AWS Control Tower User Guide .
list_enabled_controls(Client, Input) ->
list_enabled_controls(Client, Input, []).
list_enabled_controls(Client, Input0, Options0) ->
Expand All @@ -246,6 +243,82 @@ list_enabled_controls(Client, Input0, Options0) ->

request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode).

%% @doc Returns a list of tags associated with the resource.
%%
%% For usage examples, see the AWS Control Tower User Guide .
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 Applies tags to a resource.
%%
%% For usage examples, see the AWS Control Tower User Guide .
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 = 204,
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 Removes tags from a resource.
%%
%% For usage examples, see the AWS Control Tower User Guide .
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 = 204,
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).

%%====================================================================
%% Internal functions
%%====================================================================
Expand Down
59 changes: 48 additions & 11 deletions src/aws_cost_and_usage_report.erl
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
%% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
%% See https://github.com/aws-beam/aws-codegen for more details.

%% @doc The AWS Cost and Usage Report API enables you to programmatically
%% create, query, and delete AWS Cost and Usage report definitions.
%% @doc You can use the Amazon Web Services Cost and Usage Report API to
%% programmatically create, query, and delete Amazon Web Services Cost and
%% Usage Report definitions.
%%
%% AWS Cost and Usage reports track the monthly AWS costs and usage
%% associated with your AWS account. The report contains line items for each
%% unique combination of AWS product, usage type, and operation that your AWS
%% account uses. You can configure the AWS Cost and Usage report to show only
%% the data that you want, using the AWS Cost and Usage API.
%% Amazon Web Services Cost and Usage Report track the monthly Amazon Web
%% Services costs and usage associated with your Amazon Web Services account.
%% The report contains line items for each unique combination of Amazon Web
%% Services product, usage type, and operation that your Amazon Web Services
%% account uses. You can configure the Amazon Web Services Cost and Usage
%% Report to show only the data that you want, using the Amazon Web Services
%% Cost and Usage Report API.
%%
%% Service Endpoint
%%
%% The AWS Cost and Usage Report API provides the following endpoint:
%% The Amazon Web Services Cost and Usage Report API provides the following
%% endpoint:
%%
%% <ul> <li> cur.us-east-1.amazonaws.com
%%
Expand All @@ -23,10 +27,16 @@
delete_report_definition/3,
describe_report_definitions/2,
describe_report_definitions/3,
list_tags_for_resource/2,
list_tags_for_resource/3,
modify_report_definition/2,
modify_report_definition/3,
put_report_definition/2,
put_report_definition/3]).
put_report_definition/3,
tag_resource/2,
tag_resource/3,
untag_resource/2,
untag_resource/3]).

-include_lib("hackney/include/hackney_lib.hrl").

Expand All @@ -35,22 +45,33 @@
%%====================================================================

%% @doc Deletes the specified report.
%%
%% Any tags associated with the report are also deleted.
delete_report_definition(Client, Input)
when is_map(Client), is_map(Input) ->
delete_report_definition(Client, Input, []).
delete_report_definition(Client, Input, Options)
when is_map(Client), is_map(Input), is_list(Options) ->
request(Client, <<"DeleteReportDefinition">>, Input, Options).

%% @doc Lists the AWS Cost and Usage reports available to this account.
%% @doc Lists the Amazon Web Services Cost and Usage Report available to this
%% account.
describe_report_definitions(Client, Input)
when is_map(Client), is_map(Input) ->
describe_report_definitions(Client, Input, []).
describe_report_definitions(Client, Input, Options)
when is_map(Client), is_map(Input), is_list(Options) ->
request(Client, <<"DescribeReportDefinitions">>, Input, Options).

%% @doc Allows you to programatically update your report preferences.
%% @doc Lists the tags associated with the specified report definition.
list_tags_for_resource(Client, Input)
when is_map(Client), is_map(Input) ->
list_tags_for_resource(Client, Input, []).
list_tags_for_resource(Client, Input, Options)
when is_map(Client), is_map(Input), is_list(Options) ->
request(Client, <<"ListTagsForResource">>, Input, Options).

%% @doc Allows you to programmatically update your report preferences.
modify_report_definition(Client, Input)
when is_map(Client), is_map(Input) ->
modify_report_definition(Client, Input, []).
Expand All @@ -66,6 +87,22 @@ put_report_definition(Client, Input, Options)
when is_map(Client), is_map(Input), is_list(Options) ->
request(Client, <<"PutReportDefinition">>, Input, Options).

%% @doc Associates a set of tags with a report definition.
tag_resource(Client, Input)
when is_map(Client), is_map(Input) ->
tag_resource(Client, Input, []).
tag_resource(Client, Input, Options)
when is_map(Client), is_map(Input), is_list(Options) ->
request(Client, <<"TagResource">>, Input, Options).

%% @doc Disassociates a set of tags from a report definition.
untag_resource(Client, Input)
when is_map(Client), is_map(Input) ->
untag_resource(Client, Input, []).
untag_resource(Client, Input, Options)
when is_map(Client), is_map(Input), is_list(Options) ->
request(Client, <<"UntagResource">>, Input, Options).

%%====================================================================
%% Internal functions
%%====================================================================
Expand Down
49 changes: 31 additions & 18 deletions src/aws_fms.erl
Original file line number Diff line number Diff line change
Expand Up @@ -512,33 +512,46 @@ put_notification_channel(Client, Input, Options)

%% @doc Creates an Firewall Manager policy.
%%
%% Firewall Manager provides the following types of policies:
%% A Firewall Manager policy is specific to the individual policy type. If
%% you want to enforce multiple policy types across accounts, you can create
%% multiple policies. You can create more than one policy for each type.
%%
%% <ul> <li> An WAF policy (type WAFV2), which defines rule groups to run
%% first in the corresponding WAF web ACL and rule groups to run last in the
%% web ACL.
%% If you add a new account to an organization that you created with
%% Organizations, Firewall Manager automatically applies the policy to the
%% resources in that account that are within scope of the policy.
%%
%% </li> <li> An WAF Classic policy (type WAF), which defines a rule group.
%% Firewall Manager provides the following types of policies:
%%
%% </li> <li> A Shield Advanced policy, which applies Shield Advanced
%% <ul> <li> Shield Advanced policy - This policy applies Shield Advanced
%% protection to specified accounts and resources.
%%
%% </li> <li> A security group policy, which manages VPC security groups
%% across your Amazon Web Services organization.
%% </li> <li> Security Groups policy - This type of policy gives you control
%% over security groups that are in use throughout your organization in
%% Organizations and lets you enforce a baseline set of rules across your
%% organization.
%%
%% </li> <li> Network Firewall policy - This policy applies Network Firewall
%% protection to your organization's VPCs.
%%
%% </li> <li> DNS Firewall policy - This policy applies Amazon Route 53
%% Resolver DNS Firewall protections to your organization's VPCs.
%%
%% </li> <li> An Network Firewall policy, which provides firewall rules to
%% filter network traffic in specified Amazon VPCs.
%% </li> <li> Third-party firewall policy - This policy applies third-party
%% firewall protections. Third-party firewalls are available by subscription
%% through the Amazon Web Services Marketplace console at Amazon Web Services
%% Marketplace.
%%
%% </li> <li> A DNS Firewall policy, which provides Route 53 Resolver DNS
%% Firewall rules to filter DNS queries for specified VPCs.
%% <ul> <li> Palo Alto Networks Cloud NGFW policy - This policy applies Palo
%% Alto Networks Cloud Next Generation Firewall (NGFW) protections and Palo
%% Alto Networks Cloud NGFW rulestacks to your organization's VPCs.
%%
%% </li> </ul> Each policy is specific to one of the types. If you want to
%% enforce more than one policy type across accounts, create multiple
%% policies. You can create multiple policies for each type.
%% </li> <li> Fortigate CNF policy - This policy applies Fortigate Cloud
%% Native Firewall (CNF) protections. Fortigate CNF is a cloud-centered
%% solution that blocks Zero-Day threats and secures cloud infrastructures
%% with industry-leading advanced threat prevention, smart web application
%% firewalls (WAF), and API protection.
%%
%% You must be subscribed to Shield Advanced to create a Shield Advanced
%% policy. For more information about subscribing to Shield Advanced, see
%% CreateSubscription.
%% </li> </ul> </li> </ul>
put_policy(Client, Input)
when is_map(Client), is_map(Input) ->
put_policy(Client, Input, []).
Expand Down
11 changes: 1 addition & 10 deletions src/aws_rds.erl
Original file line number Diff line number Diff line change
Expand Up @@ -890,9 +890,6 @@ create_global_cluster(Client, Input, Options)
request(Client, <<"CreateGlobalCluster">>, Input, Options).

%% @doc Creates a zero-ETL integration with Amazon Redshift.
%%
%% For more information, see Working with Amazon Aurora zero-ETL integrations
%% with Amazon Redshift in the Amazon Aurora User Guide.
create_integration(Client, Input)
when is_map(Client), is_map(Input) ->
create_integration(Client, Input, []).
Expand Down Expand Up @@ -1193,9 +1190,6 @@ delete_global_cluster(Client, Input, Options)
request(Client, <<"DeleteGlobalCluster">>, Input, Options).

%% @doc Deletes a zero-ETL integration with Amazon Redshift.
%%
%% For more information, see Deleting Amazon Aurora zero-ETL integrations
%% with Amazon Redshift in the Amazon Aurora User Guide
delete_integration(Client, Input)
when is_map(Client), is_map(Input) ->
delete_integration(Client, Input, []).
Expand Down Expand Up @@ -1679,10 +1673,7 @@ describe_global_clusters(Client, Input, Options)
when is_map(Client), is_map(Input), is_list(Options) ->
request(Client, <<"DescribeGlobalClusters">>, Input, Options).

%% @doc Describe one or more zero-ETL integration with Amazon Redshift.
%%
%% For more information, see Viewing and monitoring Amazon Aurora zero-ETL
%% integrations with Amazon Redshift in the Amazon Aurora User Guide
%% @doc Describe one or more zero-ETL integrations with Amazon Redshift.
describe_integrations(Client, Input)
when is_map(Client), is_map(Input) ->
describe_integrations(Client, Input, []).
Expand Down

0 comments on commit bfbf31b

Please sign in to comment.