%% WARNING: DO NOT EDIT, AUTO-GENERATED CODE! %% See https://github.com/aws-beam/aws-codegen for more details. %% @doc Amazon Macie is a fully managed data security and data privacy %% service that uses machine learning and pattern matching to help you %% discover and protect your sensitive data in AWS. %% %% Macie automates the discovery of sensitive data, such as PII and %% intellectual property, to provide you with insight into the data that your %% organization stores in AWS. Macie also provides an inventory of your %% Amazon S3 buckets, which it continually monitors for you. If Macie detects %% sensitive data or potential data access issues, it generates detailed %% findings for you to review and act upon as necessary. -module(aws_macie2). -export([accept_invitation/2, accept_invitation/3, batch_get_custom_data_identifiers/2, batch_get_custom_data_identifiers/3, create_allow_list/2, create_allow_list/3, create_classification_job/2, create_classification_job/3, create_custom_data_identifier/2, create_custom_data_identifier/3, create_findings_filter/2, create_findings_filter/3, create_invitations/2, create_invitations/3, create_member/2, create_member/3, create_sample_findings/2, create_sample_findings/3, decline_invitations/2, decline_invitations/3, delete_allow_list/3, delete_allow_list/4, delete_custom_data_identifier/3, delete_custom_data_identifier/4, delete_findings_filter/3, delete_findings_filter/4, delete_invitations/2, delete_invitations/3, delete_member/3, delete_member/4, describe_buckets/2, describe_buckets/3, describe_classification_job/2, describe_classification_job/4, describe_classification_job/5, describe_organization_configuration/1, describe_organization_configuration/3, describe_organization_configuration/4, disable_macie/2, disable_macie/3, disable_organization_admin_account/2, disable_organization_admin_account/3, disassociate_from_administrator_account/2, disassociate_from_administrator_account/3, disassociate_from_master_account/2, disassociate_from_master_account/3, disassociate_member/3, disassociate_member/4, enable_macie/2, enable_macie/3, enable_organization_admin_account/2, enable_organization_admin_account/3, get_administrator_account/1, get_administrator_account/3, get_administrator_account/4, get_allow_list/2, get_allow_list/4, get_allow_list/5, get_automated_discovery_configuration/1, get_automated_discovery_configuration/3, get_automated_discovery_configuration/4, get_bucket_statistics/2, get_bucket_statistics/3, get_classification_export_configuration/1, get_classification_export_configuration/3, get_classification_export_configuration/4, get_classification_scope/2, get_classification_scope/4, get_classification_scope/5, get_custom_data_identifier/2, get_custom_data_identifier/4, get_custom_data_identifier/5, get_finding_statistics/2, get_finding_statistics/3, get_findings/2, get_findings/3, get_findings_filter/2, get_findings_filter/4, get_findings_filter/5, get_findings_publication_configuration/1, get_findings_publication_configuration/3, get_findings_publication_configuration/4, get_invitations_count/1, get_invitations_count/3, get_invitations_count/4, get_macie_session/1, get_macie_session/3, get_macie_session/4, get_master_account/1, get_master_account/3, get_master_account/4, get_member/2, get_member/4, get_member/5, get_resource_profile/2, get_resource_profile/4, get_resource_profile/5, get_reveal_configuration/1, get_reveal_configuration/3, get_reveal_configuration/4, get_sensitive_data_occurrences/2, get_sensitive_data_occurrences/4, get_sensitive_data_occurrences/5, get_sensitive_data_occurrences_availability/2, get_sensitive_data_occurrences_availability/4, get_sensitive_data_occurrences_availability/5, get_sensitivity_inspection_template/2, get_sensitivity_inspection_template/4, get_sensitivity_inspection_template/5, get_usage_statistics/2, get_usage_statistics/3, get_usage_totals/1, get_usage_totals/3, get_usage_totals/4, list_allow_lists/1, list_allow_lists/3, list_allow_lists/4, list_classification_jobs/2, list_classification_jobs/3, list_classification_scopes/1, list_classification_scopes/3, list_classification_scopes/4, list_custom_data_identifiers/2, list_custom_data_identifiers/3, list_findings/2, list_findings/3, list_findings_filters/1, list_findings_filters/3, list_findings_filters/4, list_invitations/1, list_invitations/3, list_invitations/4, list_managed_data_identifiers/2, list_managed_data_identifiers/3, list_members/1, list_members/3, list_members/4, list_organization_admin_accounts/1, list_organization_admin_accounts/3, list_organization_admin_accounts/4, list_resource_profile_artifacts/2, list_resource_profile_artifacts/4, list_resource_profile_artifacts/5, list_resource_profile_detections/2, list_resource_profile_detections/4, list_resource_profile_detections/5, list_sensitivity_inspection_templates/1, list_sensitivity_inspection_templates/3, list_sensitivity_inspection_templates/4, list_tags_for_resource/2, list_tags_for_resource/4, list_tags_for_resource/5, put_classification_export_configuration/2, put_classification_export_configuration/3, put_findings_publication_configuration/2, put_findings_publication_configuration/3, search_resources/2, search_resources/3, tag_resource/3, tag_resource/4, test_custom_data_identifier/2, test_custom_data_identifier/3, untag_resource/3, untag_resource/4, update_allow_list/3, update_allow_list/4, update_automated_discovery_configuration/2, update_automated_discovery_configuration/3, update_classification_job/3, update_classification_job/4, update_classification_scope/3, update_classification_scope/4, update_findings_filter/3, update_findings_filter/4, update_macie_session/2, update_macie_session/3, update_member_session/3, update_member_session/4, update_organization_configuration/2, update_organization_configuration/3, update_resource_profile/2, update_resource_profile/3, update_resource_profile_detections/2, update_resource_profile_detections/3, update_reveal_configuration/2, update_reveal_configuration/3, update_sensitivity_inspection_template/3, update_sensitivity_inspection_template/4]). -include_lib("hackney/include/hackney_lib.hrl"). %%==================================================================== %% API %%==================================================================== %% @doc Accepts an Amazon Macie membership invitation that was received from %% a specific account. accept_invitation(Client, Input) -> accept_invitation(Client, Input, []). accept_invitation(Client, Input0, Options0) -> Method = post, Path = ["/invitations/accept"], 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 Retrieves information about one or more custom data identifiers. batch_get_custom_data_identifiers(Client, Input) -> batch_get_custom_data_identifiers(Client, Input, []). batch_get_custom_data_identifiers(Client, Input0, Options0) -> Method = post, Path = ["/custom-data-identifiers/get"], 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 Creates and defines the settings for an allow list. create_allow_list(Client, Input) -> create_allow_list(Client, Input, []). create_allow_list(Client, Input0, Options0) -> Method = post, Path = ["/allow-lists"], 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 Creates and defines the settings for a classification job. create_classification_job(Client, Input) -> create_classification_job(Client, Input, []). create_classification_job(Client, Input0, Options0) -> Method = post, Path = ["/jobs"], 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 Creates and defines the criteria and other settings for a custom data %% identifier. create_custom_data_identifier(Client, Input) -> create_custom_data_identifier(Client, Input, []). create_custom_data_identifier(Client, Input0, Options0) -> Method = post, Path = ["/custom-data-identifiers"], 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 Creates and defines the criteria and other settings for a findings %% filter. create_findings_filter(Client, Input) -> create_findings_filter(Client, Input, []). create_findings_filter(Client, Input0, Options0) -> Method = post, Path = ["/findingsfilters"], 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 Sends an Amazon Macie membership invitation to one or more accounts. create_invitations(Client, Input) -> create_invitations(Client, Input, []). create_invitations(Client, Input0, Options0) -> Method = post, Path = ["/invitations"], 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 Associates an account with an Amazon Macie administrator account. create_member(Client, Input) -> create_member(Client, Input, []). create_member(Client, Input0, Options0) -> Method = post, Path = ["/members"], 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 Creates sample findings. create_sample_findings(Client, Input) -> create_sample_findings(Client, Input, []). create_sample_findings(Client, Input0, Options0) -> Method = post, Path = ["/findings/sample"], 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 Declines Amazon Macie membership invitations that were received from %% specific accounts. decline_invitations(Client, Input) -> decline_invitations(Client, Input, []). decline_invitations(Client, Input0, Options0) -> Method = post, Path = ["/invitations/decline"], 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 Deletes an allow list. delete_allow_list(Client, Id, Input) -> delete_allow_list(Client, Id, Input, []). delete_allow_list(Client, Id, Input0, Options0) -> Method = delete, Path = ["/allow-lists/", aws_util:encode_uri(Id), ""], 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 = [ {<<"ignoreJobChecks">>, <<"ignoreJobChecks">>} ], {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Soft deletes a custom data identifier. delete_custom_data_identifier(Client, Id, Input) -> delete_custom_data_identifier(Client, Id, Input, []). delete_custom_data_identifier(Client, Id, Input0, Options0) -> Method = delete, Path = ["/custom-data-identifiers/", aws_util:encode_uri(Id), ""], 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 Deletes a findings filter. delete_findings_filter(Client, Id, Input) -> delete_findings_filter(Client, Id, Input, []). delete_findings_filter(Client, Id, Input0, Options0) -> Method = delete, Path = ["/findingsfilters/", aws_util:encode_uri(Id), ""], 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 Deletes Amazon Macie membership invitations that were received from %% specific accounts. delete_invitations(Client, Input) -> delete_invitations(Client, Input, []). delete_invitations(Client, Input0, Options0) -> Method = post, Path = ["/invitations/delete"], 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 Deletes the association between an Amazon Macie administrator account %% and an account. delete_member(Client, Id, Input) -> delete_member(Client, Id, Input, []). delete_member(Client, Id, Input0, Options0) -> Method = delete, Path = ["/members/", aws_util:encode_uri(Id), ""], 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 Retrieves (queries) statistical data and other information about one %% or more S3 buckets that Amazon Macie monitors and analyzes for an account. describe_buckets(Client, Input) -> describe_buckets(Client, Input, []). describe_buckets(Client, Input0, Options0) -> Method = post, Path = ["/datasources/s3"], 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 Retrieves the status and settings for a classification job. describe_classification_job(Client, JobId) when is_map(Client) -> describe_classification_job(Client, JobId, #{}, #{}). describe_classification_job(Client, JobId, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> describe_classification_job(Client, JobId, QueryMap, HeadersMap, []). describe_classification_job(Client, JobId, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/jobs/", aws_util:encode_uri(JobId), ""], 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 the Amazon Macie configuration settings for an organization %% in Organizations. describe_organization_configuration(Client) when is_map(Client) -> describe_organization_configuration(Client, #{}, #{}). describe_organization_configuration(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> describe_organization_configuration(Client, QueryMap, HeadersMap, []). describe_organization_configuration(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/admin/configuration"], 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 Disables Amazon Macie and deletes all settings and resources for a %% Macie account. disable_macie(Client, Input) -> disable_macie(Client, Input, []). disable_macie(Client, Input0, Options0) -> Method = delete, Path = ["/macie"], 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 Disables an account as the delegated Amazon Macie administrator %% account for an organization in Organizations. disable_organization_admin_account(Client, Input) -> disable_organization_admin_account(Client, Input, []). disable_organization_admin_account(Client, Input0, Options0) -> Method = delete, Path = ["/admin"], 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 = [ {<<"adminAccountId">>, <<"adminAccountId">>} ], {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Disassociates a member account from its Amazon Macie administrator %% account. disassociate_from_administrator_account(Client, Input) -> disassociate_from_administrator_account(Client, Input, []). disassociate_from_administrator_account(Client, Input0, Options0) -> Method = post, Path = ["/administrator/disassociate"], 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 (Deprecated) Disassociates a member account from its Amazon Macie %% administrator account. %% %% This operation has been replaced by the %% DisassociateFromAdministratorAccount operation. disassociate_from_master_account(Client, Input) -> disassociate_from_master_account(Client, Input, []). disassociate_from_master_account(Client, Input0, Options0) -> Method = post, Path = ["/master/disassociate"], 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 Disassociates an Amazon Macie administrator account from a member %% account. disassociate_member(Client, Id, Input) -> disassociate_member(Client, Id, Input, []). disassociate_member(Client, Id, Input0, Options0) -> Method = post, Path = ["/members/disassociate/", aws_util:encode_uri(Id), ""], 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 Enables Amazon Macie and specifies the configuration settings for a %% Macie account. enable_macie(Client, Input) -> enable_macie(Client, Input, []). enable_macie(Client, Input0, Options0) -> Method = post, Path = ["/macie"], 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 Designates an account as the delegated Amazon Macie administrator %% account for an organization in Organizations. enable_organization_admin_account(Client, Input) -> enable_organization_admin_account(Client, Input, []). enable_organization_admin_account(Client, Input0, Options0) -> Method = post, Path = ["/admin"], 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 Retrieves information about the Amazon Macie administrator account %% for an account. get_administrator_account(Client) when is_map(Client) -> get_administrator_account(Client, #{}, #{}). get_administrator_account(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_administrator_account(Client, QueryMap, HeadersMap, []). get_administrator_account(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/administrator"], 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 the settings and status of an allow list. get_allow_list(Client, Id) when is_map(Client) -> get_allow_list(Client, Id, #{}, #{}). get_allow_list(Client, Id, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_allow_list(Client, Id, QueryMap, HeadersMap, []). get_allow_list(Client, Id, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/allow-lists/", aws_util:encode_uri(Id), ""], 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 the configuration settings and status of automated %% sensitive data discovery for an account. get_automated_discovery_configuration(Client) when is_map(Client) -> get_automated_discovery_configuration(Client, #{}, #{}). get_automated_discovery_configuration(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_automated_discovery_configuration(Client, QueryMap, HeadersMap, []). get_automated_discovery_configuration(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/automated-discovery/configuration"], 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 (queries) aggregated statistical data about all the S3 %% buckets that Amazon Macie monitors and analyzes for an account. get_bucket_statistics(Client, Input) -> get_bucket_statistics(Client, Input, []). get_bucket_statistics(Client, Input0, Options0) -> Method = post, Path = ["/datasources/s3/statistics"], 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 Retrieves the configuration settings for storing data classification %% results. get_classification_export_configuration(Client) when is_map(Client) -> get_classification_export_configuration(Client, #{}, #{}). get_classification_export_configuration(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_classification_export_configuration(Client, QueryMap, HeadersMap, []). get_classification_export_configuration(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/classification-export-configuration"], 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 the classification scope settings for an account. get_classification_scope(Client, Id) when is_map(Client) -> get_classification_scope(Client, Id, #{}, #{}). get_classification_scope(Client, Id, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_classification_scope(Client, Id, QueryMap, HeadersMap, []). get_classification_scope(Client, Id, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/classification-scopes/", aws_util:encode_uri(Id), ""], 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 the criteria and other settings for a custom data %% identifier. get_custom_data_identifier(Client, Id) when is_map(Client) -> get_custom_data_identifier(Client, Id, #{}, #{}). get_custom_data_identifier(Client, Id, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_custom_data_identifier(Client, Id, QueryMap, HeadersMap, []). get_custom_data_identifier(Client, Id, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/custom-data-identifiers/", aws_util:encode_uri(Id), ""], 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 (queries) aggregated statistical data about findings. get_finding_statistics(Client, Input) -> get_finding_statistics(Client, Input, []). get_finding_statistics(Client, Input0, Options0) -> Method = post, Path = ["/findings/statistics"], 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 Retrieves the details of one or more findings. get_findings(Client, Input) -> get_findings(Client, Input, []). get_findings(Client, Input0, Options0) -> Method = post, Path = ["/findings/describe"], 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 Retrieves the criteria and other settings for a findings filter. get_findings_filter(Client, Id) when is_map(Client) -> get_findings_filter(Client, Id, #{}, #{}). get_findings_filter(Client, Id, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_findings_filter(Client, Id, QueryMap, HeadersMap, []). get_findings_filter(Client, Id, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/findingsfilters/", aws_util:encode_uri(Id), ""], 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 the configuration settings for publishing findings to %% Security Hub. get_findings_publication_configuration(Client) when is_map(Client) -> get_findings_publication_configuration(Client, #{}, #{}). get_findings_publication_configuration(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_findings_publication_configuration(Client, QueryMap, HeadersMap, []). get_findings_publication_configuration(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/findings-publication-configuration"], 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 the count of Amazon Macie membership invitations that were %% received by an account. get_invitations_count(Client) when is_map(Client) -> get_invitations_count(Client, #{}, #{}). get_invitations_count(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_invitations_count(Client, QueryMap, HeadersMap, []). get_invitations_count(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/invitations/count"], 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 the status and configuration settings for an Amazon Macie %% account. get_macie_session(Client) when is_map(Client) -> get_macie_session(Client, #{}, #{}). get_macie_session(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_macie_session(Client, QueryMap, HeadersMap, []). get_macie_session(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/macie"], 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 (Deprecated) Retrieves information about the Amazon Macie %% administrator account for an account. %% %% This operation has been replaced by the GetAdministratorAccount operation. get_master_account(Client) when is_map(Client) -> get_master_account(Client, #{}, #{}). get_master_account(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_master_account(Client, QueryMap, HeadersMap, []). get_master_account(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/master"], 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 information about an account that's associated with an %% Amazon Macie administrator account. get_member(Client, Id) when is_map(Client) -> get_member(Client, Id, #{}, #{}). get_member(Client, Id, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_member(Client, Id, QueryMap, HeadersMap, []). get_member(Client, Id, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/members/", aws_util:encode_uri(Id), ""], 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 (queries) sensitive data discovery statistics and the %% sensitivity score for an S3 bucket. get_resource_profile(Client, ResourceArn) when is_map(Client) -> get_resource_profile(Client, ResourceArn, #{}, #{}). get_resource_profile(Client, ResourceArn, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_resource_profile(Client, ResourceArn, QueryMap, HeadersMap, []). get_resource_profile(Client, ResourceArn, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/resource-profiles"], SuccessStatusCode = 200, Options = [{send_body_as_binary, false}, {receive_body_as_binary, false} | Options0], Headers = [], Query0_ = [ {<<"resourceArn">>, ResourceArn} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). %% @doc Retrieves the status and configuration settings for retrieving %% occurrences of sensitive data reported by findings. get_reveal_configuration(Client) when is_map(Client) -> get_reveal_configuration(Client, #{}, #{}). get_reveal_configuration(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_reveal_configuration(Client, QueryMap, HeadersMap, []). get_reveal_configuration(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/reveal-configuration"], 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 occurrences of sensitive data reported by a finding. get_sensitive_data_occurrences(Client, FindingId) when is_map(Client) -> get_sensitive_data_occurrences(Client, FindingId, #{}, #{}). get_sensitive_data_occurrences(Client, FindingId, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_sensitive_data_occurrences(Client, FindingId, QueryMap, HeadersMap, []). get_sensitive_data_occurrences(Client, FindingId, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/findings/", aws_util:encode_uri(FindingId), "/reveal"], 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 Checks whether occurrences of sensitive data can be retrieved for a %% finding. get_sensitive_data_occurrences_availability(Client, FindingId) when is_map(Client) -> get_sensitive_data_occurrences_availability(Client, FindingId, #{}, #{}). get_sensitive_data_occurrences_availability(Client, FindingId, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_sensitive_data_occurrences_availability(Client, FindingId, QueryMap, HeadersMap, []). get_sensitive_data_occurrences_availability(Client, FindingId, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/findings/", aws_util:encode_uri(FindingId), "/reveal/availability"], 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 the settings for the sensitivity inspection template for an %% account. get_sensitivity_inspection_template(Client, Id) when is_map(Client) -> get_sensitivity_inspection_template(Client, Id, #{}, #{}). get_sensitivity_inspection_template(Client, Id, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_sensitivity_inspection_template(Client, Id, QueryMap, HeadersMap, []). get_sensitivity_inspection_template(Client, Id, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/templates/sensitivity-inspections/", aws_util:encode_uri(Id), ""], 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 (queries) quotas and aggregated usage data for one or more %% accounts. get_usage_statistics(Client, Input) -> get_usage_statistics(Client, Input, []). get_usage_statistics(Client, Input0, Options0) -> Method = post, Path = ["/usage/statistics"], 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 Retrieves (queries) aggregated usage data for an account. get_usage_totals(Client) when is_map(Client) -> get_usage_totals(Client, #{}, #{}). get_usage_totals(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_usage_totals(Client, QueryMap, HeadersMap, []). get_usage_totals(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/usage"], SuccessStatusCode = 200, Options = [{send_body_as_binary, false}, {receive_body_as_binary, false} | Options0], Headers = [], Query0_ = [ {<<"timeRange">>, maps:get(<<"timeRange">>, QueryMap, undefined)} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). %% @doc Retrieves a subset of information about all the allow lists for an %% account. list_allow_lists(Client) when is_map(Client) -> list_allow_lists(Client, #{}, #{}). list_allow_lists(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> list_allow_lists(Client, QueryMap, HeadersMap, []). list_allow_lists(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/allow-lists"], SuccessStatusCode = 200, Options = [{send_body_as_binary, false}, {receive_body_as_binary, false} | Options0], Headers = [], Query0_ = [ {<<"maxResults">>, maps:get(<<"maxResults">>, QueryMap, undefined)}, {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). %% @doc Retrieves a subset of information about one or more classification %% jobs. list_classification_jobs(Client, Input) -> list_classification_jobs(Client, Input, []). list_classification_jobs(Client, Input0, Options0) -> Method = post, Path = ["/jobs/list"], 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 Retrieves a subset of information about the classification scope for %% an account. list_classification_scopes(Client) when is_map(Client) -> list_classification_scopes(Client, #{}, #{}). list_classification_scopes(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> list_classification_scopes(Client, QueryMap, HeadersMap, []). list_classification_scopes(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/classification-scopes"], SuccessStatusCode = 200, Options = [{send_body_as_binary, false}, {receive_body_as_binary, false} | Options0], Headers = [], Query0_ = [ {<<"name">>, maps:get(<<"name">>, QueryMap, undefined)}, {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). %% @doc Retrieves a subset of information about all the custom data %% identifiers for an account. list_custom_data_identifiers(Client, Input) -> list_custom_data_identifiers(Client, Input, []). list_custom_data_identifiers(Client, Input0, Options0) -> Method = post, Path = ["/custom-data-identifiers/list"], 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 Retrieves a subset of information about one or more findings. list_findings(Client, Input) -> list_findings(Client, Input, []). list_findings(Client, Input0, Options0) -> Method = post, Path = ["/findings"], 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 Retrieves a subset of information about all the findings filters for %% an account. list_findings_filters(Client) when is_map(Client) -> list_findings_filters(Client, #{}, #{}). list_findings_filters(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> list_findings_filters(Client, QueryMap, HeadersMap, []). list_findings_filters(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/findingsfilters"], SuccessStatusCode = 200, Options = [{send_body_as_binary, false}, {receive_body_as_binary, false} | Options0], Headers = [], Query0_ = [ {<<"maxResults">>, maps:get(<<"maxResults">>, QueryMap, undefined)}, {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). %% @doc Retrieves information about the Amazon Macie membership invitations %% that were received by an account. list_invitations(Client) when is_map(Client) -> list_invitations(Client, #{}, #{}). list_invitations(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> list_invitations(Client, QueryMap, HeadersMap, []). list_invitations(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/invitations"], SuccessStatusCode = 200, Options = [{send_body_as_binary, false}, {receive_body_as_binary, false} | Options0], Headers = [], Query0_ = [ {<<"maxResults">>, maps:get(<<"maxResults">>, QueryMap, undefined)}, {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). %% @doc Retrieves information about all the managed data identifiers that %% Amazon Macie currently provides. list_managed_data_identifiers(Client, Input) -> list_managed_data_identifiers(Client, Input, []). list_managed_data_identifiers(Client, Input0, Options0) -> Method = post, Path = ["/managed-data-identifiers/list"], 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 Retrieves information about the accounts that are associated with an %% Amazon Macie administrator account. list_members(Client) when is_map(Client) -> list_members(Client, #{}, #{}). list_members(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> list_members(Client, QueryMap, HeadersMap, []). list_members(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/members"], SuccessStatusCode = 200, Options = [{send_body_as_binary, false}, {receive_body_as_binary, false} | Options0], Headers = [], Query0_ = [ {<<"maxResults">>, maps:get(<<"maxResults">>, QueryMap, undefined)}, {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)}, {<<"onlyAssociated">>, maps:get(<<"onlyAssociated">>, QueryMap, undefined)} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). %% @doc Retrieves information about the delegated Amazon Macie administrator %% account for an organization in Organizations. list_organization_admin_accounts(Client) when is_map(Client) -> list_organization_admin_accounts(Client, #{}, #{}). list_organization_admin_accounts(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> list_organization_admin_accounts(Client, QueryMap, HeadersMap, []). list_organization_admin_accounts(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/admin"], SuccessStatusCode = 200, Options = [{send_body_as_binary, false}, {receive_body_as_binary, false} | Options0], Headers = [], Query0_ = [ {<<"maxResults">>, maps:get(<<"maxResults">>, QueryMap, undefined)}, {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). %% @doc Retrieves information about objects that were selected from an S3 %% bucket for automated sensitive data discovery. list_resource_profile_artifacts(Client, ResourceArn) when is_map(Client) -> list_resource_profile_artifacts(Client, ResourceArn, #{}, #{}). list_resource_profile_artifacts(Client, ResourceArn, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> list_resource_profile_artifacts(Client, ResourceArn, QueryMap, HeadersMap, []). list_resource_profile_artifacts(Client, ResourceArn, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/resource-profiles/artifacts"], SuccessStatusCode = 200, Options = [{send_body_as_binary, false}, {receive_body_as_binary, false} | Options0], Headers = [], Query0_ = [ {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)}, {<<"resourceArn">>, ResourceArn} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). %% @doc Retrieves information about the types and amount of sensitive data %% that Amazon Macie found in an S3 bucket. list_resource_profile_detections(Client, ResourceArn) when is_map(Client) -> list_resource_profile_detections(Client, ResourceArn, #{}, #{}). list_resource_profile_detections(Client, ResourceArn, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> list_resource_profile_detections(Client, ResourceArn, QueryMap, HeadersMap, []). list_resource_profile_detections(Client, ResourceArn, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/resource-profiles/detections"], SuccessStatusCode = 200, Options = [{send_body_as_binary, false}, {receive_body_as_binary, false} | Options0], Headers = [], Query0_ = [ {<<"maxResults">>, maps:get(<<"maxResults">>, QueryMap, undefined)}, {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)}, {<<"resourceArn">>, ResourceArn} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). %% @doc Retrieves a subset of information about the sensitivity inspection %% template for an account. list_sensitivity_inspection_templates(Client) when is_map(Client) -> list_sensitivity_inspection_templates(Client, #{}, #{}). list_sensitivity_inspection_templates(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> list_sensitivity_inspection_templates(Client, QueryMap, HeadersMap, []). list_sensitivity_inspection_templates(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/templates/sensitivity-inspections"], SuccessStatusCode = 200, Options = [{send_body_as_binary, false}, {receive_body_as_binary, false} | Options0], Headers = [], Query0_ = [ {<<"maxResults">>, maps:get(<<"maxResults">>, QueryMap, undefined)}, {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). %% @doc Retrieves the tags (keys and values) that are associated with an %% Amazon Macie resource. 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 Creates or updates the configuration settings for storing data %% classification results. put_classification_export_configuration(Client, Input) -> put_classification_export_configuration(Client, Input, []). put_classification_export_configuration(Client, Input0, Options0) -> Method = put, Path = ["/classification-export-configuration"], 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 Updates the configuration settings for publishing findings to %% Security Hub. put_findings_publication_configuration(Client, Input) -> put_findings_publication_configuration(Client, Input, []). put_findings_publication_configuration(Client, Input0, Options0) -> Method = put, Path = ["/findings-publication-configuration"], 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 Retrieves (queries) statistical data and other information about %% Amazon Web Services resources that Amazon Macie monitors and analyzes. search_resources(Client, Input) -> search_resources(Client, Input, []). search_resources(Client, Input0, Options0) -> Method = post, Path = ["/datasources/search-resources"], 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 Adds or updates one or more tags (keys and values) that are %% associated with an Amazon Macie resource. 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 Tests a custom data identifier. test_custom_data_identifier(Client, Input) -> test_custom_data_identifier(Client, Input, []). test_custom_data_identifier(Client, Input0, Options0) -> Method = post, Path = ["/custom-data-identifiers/test"], 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 Removes one or more tags (keys and values) from an Amazon Macie %% resource. 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). %% @doc Updates the settings for an allow list. update_allow_list(Client, Id, Input) -> update_allow_list(Client, Id, Input, []). update_allow_list(Client, Id, Input0, Options0) -> Method = put, Path = ["/allow-lists/", aws_util:encode_uri(Id), ""], 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 Enables or disables automated sensitive data discovery for an %% account. update_automated_discovery_configuration(Client, Input) -> update_automated_discovery_configuration(Client, Input, []). update_automated_discovery_configuration(Client, Input0, Options0) -> Method = put, Path = ["/automated-discovery/configuration"], 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 Changes the status of a classification job. update_classification_job(Client, JobId, Input) -> update_classification_job(Client, JobId, Input, []). update_classification_job(Client, JobId, Input0, Options0) -> Method = patch, Path = ["/jobs/", aws_util:encode_uri(JobId), ""], 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 Updates the classification scope settings for an account. update_classification_scope(Client, Id, Input) -> update_classification_scope(Client, Id, Input, []). update_classification_scope(Client, Id, Input0, Options0) -> Method = patch, Path = ["/classification-scopes/", aws_util:encode_uri(Id), ""], 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 Updates the criteria and other settings for a findings filter. update_findings_filter(Client, Id, Input) -> update_findings_filter(Client, Id, Input, []). update_findings_filter(Client, Id, Input0, Options0) -> Method = patch, Path = ["/findingsfilters/", aws_util:encode_uri(Id), ""], 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 Suspends or re-enables Amazon Macie, or updates the configuration %% settings for a Macie account. update_macie_session(Client, Input) -> update_macie_session(Client, Input, []). update_macie_session(Client, Input0, Options0) -> Method = patch, Path = ["/macie"], 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 Enables an Amazon Macie administrator to suspend or re-enable Macie %% for a member account. update_member_session(Client, Id, Input) -> update_member_session(Client, Id, Input, []). update_member_session(Client, Id, Input0, Options0) -> Method = patch, Path = ["/macie/members/", aws_util:encode_uri(Id), ""], 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 Updates the Amazon Macie configuration settings for an organization %% in Organizations. update_organization_configuration(Client, Input) -> update_organization_configuration(Client, Input, []). update_organization_configuration(Client, Input0, Options0) -> Method = patch, Path = ["/admin/configuration"], 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 Updates the sensitivity score for an S3 bucket. update_resource_profile(Client, Input) -> update_resource_profile(Client, Input, []). update_resource_profile(Client, Input0, Options0) -> Method = patch, Path = ["/resource-profiles"], 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 = [ {<<"resourceArn">>, <<"resourceArn">>} ], {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Updates the sensitivity scoring settings for an S3 bucket. update_resource_profile_detections(Client, Input) -> update_resource_profile_detections(Client, Input, []). update_resource_profile_detections(Client, Input0, Options0) -> Method = patch, Path = ["/resource-profiles/detections"], 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 = [ {<<"resourceArn">>, <<"resourceArn">>} ], {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Updates the status and configuration settings for retrieving %% occurrences of sensitive data reported by findings. update_reveal_configuration(Client, Input) -> update_reveal_configuration(Client, Input, []). update_reveal_configuration(Client, Input0, Options0) -> Method = put, Path = ["/reveal-configuration"], 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 Updates the settings for the sensitivity inspection template for an %% account. update_sensitivity_inspection_template(Client, Id, Input) -> update_sensitivity_inspection_template(Client, Id, Input, []). update_sensitivity_inspection_template(Client, Id, Input0, Options0) -> Method = put, Path = ["/templates/sensitivity-inspections/", aws_util:encode_uri(Id), ""], 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). %%==================================================================== %% Internal functions %%==================================================================== -spec request(aws_client:aws_client(), atom(), iolist(), list(), list(), map() | undefined, list(), pos_integer() | undefined) -> {ok, {integer(), list()}} | {ok, Result, {integer(), list(), hackney:client()}} | {error, Error, {integer(), list(), hackney:client()}} | {error, term()} when Result :: map(), Error :: map(). request(Client, Method, Path, Query, Headers0, Input, Options, SuccessStatusCode) -> RequestFun = fun() -> do_request(Client, Method, Path, Query, Headers0, Input, Options, SuccessStatusCode) end, aws_request:request(RequestFun, Options). do_request(Client, Method, Path, Query, Headers0, Input, Options, SuccessStatusCode) -> Client1 = Client#{service => <<"macie2">>}, Host = build_host(<<"macie2">>, Client1), URL0 = build_url(Host, Path, Client1), URL = aws_request:add_query(URL0, Query), AdditionalHeaders1 = [ {<<"Host">>, Host} , {<<"Content-Type">>, <<"application/x-amz-json-1.1">>} ], Payload = case proplists:get_value(send_body_as_binary, Options) of true -> maps:get(<<"Body">>, Input, <<"">>); false -> encode_payload(Input) end, AdditionalHeaders = case proplists:get_value(append_sha256_content_hash, Options, false) of true -> add_checksum_hash_header(AdditionalHeaders1, Payload); false -> AdditionalHeaders1 end, Headers1 = aws_request:add_headers(AdditionalHeaders, Headers0), MethodBin = aws_request:method_to_binary(Method), SignedHeaders = aws_request:sign_request(Client1, MethodBin, URL, Headers1, Payload), Response = hackney:request(Method, URL, SignedHeaders, Payload, Options), DecodeBody = not proplists:get_value(receive_body_as_binary, Options), handle_response(Response, SuccessStatusCode, DecodeBody). add_checksum_hash_header(Headers, Body) -> [ {<<"X-Amz-CheckSum-SHA256">>, base64:encode(crypto:hash(sha256, Body))} | Headers ]. handle_response({ok, StatusCode, ResponseHeaders}, SuccessStatusCode, _DecodeBody) when StatusCode =:= 200; StatusCode =:= 202; StatusCode =:= 204; StatusCode =:= 206; StatusCode =:= SuccessStatusCode -> {ok, {StatusCode, ResponseHeaders}}; handle_response({ok, StatusCode, ResponseHeaders}, _, _DecodeBody) -> {error, {StatusCode, ResponseHeaders}}; handle_response({ok, StatusCode, ResponseHeaders, Client}, SuccessStatusCode, DecodeBody) when StatusCode =:= 200; StatusCode =:= 202; StatusCode =:= 204; StatusCode =:= 206; StatusCode =:= SuccessStatusCode -> case hackney:body(Client) of {ok, <<>>} when StatusCode =:= 200; StatusCode =:= SuccessStatusCode -> {ok, #{}, {StatusCode, ResponseHeaders, Client}}; {ok, Body} -> Result = case DecodeBody of true -> try jsx:decode(Body) catch Error:Reason:Stack -> erlang:raise(error, {body_decode_failed, Error, Reason, StatusCode, Body}, Stack) end; false -> #{<<"Body">> => Body} end, {ok, Result, {StatusCode, ResponseHeaders, Client}} end; handle_response({ok, StatusCode, _ResponseHeaders, _Client}, _, _DecodeBody) when StatusCode =:= 503 -> %% Retriable error if retries are enabled {error, service_unavailable}; handle_response({ok, StatusCode, ResponseHeaders, Client}, _, _DecodeBody) -> {ok, Body} = hackney:body(Client), try DecodedError = jsx:decode(Body), {error, DecodedError, {StatusCode, ResponseHeaders, Client}} catch Error:Reason:Stack -> erlang:raise(error, {body_decode_failed, Error, Reason, StatusCode, Body}, Stack) end; handle_response({error, Reason}, _, _DecodeBody) -> {error, Reason}. build_host(_EndpointPrefix, #{region := <<"local">>, endpoint := Endpoint}) -> Endpoint; build_host(_EndpointPrefix, #{region := <<"local">>}) -> <<"localhost">>; build_host(EndpointPrefix, #{region := Region, endpoint := Endpoint}) -> aws_util:binary_join([EndpointPrefix, Region, Endpoint], <<".">>). build_url(Host, Path0, Client) -> Proto = aws_client:proto(Client), Path = erlang:iolist_to_binary(Path0), Port = aws_client:port(Client), aws_util:binary_join([Proto, <<"://">>, Host, <<":">>, Port, Path], <<"">>). -spec encode_payload(undefined | map()) -> binary(). encode_payload(undefined) -> <<>>; encode_payload(Input) -> jsx:encode(Input).