diff --git a/.latest-tag-aws-sdk-go b/.latest-tag-aws-sdk-go index cf7e9b26..559654f7 100644 --- a/.latest-tag-aws-sdk-go +++ b/.latest-tag-aws-sdk-go @@ -1 +1 @@ -release-2024-10-04 +release-2024-10-07 diff --git a/src/aws_deadline.erl b/src/aws_deadline.erl index dc36d60c..832f8489 100644 --- a/src/aws_deadline.erl +++ b/src/aws_deadline.erl @@ -171,6 +171,9 @@ list_job_members/4, list_job_members/6, list_job_members/7, + list_job_parameter_definitions/4, + list_job_parameter_definitions/6, + list_job_parameter_definitions/7, list_jobs/3, list_jobs/5, list_jobs/6, @@ -975,10 +978,11 @@ %% <<"maxRetriesPerTask">> => integer(), %% <<"parameters">> => map(), %% <<"priority">> := integer(), +%% <<"sourceJobId">> => string(), %% <<"storageProfileId">> => string(), %% <<"targetTaskRunStatus">> => list(any()), -%% <<"template">> := string(), -%% <<"templateType">> := list(any()) +%% <<"template">> => string(), +%% <<"templateType">> => list(any()) %% } -type create_job_request() :: #{binary() => any()}. @@ -1320,6 +1324,7 @@ %% <<"maxRetriesPerTask">> => integer(), %% <<"name">> => string(), %% <<"priority">> => integer(), +%% <<"sourceJobId">> => string(), %% <<"startedAt">> => non_neg_integer(), %% <<"targetTaskRunStatus">> => list(any()), %% <<"taskRunStatus">> => list(any()), @@ -1338,6 +1343,14 @@ -type update_farm_request() :: #{binary() => any()}. +%% Example: +%% list_job_parameter_definitions_response() :: #{ +%% <<"jobParameterDefinitions">> => list(any()()), +%% <<"nextToken">> => string() +%% } +-type list_job_parameter_definitions_response() :: #{binary() => any()}. + + %% Example: %% search_jobs_request() :: #{ %% <<"filterExpressions">> => search_grouped_filter_expressions(), @@ -2305,6 +2318,7 @@ %% <<"name">> => string(), %% <<"parameters">> => map(), %% <<"priority">> => integer(), +%% <<"sourceJobId">> => string(), %% <<"startedAt">> => non_neg_integer(), %% <<"storageProfileId">> => string(), %% <<"targetTaskRunStatus">> => list(any()), @@ -2590,6 +2604,7 @@ %% <<"name">> => string(), %% <<"priority">> => integer(), %% <<"queueId">> => string(), +%% <<"sourceJobId">> => string(), %% <<"startedAt">> => non_neg_integer(), %% <<"targetTaskRunStatus">> => list(any()), %% <<"taskRunStatus">> => list(any()), @@ -2796,6 +2811,14 @@ -type worker_session_summary() :: #{binary() => any()}. +%% Example: +%% list_job_parameter_definitions_request() :: #{ +%% <<"maxResults">> => integer(), +%% <<"nextToken">> => string() +%% } +-type list_job_parameter_definitions_request() :: #{binary() => any()}. + + %% Example: %% step_consumer() :: #{ %% <<"status">> => list(any()), @@ -3459,6 +3482,13 @@ access_denied_exception() | resource_not_found_exception(). +-type list_job_parameter_definitions_errors() :: + throttling_exception() | + internal_server_error_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + -type list_jobs_errors() :: throttling_exception() | internal_server_error_exception() | @@ -6051,6 +6081,48 @@ list_job_members(Client, FarmId, JobId, QueueId, QueryMap, HeadersMap, Options0) request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). +%% @doc Lists parameter definitions of a job. +-spec list_job_parameter_definitions(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list()) -> + {ok, list_job_parameter_definitions_response(), tuple()} | + {error, any()} | + {error, list_job_parameter_definitions_errors(), tuple()}. +list_job_parameter_definitions(Client, FarmId, JobId, QueueId) + when is_map(Client) -> + list_job_parameter_definitions(Client, FarmId, JobId, QueueId, #{}, #{}). + +-spec list_job_parameter_definitions(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), map(), map()) -> + {ok, list_job_parameter_definitions_response(), tuple()} | + {error, any()} | + {error, list_job_parameter_definitions_errors(), tuple()}. +list_job_parameter_definitions(Client, FarmId, JobId, QueueId, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + list_job_parameter_definitions(Client, FarmId, JobId, QueueId, QueryMap, HeadersMap, []). + +-spec list_job_parameter_definitions(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, list_job_parameter_definitions_response(), tuple()} | + {error, any()} | + {error, list_job_parameter_definitions_errors(), tuple()}. +list_job_parameter_definitions(Client, FarmId, JobId, QueueId, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/2023-10-12/farms/", aws_util:encode_uri(FarmId), "/queues/", aws_util:encode_uri(QueueId), "/jobs/", aws_util:encode_uri(JobId), "/parameter-definitions"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + 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 Lists jobs. -spec list_jobs(aws_client:aws_client(), binary() | list(), binary() | list()) -> {ok, list_jobs_response(), tuple()} | diff --git a/src/aws_marketplace_reporting.erl b/src/aws_marketplace_reporting.erl index 66e0a1bb..f66d0fd1 100644 --- a/src/aws_marketplace_reporting.erl +++ b/src/aws_marketplace_reporting.erl @@ -1,67 +1,83 @@ %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE! %% See https://github.com/aws-beam/aws-codegen for more details. -%% @doc The AWS Marketplace `GetBuyerDashboard' API enables you to get a -%% procurement insights dashboard -%% programmatically. +%% @doc The Amazon Web Services Marketplace `GetBuyerDashboard' API +%% enables you to get a procurement insights +%% dashboard programmatically. %% -%% The API gets the agreement and cost analysis dashboards with data for all -%% of the Amazon Web Services accounts in your Amazon Web Services -%% organization. +%% The API gets the agreement and cost analysis dashboards with +%% data for all of the Amazon Web Services accounts in your Amazon Web +%% Services Organization. %% -%% To use the API, you must complete the following prerequisites: +%% To use the Amazon Web Services Marketplace Reporting API, you must +%% complete the following prerequisites: %% %% Enable all features for your organization. For more information, see -%% Enabling all features for an organization with Amazon Web Services -%% Organizations: +%% Enabling all features for an organization with Organizations: %% https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html, -%% in the Amazon Web Services Organizations User Guide. +%% in the +%% Organizations User Guide. %% -%% Call the service as the Amazon Web Services Organizations management -%% account or an account registered as a delegated administrator for the -%% procurement insights service. -%% Users without management or delegated administrator accounts can use the -%% dashboard, but they only see data for their accounts. +%% Call the service as the Organizations management account or an account +%% registered +%% as a delegated administrator for the procurement insights service. %% -%% For more information about management accounts, see -%% Tutorial: Creating and configuring an organization: +%% For more information about management accounts, see Tutorial: +%% Creating and configuring an organization: %% https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tutorials_basic.html -%% and Managing the management account with Amazon Web Services -%% Organizations: +%% and Managing the management account with Organizations: %% https://docs.aws.amazon.com/organizations/latest/userguide/orgs-manage_accounts_management.html, -%% both in the Amazon Web Services Organizations User Guide. +%% both in the +%% Organizations User Guide. %% -%% For more information about delegated administrators, see Using delegated -%% administrators: +%% For more information about delegated administrators, see Using +%% delegated administrators: %% https://docs.aws.amazon.com/marketplace/latest/buyerguide/management-delegates.html, -%% in the AWS Marketplace Buyer Guide. +%% in the Amazon Web Services Marketplace Buyer +%% Guide. %% %% Create an IAM policy that enables the %% `aws-marketplace:GetBuyerDashboard' and %% `organizations:DescribeOrganization' permissions. In addition, %% the management account requires the %% `organizations:EnableAWSServiceAccess' and -%% `iam:CreateServiceLinkedRole' permissions to create -%% For more information about creating the policy, see -%% Policies and permissions in Amazon Web Services Identity and Access -%% Management: -%% https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html, -%% in the IAM User Guide. +%% `iam:CreateServiceLinkedRole' permissions to create. For more +%% information about creating the policy, see Policies and permissions in +%% Identity and Access Management: +%% https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html, in +%% the IAM User Guide. +%% +%% Access can be shared only by registering the desired linked account as a +%% delegated administrator. That requires +%% `organizations:RegisterDelegatedAdministrator' +%% `organizations:ListDelegatedAdministrators' and +%% `organizations:DeregisterDelegatedAdministrator' +%% permissions. %% %% Use the Amazon Web Services Marketplace console to create the %% `AWSServiceRoleForProcurementInsightsPolicy' service-linked role. -%% The role enables AWS Marketplace procurement visibility integration. The -%% management account requires an IAM policy with the +%% The role enables Amazon Web Services Marketplace procurement visibility +%% integration. The management +%% account requires an IAM policy with the %% `organizations:EnableAWSServiceAccess' and -%% `iam:CreateServiceLinkedRole' permissions -%% to create the service-linked role and enable the service access. For more -%% information, see +%% `iam:CreateServiceLinkedRole' permissions to create the +%% service-linked role and enable the service access. For more information, +%% see %% Granting access to -%% Amazon Web Services Organizations: -%% https://docs.aws.amazon.com/marketplace/latest/buyerguide/orgs-access-slr.html, -%% and -%% Service-linked role to share procurement data: -%% https://docs.aws.amazon.com/marketplace/latest/buyerguide/buyer-service-linked-role-procurement.html, +%% Organizations: +%% https://docs.aws.amazon.com/marketplace/latest/buyerguide/orgs-access-slr.html +%% and Service-linked role to share procurement data: +%% https://docs.aws.amazon.com/marketplace/latest/buyerguide/buyer-service-linked-role-procurement.html +%% in the +%% Amazon Web Services Marketplace Buyer Guide. +%% +%% After creating the service-linked role, you must enable trusted access +%% that +%% grants Amazon Web Services Marketplace permission to access data from your +%% Organizations. For more information, +%% see Granting access to +%% Organizations: +%% https://docs.aws.amazon.com/marketplace/latest/buyerguide/orgs-access-slr.html %% in the Amazon Web Services Marketplace Buyer Guide. -module(aws_marketplace_reporting). @@ -129,6 +145,11 @@ %% @doc Generates an embedding URL for an Amazon QuickSight dashboard for an %% anonymous user. %% +%% This API is available only to Amazon Web Services Organization management +%% accounts or +%% delegated administrators registered for the procurement insights +%% (`procurement-insights.marketplace.amazonaws.com') feature. +%% %% The following rules apply to a generated URL: %% %% It contains a temporary bearer token, valid for 5 minutes after it is diff --git a/src/aws_qconnect.erl b/src/aws_qconnect.erl index c897e464..c4a5a0a8 100644 --- a/src/aws_qconnect.erl +++ b/src/aws_qconnect.erl @@ -3,6 +3,14 @@ %% @doc %% +%% Amazon Q +%% actions: +%% https://docs.aws.amazon.com/connect/latest/APIReference/API_Operations_Amazon_Q_Connect.html +%% +%% Amazon Q data +%% types: +%% https://docs.aws.amazon.com/connect/latest/APIReference/API_Types_Amazon_Q_Connect.html +%% %% Powered by Amazon Bedrock: Amazon Web Services implements automated abuse %% detection: %% https://docs.aws.amazon.com/bedrock/latest/userguide/abuse-detection.html. @@ -40,7 +48,15 @@ %% Administrator Guide. -module(aws_qconnect). --export([create_assistant/2, +-export([create_a_i_agent/3, + create_a_i_agent/4, + create_a_i_agent_version/4, + create_a_i_agent_version/5, + create_a_iprompt/3, + create_a_iprompt/4, + create_a_iprompt_version/4, + create_a_iprompt_version/5, + create_assistant/2, create_assistant/3, create_assistant_association/3, create_assistant_association/4, @@ -54,6 +70,14 @@ create_quick_response/4, create_session/3, create_session/4, + delete_a_i_agent/4, + delete_a_i_agent/5, + delete_a_i_agent_version/5, + delete_a_i_agent_version/6, + delete_a_iprompt/4, + delete_a_iprompt/5, + delete_a_iprompt_version/5, + delete_a_iprompt_version/6, delete_assistant/3, delete_assistant/4, delete_assistant_association/4, @@ -68,6 +92,12 @@ delete_knowledge_base/4, delete_quick_response/4, delete_quick_response/5, + get_a_i_agent/3, + get_a_i_agent/5, + get_a_i_agent/6, + get_a_iprompt/3, + get_a_iprompt/5, + get_a_iprompt/6, get_assistant/2, get_assistant/4, get_assistant/5, @@ -98,6 +128,18 @@ get_session/3, get_session/5, get_session/6, + list_a_i_agent_versions/3, + list_a_i_agent_versions/5, + list_a_i_agent_versions/6, + list_a_i_agents/2, + list_a_i_agents/4, + list_a_i_agents/5, + list_a_iprompt_versions/3, + list_a_iprompt_versions/5, + list_a_iprompt_versions/6, + list_a_iprompts/2, + list_a_iprompts/4, + list_a_iprompts/5, list_assistant_associations/2, list_assistant_associations/4, list_assistant_associations/5, @@ -128,6 +170,8 @@ put_feedback/4, query_assistant/3, query_assistant/4, + remove_assistant_a_i_agent/3, + remove_assistant_a_i_agent/4, remove_knowledge_base_template_uri/3, remove_knowledge_base_template_uri/4, search_content/3, @@ -144,6 +188,12 @@ tag_resource/4, untag_resource/3, untag_resource/4, + update_a_i_agent/4, + update_a_i_agent/5, + update_a_iprompt/4, + update_a_iprompt/5, + update_assistant_a_i_agent/3, + update_assistant_a_i_agent/4, update_content/4, update_content/5, update_knowledge_base_template_uri/3, @@ -151,7 +201,9 @@ update_quick_response/4, update_quick_response/5, update_session/4, - update_session/5]). + update_session/5, + update_session_data/4, + update_session_data/5]). -include_lib("hackney/include/hackney_lib.hrl"). @@ -182,6 +234,10 @@ %% } -type put_feedback_request() :: #{binary() => any()}. +%% Example: +%% delete_a_i_agent_version_response() :: #{} +-type delete_a_i_agent_version_response() :: #{}. + %% Example: %% query_assistant_response() :: #{ @@ -191,6 +247,15 @@ -type query_assistant_response() :: #{binary() => any()}. +%% Example: +%% list_a_i_agents_request() :: #{ +%% <<"maxResults">> => integer(), +%% <<"nextToken">> => string(), +%% <<"origin">> => string() +%% } +-type list_a_i_agents_request() :: #{binary() => any()}. + + %% Example: %% tag_resource_request() :: #{ %% <<"tags">> := map() @@ -215,6 +280,14 @@ -type create_quick_response_response() :: #{binary() => any()}. +%% Example: +%% a_i_agent_version_summary() :: #{ +%% <<"aiAgentSummary">> => a_i_agent_summary(), +%% <<"versionNumber">> => float() +%% } +-type a_i_agent_version_summary() :: #{binary() => any()}. + + %% Example: %% get_session_response() :: #{ %% <<"session">> => session_data() @@ -222,6 +295,22 @@ -type get_session_response() :: #{binary() => any()}. +%% Example: +%% list_a_i_agent_versions_request() :: #{ +%% <<"maxResults">> => integer(), +%% <<"nextToken">> => string(), +%% <<"origin">> => string() +%% } +-type list_a_i_agent_versions_request() :: #{binary() => any()}. + + +%% Example: +%% remove_assistant_a_i_agent_request() :: #{ +%% <<"aiAgentType">> := string() +%% } +-type remove_assistant_a_i_agent_request() :: #{binary() => any()}. + + %% Example: %% data_summary() :: #{ %% <<"details">> => list(), @@ -257,6 +346,14 @@ -type get_content_association_request() :: #{}. +%% Example: +%% fixed_size_chunking_configuration() :: #{ +%% <<"maxTokens">> => [integer()], +%% <<"overlapPercentage">> => [integer()] +%% } +-type fixed_size_chunking_configuration() :: #{binary() => any()}. + + %% Example: %% highlight() :: #{ %% <<"beginOffsetInclusive">> => integer(), @@ -273,6 +370,50 @@ -type app_integrations_configuration() :: #{binary() => any()}. +%% Example: +%% create_a_i_agent_request() :: #{ +%% <<"clientToken">> => string(), +%% <<"configuration">> := list(), +%% <<"description">> => string(), +%% <<"name">> := string(), +%% <<"tags">> => map(), +%% <<"type">> := string(), +%% <<"visibilityStatus">> := string() +%% } +-type create_a_i_agent_request() :: #{binary() => any()}. + + +%% Example: +%% list_a_i_agent_versions_response() :: #{ +%% <<"aiAgentVersionSummaries">> => list(a_i_agent_version_summary()()), +%% <<"nextToken">> => string() +%% } +-type list_a_i_agent_versions_response() :: #{binary() => any()}. + + +%% Example: +%% create_a_i_agent_response() :: #{ +%% <<"aiAgent">> => a_i_agent_data() +%% } +-type create_a_i_agent_response() :: #{binary() => any()}. + + +%% Example: +%% create_a_iprompt_version_request() :: #{ +%% <<"clientToken">> => string(), +%% <<"modifiedTime">> => [non_neg_integer()] +%% } +-type create_a_iprompt_version_request() :: #{binary() => any()}. + + +%% Example: +%% get_a_i_agent_response() :: #{ +%% <<"aiAgent">> => a_i_agent_data(), +%% <<"versionNumber">> => float() +%% } +-type get_a_i_agent_response() :: #{binary() => any()}. + + %% Example: %% list_contents_response() :: #{ %% <<"contentSummaries">> := list(content_summary()()), @@ -281,6 +422,13 @@ -type list_contents_response() :: #{binary() => any()}. +%% Example: +%% query_text_input_data() :: #{ +%% <<"text">> => string() +%% } +-type query_text_input_data() :: #{binary() => any()}. + + %% Example: %% quick_response_filter_field() :: #{ %% <<"includeNoExistence">> => [boolean()], @@ -329,6 +477,14 @@ -type create_content_association_response() :: #{binary() => any()}. +%% Example: +%% a_iprompt_version_summary() :: #{ +%% <<"aiPromptSummary">> => a_iprompt_summary(), +%% <<"versionNumber">> => float() +%% } +-type a_iprompt_version_summary() :: #{binary() => any()}. + + %% Example: %% recommendation_data() :: #{ %% <<"data">> => data_summary(), @@ -352,6 +508,10 @@ %% remove_knowledge_base_template_uri_response() :: #{} -type remove_knowledge_base_template_uri_response() :: #{}. +%% Example: +%% delete_a_i_agent_version_request() :: #{} +-type delete_a_i_agent_version_request() :: #{}. + %% Example: %% delete_assistant_association_request() :: #{} -type delete_assistant_association_request() :: #{}. @@ -371,6 +531,14 @@ -type assistant_integration_configuration() :: #{binary() => any()}. +%% Example: +%% intent_detected_data_details() :: #{ +%% <<"intent">> => string(), +%% <<"intentId">> => string() +%% } +-type intent_detected_data_details() :: #{binary() => any()}. + + %% Example: %% text_data() :: #{ %% <<"excerpt">> => document_text(), @@ -390,6 +558,14 @@ -type create_content_response() :: #{binary() => any()}. +%% Example: +%% list_a_iprompts_response() :: #{ +%% <<"aiPromptSummaries">> => list(a_iprompt_summary()()), +%% <<"nextToken">> => string() +%% } +-type list_a_iprompts_response() :: #{binary() => any()}. + + %% Example: %% get_assistant_response() :: #{ %% <<"assistant">> => assistant_data() @@ -412,6 +588,25 @@ -type request_timeout_exception() :: #{binary() => any()}. +%% Example: +%% list_a_iprompts_request() :: #{ +%% <<"maxResults">> => integer(), +%% <<"nextToken">> => string(), +%% <<"origin">> => string() +%% } +-type list_a_iprompts_request() :: #{binary() => any()}. + + +%% Example: +%% update_a_iprompt_request() :: #{ +%% <<"clientToken">> => string(), +%% <<"description">> => string(), +%% <<"templateConfiguration">> => list(), +%% <<"visibilityStatus">> := string() +%% } +-type update_a_iprompt_request() :: #{binary() => any()}. + + %% Example: %% put_feedback_response() :: #{ %% <<"assistantArn">> => string(), @@ -448,6 +643,14 @@ -type untag_resource_request() :: #{binary() => any()}. +%% Example: +%% parsing_configuration() :: #{ +%% <<"bedrockFoundationModelConfiguration">> => bedrock_foundation_model_configuration_for_parsing(), +%% <<"parsingStrategy">> => string() +%% } +-type parsing_configuration() :: #{binary() => any()}. + + %% Example: %% get_assistant_association_response() :: #{ %% <<"assistantAssociation">> => assistant_association_data() @@ -472,6 +675,14 @@ -type create_quick_response_request() :: #{binary() => any()}. +%% Example: +%% create_a_i_agent_version_response() :: #{ +%% <<"aiAgent">> => a_i_agent_data(), +%% <<"versionNumber">> => float() +%% } +-type create_a_i_agent_version_response() :: #{binary() => any()}. + + %% Example: %% content_association_summary() :: #{ %% <<"associationData">> => list(), @@ -493,6 +704,10 @@ %% } -type connect_configuration() :: #{binary() => any()}. +%% Example: +%% delete_a_iprompt_response() :: #{} +-type delete_a_iprompt_response() :: #{}. + %% Example: %% search_content_response() :: #{ @@ -505,6 +720,10 @@ %% get_session_request() :: #{} -type get_session_request() :: #{}. +%% Example: +%% delete_a_i_agent_request() :: #{} +-type delete_a_i_agent_request() :: #{}. + %% Example: %% assistant_capability_configuration() :: #{ @@ -513,6 +732,21 @@ -type assistant_capability_configuration() :: #{binary() => any()}. +%% Example: +%% a_i_agent_configuration_data() :: #{ +%% <<"aiAgentId">> => string() +%% } +-type a_i_agent_configuration_data() :: #{binary() => any()}. + + +%% Example: +%% list_a_i_agents_response() :: #{ +%% <<"aiAgentSummaries">> => list(a_i_agent_summary()()), +%% <<"nextToken">> => string() +%% } +-type list_a_i_agents_response() :: #{binary() => any()}. + + %% Example: %% list_quick_responses_request() :: #{ %% <<"maxResults">> => integer(), @@ -541,6 +775,15 @@ -type delete_assistant_request() :: #{}. +%% Example: +%% list_a_iprompt_versions_request() :: #{ +%% <<"maxResults">> => integer(), +%% <<"nextToken">> => string(), +%% <<"origin">> => string() +%% } +-type list_a_iprompt_versions_request() :: #{binary() => any()}. + + %% Example: %% list_content_associations_request() :: #{ %% <<"maxResults">> => integer(), @@ -549,8 +792,26 @@ -type list_content_associations_request() :: #{binary() => any()}. +%% Example: +%% association_configuration() :: #{ +%% <<"associationConfigurationData">> => list(), +%% <<"associationId">> => string(), +%% <<"associationType">> => string() +%% } +-type association_configuration() :: #{binary() => any()}. + + +%% Example: +%% hierarchical_chunking_configuration() :: #{ +%% <<"levelConfigurations">> => list(hierarchical_chunking_level_configuration()()), +%% <<"overlapTokens">> => [integer()] +%% } +-type hierarchical_chunking_configuration() :: #{binary() => any()}. + + %% Example: %% create_session_request() :: #{ +%% <<"aiAgentConfiguration">> => map(), %% <<"clientToken">> => string(), %% <<"description">> => string(), %% <<"name">> := string(), @@ -567,6 +828,36 @@ -type update_knowledge_base_template_uri_response() :: #{binary() => any()}. +%% Example: +%% a_iprompt_data() :: #{ +%% <<"aiPromptArn">> => string(), +%% <<"aiPromptId">> => string(), +%% <<"apiFormat">> => string(), +%% <<"assistantArn">> => string(), +%% <<"assistantId">> => string(), +%% <<"description">> => string(), +%% <<"modelId">> => string(), +%% <<"modifiedTime">> => [non_neg_integer()], +%% <<"name">> => string(), +%% <<"origin">> => string(), +%% <<"status">> => string(), +%% <<"tags">> => map(), +%% <<"templateConfiguration">> => list(), +%% <<"templateType">> => string(), +%% <<"type">> => string(), +%% <<"visibilityStatus">> => string() +%% } +-type a_iprompt_data() :: #{binary() => any()}. + +%% Example: +%% delete_a_iprompt_version_response() :: #{} +-type delete_a_iprompt_version_response() :: #{}. + +%% Example: +%% get_a_i_agent_request() :: #{} +-type get_a_i_agent_request() :: #{}. + + %% Example: %% create_knowledge_base_request() :: #{ %% <<"clientToken">> => string(), @@ -576,7 +867,8 @@ %% <<"renderingConfiguration">> => rendering_configuration(), %% <<"serverSideEncryptionConfiguration">> => server_side_encryption_configuration(), %% <<"sourceConfiguration">> => list(), -%% <<"tags">> => map() +%% <<"tags">> => map(), +%% <<"vectorIngestionConfiguration">> => vector_ingestion_configuration() %% } -type create_knowledge_base_request() :: #{binary() => any()}. @@ -600,11 +892,19 @@ %% <<"serverSideEncryptionConfiguration">> => server_side_encryption_configuration(), %% <<"sourceConfiguration">> => list(), %% <<"status">> => string(), -%% <<"tags">> => map() +%% <<"tags">> => map(), +%% <<"vectorIngestionConfiguration">> => vector_ingestion_configuration() %% } -type knowledge_base_summary() :: #{binary() => any()}. +%% Example: +%% create_a_iprompt_response() :: #{ +%% <<"aiPrompt">> => a_iprompt_data() +%% } +-type create_a_iprompt_response() :: #{binary() => any()}. + + %% Example: %% list_quick_responses_response() :: #{ %% <<"nextToken">> => string(), @@ -645,6 +945,10 @@ %% } -type resource_not_found_exception() :: #{binary() => any()}. +%% Example: +%% remove_assistant_a_i_agent_response() :: #{} +-type remove_assistant_a_i_agent_response() :: #{}. + %% Example: %% import_job_data() :: #{ @@ -668,6 +972,8 @@ %% Example: %% knowledge_base_data() :: #{ %% <<"description">> => string(), +%% <<"ingestionFailureReasons">> => list(string()()), +%% <<"ingestionStatus">> => string(), %% <<"knowledgeBaseArn">> => string(), %% <<"knowledgeBaseId">> => string(), %% <<"knowledgeBaseType">> => string(), @@ -677,7 +983,8 @@ %% <<"serverSideEncryptionConfiguration">> => server_side_encryption_configuration(), %% <<"sourceConfiguration">> => list(), %% <<"status">> => string(), -%% <<"tags">> => map() +%% <<"tags">> => map(), +%% <<"vectorIngestionConfiguration">> => vector_ingestion_configuration() %% } -type knowledge_base_data() :: #{binary() => any()}. @@ -719,6 +1026,13 @@ -type quick_response_contents() :: #{binary() => any()}. +%% Example: +%% seed_url() :: #{ +%% <<"url">> => string() +%% } +-type seed_url() :: #{binary() => any()}. + + %% Example: %% amazon_connect_guide_association_data() :: #{ %% <<"flowId">> => string() @@ -730,8 +1044,16 @@ -type delete_import_job_request() :: #{}. +%% Example: +%% url_configuration() :: #{ +%% <<"seedUrls">> => list(seed_url()()) +%% } +-type url_configuration() :: #{binary() => any()}. + + %% Example: %% assistant_data() :: #{ +%% <<"aiAgentConfiguration">> => map(), %% <<"assistantArn">> => string(), %% <<"assistantId">> => string(), %% <<"capabilityConfiguration">> => assistant_capability_configuration(), @@ -753,6 +1075,13 @@ -type service_quota_exceeded_exception() :: #{binary() => any()}. +%% Example: +%% web_crawler_limits() :: #{ +%% <<"rateLimit">> => [integer()] +%% } +-type web_crawler_limits() :: #{binary() => any()}. + + %% Example: %% create_assistant_response() :: #{ %% <<"assistant">> => assistant_data() @@ -818,8 +1147,28 @@ -type query_recommendation_trigger_data() :: #{binary() => any()}. +%% Example: +%% a_i_agent_summary() :: #{ +%% <<"aiAgentArn">> => string(), +%% <<"aiAgentId">> => string(), +%% <<"assistantArn">> => string(), +%% <<"assistantId">> => string(), +%% <<"configuration">> => list(), +%% <<"description">> => string(), +%% <<"modifiedTime">> => [non_neg_integer()], +%% <<"name">> => string(), +%% <<"origin">> => string(), +%% <<"status">> => string(), +%% <<"tags">> => map(), +%% <<"type">> => string(), +%% <<"visibilityStatus">> => string() +%% } +-type a_i_agent_summary() :: #{binary() => any()}. + + %% Example: %% update_session_request() :: #{ +%% <<"aiAgentConfiguration">> => map(), %% <<"description">> => string(), %% <<"tagFilter">> => list() %% } @@ -834,6 +1183,20 @@ -type search_sessions_response() :: #{binary() => any()}. +%% Example: +%% chunking_configuration() :: #{ +%% <<"chunkingStrategy">> => string(), +%% <<"fixedSizeChunkingConfiguration">> => fixed_size_chunking_configuration(), +%% <<"hierarchicalChunkingConfiguration">> => hierarchical_chunking_configuration(), +%% <<"semanticChunkingConfiguration">> => semantic_chunking_configuration() +%% } +-type chunking_configuration() :: #{binary() => any()}. + +%% Example: +%% delete_a_iprompt_version_request() :: #{} +-type delete_a_iprompt_version_request() :: #{}. + + %% Example: %% notify_recommendations_received_response() :: #{ %% <<"errors">> => list(notify_recommendations_received_error()()), @@ -884,6 +1247,13 @@ -type quick_response_data() :: #{binary() => any()}. +%% Example: +%% intent_input_data() :: #{ +%% <<"intentId">> => string() +%% } +-type intent_input_data() :: #{binary() => any()}. + + %% Example: %% knowledge_base_association_data() :: #{ %% <<"knowledgeBaseArn">> => string(), @@ -908,6 +1278,20 @@ -type query_condition_item() :: #{binary() => any()}. +%% Example: +%% update_a_i_agent_response() :: #{ +%% <<"aiAgent">> => a_i_agent_data() +%% } +-type update_a_i_agent_response() :: #{binary() => any()}. + + +%% Example: +%% parsing_prompt() :: #{ +%% <<"parsingPromptText">> => string() +%% } +-type parsing_prompt() :: #{binary() => any()}. + + %% Example: %% list_assistant_associations_request() :: #{ %% <<"maxResults">> => integer(), @@ -929,6 +1313,7 @@ %% Example: %% assistant_summary() :: #{ +%% <<"aiAgentConfiguration">> => map(), %% <<"assistantArn">> => string(), %% <<"assistantId">> => string(), %% <<"capabilityConfiguration">> => assistant_capability_configuration(), @@ -966,8 +1351,28 @@ -type filter() :: #{binary() => any()}. +%% Example: +%% a_i_agent_data() :: #{ +%% <<"aiAgentArn">> => string(), +%% <<"aiAgentId">> => string(), +%% <<"assistantArn">> => string(), +%% <<"assistantId">> => string(), +%% <<"configuration">> => list(), +%% <<"description">> => string(), +%% <<"modifiedTime">> => [non_neg_integer()], +%% <<"name">> => string(), +%% <<"origin">> => string(), +%% <<"status">> => string(), +%% <<"tags">> => map(), +%% <<"type">> => string(), +%% <<"visibilityStatus">> => string() +%% } +-type a_i_agent_data() :: #{binary() => any()}. + + %% Example: %% source_content_data_details() :: #{ +%% <<"citationSpan">> => citation_span(), %% <<"id">> => string(), %% <<"rankingData">> => ranking_data(), %% <<"textData">> => text_data(), @@ -985,6 +1390,7 @@ %% Example: %% session_data() :: #{ +%% <<"aiAgentConfiguration">> => map(), %% <<"description">> => string(), %% <<"integrationConfiguration">> => session_integration_configuration(), %% <<"name">> => string(), @@ -1005,6 +1411,26 @@ -type search_sessions_request() :: #{binary() => any()}. +%% Example: +%% semantic_chunking_configuration() :: #{ +%% <<"breakpointPercentileThreshold">> => [integer()], +%% <<"bufferSize">> => [integer()], +%% <<"maxTokens">> => [integer()] +%% } +-type semantic_chunking_configuration() :: #{binary() => any()}. + + +%% Example: +%% web_crawler_configuration() :: #{ +%% <<"crawlerLimits">> => web_crawler_limits(), +%% <<"exclusionFilters">> => list(string()()), +%% <<"inclusionFilters">> => list(string()()), +%% <<"scope">> => string(), +%% <<"urlConfiguration">> => url_configuration() +%% } +-type web_crawler_configuration() :: #{binary() => any()}. + + %% Example: %% list_import_jobs_response() :: #{ %% <<"importJobSummaries">> => list(import_job_summary()()), @@ -1012,10 +1438,39 @@ %% } -type list_import_jobs_response() :: #{binary() => any()}. + +%% Example: +%% bedrock_foundation_model_configuration_for_parsing() :: #{ +%% <<"modelArn">> => string(), +%% <<"parsingPrompt">> => parsing_prompt() +%% } +-type bedrock_foundation_model_configuration_for_parsing() :: #{binary() => any()}. + %% Example: %% delete_content_association_response() :: #{} -type delete_content_association_response() :: #{}. + +%% Example: +%% a_iprompt_summary() :: #{ +%% <<"aiPromptArn">> => string(), +%% <<"aiPromptId">> => string(), +%% <<"apiFormat">> => string(), +%% <<"assistantArn">> => string(), +%% <<"assistantId">> => string(), +%% <<"description">> => string(), +%% <<"modelId">> => string(), +%% <<"modifiedTime">> => [non_neg_integer()], +%% <<"name">> => string(), +%% <<"origin">> => string(), +%% <<"status">> => string(), +%% <<"tags">> => map(), +%% <<"templateType">> => string(), +%% <<"type">> => string(), +%% <<"visibilityStatus">> => string() +%% } +-type a_iprompt_summary() :: #{binary() => any()}. + %% Example: %% remove_knowledge_base_template_uri_request() :: #{} -type remove_knowledge_base_template_uri_request() :: #{}. @@ -1037,6 +1492,34 @@ %% } -type search_quick_responses_response() :: #{binary() => any()}. +%% Example: +%% get_a_iprompt_request() :: #{} +-type get_a_iprompt_request() :: #{}. + + +%% Example: +%% get_a_iprompt_response() :: #{ +%% <<"aiPrompt">> => a_iprompt_data(), +%% <<"versionNumber">> => float() +%% } +-type get_a_iprompt_response() :: #{binary() => any()}. + + +%% Example: +%% create_a_iprompt_request() :: #{ +%% <<"apiFormat">> := string(), +%% <<"clientToken">> => string(), +%% <<"description">> => string(), +%% <<"modelId">> := string(), +%% <<"name">> := string(), +%% <<"tags">> => map(), +%% <<"templateConfiguration">> := list(), +%% <<"templateType">> := string(), +%% <<"type">> := string(), +%% <<"visibilityStatus">> := string() +%% } +-type create_a_iprompt_request() :: #{binary() => any()}. + %% Example: %% notify_recommendations_received_error() :: #{ @@ -1053,6 +1536,14 @@ -type get_import_job_response() :: #{binary() => any()}. +%% Example: +%% manual_search_a_i_agent_configuration() :: #{ +%% <<"answerGenerationAIPromptId">> => string(), +%% <<"associationConfigurations">> => list(association_configuration()()) +%% } +-type manual_search_a_i_agent_configuration() :: #{binary() => any()}. + + %% Example: %% update_content_response() :: #{ %% <<"content">> => content_data() @@ -1115,8 +1606,10 @@ %% query_assistant_request() :: #{ %% <<"maxResults">> => integer(), %% <<"nextToken">> => string(), +%% <<"overrideKnowledgeBaseSearchType">> => string(), %% <<"queryCondition">> => list(list()()), -%% <<"queryText">> := string(), +%% <<"queryInputData">> => list(), +%% <<"queryText">> => string(), %% <<"sessionId">> => string() %% } -type query_assistant_request() :: #{binary() => any()}. @@ -1185,16 +1678,34 @@ -type list_tags_for_resource_request() :: #{}. +%% Example: +%% runtime_session_data() :: #{ +%% <<"key">> => string(), +%% <<"value">> => list() +%% } +-type runtime_session_data() :: #{binary() => any()}. + + %% Example: %% content_reference() :: #{ %% <<"contentArn">> => string(), %% <<"contentId">> => string(), %% <<"knowledgeBaseArn">> => string(), -%% <<"knowledgeBaseId">> => string() +%% <<"knowledgeBaseId">> => string(), +%% <<"referenceType">> => string(), +%% <<"sourceURL">> => [string()] %% } -type content_reference() :: #{binary() => any()}. +%% Example: +%% citation_span() :: #{ +%% <<"beginOffsetInclusive">> => integer(), +%% <<"endOffsetExclusive">> => integer() +%% } +-type citation_span() :: #{binary() => any()}. + + %% Example: %% content_data() :: #{ %% <<"contentArn">> => string(), @@ -1240,11 +1751,41 @@ %% Example: -%% get_content_response() :: #{ -%% <<"content">> => content_data() +%% update_session_data_response() :: #{ +%% <<"data">> => list(runtime_session_data()()), +%% <<"namespace">> => string(), +%% <<"sessionArn">> => string(), +%% <<"sessionId">> => string() +%% } +-type update_session_data_response() :: #{binary() => any()}. + + +%% Example: +%% knowledge_base_association_configuration_data() :: #{ +%% <<"contentTagFilter">> => list(), +%% <<"maxResults">> => integer(), +%% <<"overrideKnowledgeBaseSearchType">> => string() +%% } +-type knowledge_base_association_configuration_data() :: #{binary() => any()}. + + +%% Example: +%% hierarchical_chunking_level_configuration() :: #{ +%% <<"maxTokens">> => [integer()] +%% } +-type hierarchical_chunking_level_configuration() :: #{binary() => any()}. + + +%% Example: +%% get_content_response() :: #{ +%% <<"content">> => content_data() %% } -type get_content_response() :: #{binary() => any()}. +%% Example: +%% delete_a_iprompt_request() :: #{} +-type delete_a_iprompt_request() :: #{}. + %% Example: %% content_data_details() :: #{ @@ -1278,6 +1819,10 @@ %% } -type notify_recommendations_received_request() :: #{binary() => any()}. +%% Example: +%% delete_a_i_agent_response() :: #{} +-type delete_a_i_agent_response() :: #{}. + %% Example: %% list_knowledge_bases_response() :: #{ @@ -1313,6 +1858,16 @@ -type result_data() :: #{binary() => any()}. +%% Example: +%% update_a_i_agent_request() :: #{ +%% <<"clientToken">> => string(), +%% <<"configuration">> => list(), +%% <<"description">> => string(), +%% <<"visibilityStatus">> := string() +%% } +-type update_a_i_agent_request() :: #{binary() => any()}. + + %% Example: %% start_import_job_response() :: #{ %% <<"importJob">> => import_job_data() @@ -1359,6 +1914,13 @@ %% } -type quick_response_query_field() :: #{binary() => any()}. + +%% Example: +%% text_full_a_iprompt_edit_template_configuration() :: #{ +%% <<"text">> => string() +%% } +-type text_full_a_iprompt_edit_template_configuration() :: #{binary() => any()}. + %% Example: %% get_assistant_association_request() :: #{} -type get_assistant_association_request() :: #{}. @@ -1372,6 +1934,14 @@ -type get_knowledge_base_request() :: #{}. +%% Example: +%% list_a_iprompt_versions_response() :: #{ +%% <<"aiPromptVersionSummaries">> => list(a_iprompt_version_summary()()), +%% <<"nextToken">> => string() +%% } +-type list_a_iprompt_versions_response() :: #{binary() => any()}. + + %% Example: %% quick_response_order_field() :: #{ %% <<"name">> => string(), @@ -1387,6 +1957,14 @@ %% } -type list_assistants_response() :: #{binary() => any()}. + +%% Example: +%% update_assistant_a_i_agent_request() :: #{ +%% <<"aiAgentType">> := string(), +%% <<"configuration">> := a_i_agent_configuration_data() +%% } +-type update_assistant_a_i_agent_request() :: #{binary() => any()}. + %% Example: %% delete_quick_response_response() :: #{} -type delete_quick_response_response() :: #{}. @@ -1409,6 +1987,14 @@ -type ranking_data() :: #{binary() => any()}. +%% Example: +%% vector_ingestion_configuration() :: #{ +%% <<"chunkingConfiguration">> => chunking_configuration(), +%% <<"parsingConfiguration">> => parsing_configuration() +%% } +-type vector_ingestion_configuration() :: #{binary() => any()}. + + %% Example: %% grouping_configuration() :: #{ %% <<"criteria">> => string(), @@ -1427,6 +2013,16 @@ -type create_assistant_association_request() :: #{binary() => any()}. +%% Example: +%% answer_recommendation_a_i_agent_configuration() :: #{ +%% <<"answerGenerationAIPromptId">> => string(), +%% <<"associationConfigurations">> => list(association_configuration()()), +%% <<"intentLabelingGenerationAIPromptId">> => string(), +%% <<"queryReformulationAIPromptId">> => string() +%% } +-type answer_recommendation_a_i_agent_configuration() :: #{binary() => any()}. + + %% Example: %% create_session_response() :: #{ %% <<"session">> => session_data() @@ -1441,6 +2037,13 @@ -type precondition_failed_exception() :: #{binary() => any()}. +%% Example: +%% update_a_iprompt_response() :: #{ +%% <<"aiPrompt">> => a_iprompt_data() +%% } +-type update_a_iprompt_response() :: #{binary() => any()}. + + %% Example: %% list_content_associations_response() :: #{ %% <<"contentAssociationSummaries">> => list(content_association_summary()()), @@ -1448,6 +2051,14 @@ %% } -type list_content_associations_response() :: #{binary() => any()}. + +%% Example: +%% create_a_i_agent_version_request() :: #{ +%% <<"clientToken">> => string(), +%% <<"modifiedTime">> => [non_neg_integer()] +%% } +-type create_a_i_agent_version_request() :: #{binary() => any()}. + %% Example: %% delete_assistant_association_response() :: #{} -type delete_assistant_association_response() :: #{}. @@ -1469,6 +2080,14 @@ %% } -type list_assistants_request() :: #{binary() => any()}. + +%% Example: +%% update_session_data_request() :: #{ +%% <<"data">> := list(runtime_session_data()()), +%% <<"namespace">> => string() +%% } +-type update_session_data_request() :: #{binary() => any()}. + %% Example: %% delete_content_association_request() :: #{} -type delete_content_association_request() :: #{}. @@ -1480,6 +2099,13 @@ %% } -type session_integration_configuration() :: #{binary() => any()}. + +%% Example: +%% update_assistant_a_i_agent_response() :: #{ +%% <<"assistant">> => assistant_data() +%% } +-type update_assistant_a_i_agent_response() :: #{binary() => any()}. + %% Example: %% delete_import_job_response() :: #{} -type delete_import_job_response() :: #{}. @@ -1492,6 +2118,46 @@ %% } -type too_many_tags_exception() :: #{binary() => any()}. + +%% Example: +%% create_a_iprompt_version_response() :: #{ +%% <<"aiPrompt">> => a_iprompt_data(), +%% <<"versionNumber">> => float() +%% } +-type create_a_iprompt_version_response() :: #{binary() => any()}. + +-type create_a_i_agent_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + service_quota_exceeded_exception() | + resource_not_found_exception() | + conflict_exception(). + +-type create_a_i_agent_version_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + service_quota_exceeded_exception() | + resource_not_found_exception() | + conflict_exception(). + +-type create_a_iprompt_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + service_quota_exceeded_exception() | + resource_not_found_exception() | + conflict_exception(). + +-type create_a_iprompt_version_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + service_quota_exceeded_exception() | + resource_not_found_exception() | + conflict_exception(). + -type create_assistant_errors() :: validation_exception() | access_denied_exception() | @@ -1539,6 +2205,32 @@ resource_not_found_exception() | conflict_exception(). +-type delete_a_i_agent_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + +-type delete_a_i_agent_version_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception() | + conflict_exception(). + +-type delete_a_iprompt_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + +-type delete_a_iprompt_version_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception() | + conflict_exception(). + -type delete_assistant_errors() :: validation_exception() | access_denied_exception() | @@ -1576,6 +2268,18 @@ access_denied_exception() | resource_not_found_exception(). +-type get_a_i_agent_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + +-type get_a_iprompt_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + -type get_assistant_errors() :: validation_exception() | access_denied_exception() | @@ -1626,6 +2330,30 @@ access_denied_exception() | resource_not_found_exception(). +-type list_a_i_agent_versions_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + +-type list_a_i_agents_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + +-type list_a_iprompt_versions_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + +-type list_a_iprompts_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + -type list_assistant_associations_errors() :: validation_exception() | access_denied_exception() | @@ -1677,6 +2405,12 @@ resource_not_found_exception() | request_timeout_exception(). +-type remove_assistant_a_i_agent_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + -type remove_knowledge_base_template_uri_errors() :: validation_exception() | access_denied_exception() | @@ -1717,6 +2451,26 @@ -type untag_resource_errors() :: resource_not_found_exception(). +-type update_a_i_agent_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception() | + conflict_exception(). + +-type update_a_iprompt_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception() | + conflict_exception(). + +-type update_assistant_a_i_agent_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + -type update_content_errors() :: precondition_failed_exception() | validation_exception() | @@ -1740,10 +2494,151 @@ access_denied_exception() | resource_not_found_exception(). +-type update_session_data_errors() :: + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + %%==================================================================== %% API %%==================================================================== +%% @doc Creates an Amazon Q in Connect AI Agent. +-spec create_a_i_agent(aws_client:aws_client(), binary() | list(), create_a_i_agent_request()) -> + {ok, create_a_i_agent_response(), tuple()} | + {error, any()} | + {error, create_a_i_agent_errors(), tuple()}. +create_a_i_agent(Client, AssistantId, Input) -> + create_a_i_agent(Client, AssistantId, Input, []). + +-spec create_a_i_agent(aws_client:aws_client(), binary() | list(), create_a_i_agent_request(), proplists:proplist()) -> + {ok, create_a_i_agent_response(), tuple()} | + {error, any()} | + {error, create_a_i_agent_errors(), tuple()}. +create_a_i_agent(Client, AssistantId, Input0, Options0) -> + Method = post, + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiagents"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Creates and Amazon Q in Connect AI Agent version. +-spec create_a_i_agent_version(aws_client:aws_client(), binary() | list(), binary() | list(), create_a_i_agent_version_request()) -> + {ok, create_a_i_agent_version_response(), tuple()} | + {error, any()} | + {error, create_a_i_agent_version_errors(), tuple()}. +create_a_i_agent_version(Client, AiAgentId, AssistantId, Input) -> + create_a_i_agent_version(Client, AiAgentId, AssistantId, Input, []). + +-spec create_a_i_agent_version(aws_client:aws_client(), binary() | list(), binary() | list(), create_a_i_agent_version_request(), proplists:proplist()) -> + {ok, create_a_i_agent_version_response(), tuple()} | + {error, any()} | + {error, create_a_i_agent_version_errors(), tuple()}. +create_a_i_agent_version(Client, AiAgentId, AssistantId, Input0, Options0) -> + Method = post, + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiagents/", aws_util:encode_uri(AiAgentId), "/versions"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Creates an Amazon Q in Connect AI Prompt. +-spec create_a_iprompt(aws_client:aws_client(), binary() | list(), create_a_iprompt_request()) -> + {ok, create_a_iprompt_response(), tuple()} | + {error, any()} | + {error, create_a_iprompt_errors(), tuple()}. +create_a_iprompt(Client, AssistantId, Input) -> + create_a_iprompt(Client, AssistantId, Input, []). + +-spec create_a_iprompt(aws_client:aws_client(), binary() | list(), create_a_iprompt_request(), proplists:proplist()) -> + {ok, create_a_iprompt_response(), tuple()} | + {error, any()} | + {error, create_a_iprompt_errors(), tuple()}. +create_a_iprompt(Client, AssistantId, Input0, Options0) -> + Method = post, + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiprompts"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Creates an Amazon Q in Connect AI Prompt version. +-spec create_a_iprompt_version(aws_client:aws_client(), binary() | list(), binary() | list(), create_a_iprompt_version_request()) -> + {ok, create_a_iprompt_version_response(), tuple()} | + {error, any()} | + {error, create_a_iprompt_version_errors(), tuple()}. +create_a_iprompt_version(Client, AiPromptId, AssistantId, Input) -> + create_a_iprompt_version(Client, AiPromptId, AssistantId, Input, []). + +-spec create_a_iprompt_version(aws_client:aws_client(), binary() | list(), binary() | list(), create_a_iprompt_version_request(), proplists:proplist()) -> + {ok, create_a_iprompt_version_response(), tuple()} | + {error, any()} | + {error, create_a_iprompt_version_errors(), tuple()}. +create_a_iprompt_version(Client, AiPromptId, AssistantId, Input0, Options0) -> + Method = post, + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiprompts/", aws_util:encode_uri(AiPromptId), "/versions"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Creates an Amazon Q in Connect assistant. -spec create_assistant(aws_client:aws_client(), create_assistant_request()) -> {ok, create_assistant_response(), tuple()} | @@ -1857,14 +2752,13 @@ create_content(Client, KnowledgeBaseId, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Creates an association between a content resource in a knowledge base -%% and step-by-step -%% guides: +%% and step-by-step guides: %% https://docs.aws.amazon.com/connect/latest/adminguide/step-by-step-guided-experiences.html. %% -%% Step-by-step guides offer instructions to agents for resolving common -%% customer issues. You create a content association to integrate Amazon Q in -%% Connect and step-by-step -%% guides. +%% Step-by-step guides offer instructions to agents for resolving +%% common customer issues. You create a content association to integrate +%% Amazon Q in Connect and +%% step-by-step guides. %% %% After you integrate Amazon Q and step-by-step guides, when Amazon Q %% provides a @@ -1875,8 +2769,9 @@ create_content(Client, KnowledgeBaseId, Input0, Options0) -> %% %% Note the following limitations: %% -%% You can create only one content association for each -%% content resource in a knowledge base. +%% You can create only one content association for each content resource in a +%% knowledge +%% base. %% %% You can associate a step-by-step guide with multiple content resources. %% @@ -2050,6 +2945,142 @@ create_session(Client, AssistantId, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Deletes an Amazon Q in Connect AI Agent. +-spec delete_a_i_agent(aws_client:aws_client(), binary() | list(), binary() | list(), delete_a_i_agent_request()) -> + {ok, delete_a_i_agent_response(), tuple()} | + {error, any()} | + {error, delete_a_i_agent_errors(), tuple()}. +delete_a_i_agent(Client, AiAgentId, AssistantId, Input) -> + delete_a_i_agent(Client, AiAgentId, AssistantId, Input, []). + +-spec delete_a_i_agent(aws_client:aws_client(), binary() | list(), binary() | list(), delete_a_i_agent_request(), proplists:proplist()) -> + {ok, delete_a_i_agent_response(), tuple()} | + {error, any()} | + {error, delete_a_i_agent_errors(), tuple()}. +delete_a_i_agent(Client, AiAgentId, AssistantId, Input0, Options0) -> + Method = delete, + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiagents/", aws_util:encode_uri(AiAgentId), ""], + SuccessStatusCode = 204, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Deletes an Amazon Q in Connect AI Agent Version. +-spec delete_a_i_agent_version(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), delete_a_i_agent_version_request()) -> + {ok, delete_a_i_agent_version_response(), tuple()} | + {error, any()} | + {error, delete_a_i_agent_version_errors(), tuple()}. +delete_a_i_agent_version(Client, AiAgentId, AssistantId, VersionNumber, Input) -> + delete_a_i_agent_version(Client, AiAgentId, AssistantId, VersionNumber, Input, []). + +-spec delete_a_i_agent_version(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), delete_a_i_agent_version_request(), proplists:proplist()) -> + {ok, delete_a_i_agent_version_response(), tuple()} | + {error, any()} | + {error, delete_a_i_agent_version_errors(), tuple()}. +delete_a_i_agent_version(Client, AiAgentId, AssistantId, VersionNumber, Input0, Options0) -> + Method = delete, + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiagents/", aws_util:encode_uri(AiAgentId), "/versions/", aws_util:encode_uri(VersionNumber), ""], + SuccessStatusCode = 204, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Deletes an Amazon Q in Connect AI Prompt. +-spec delete_a_iprompt(aws_client:aws_client(), binary() | list(), binary() | list(), delete_a_iprompt_request()) -> + {ok, delete_a_iprompt_response(), tuple()} | + {error, any()} | + {error, delete_a_iprompt_errors(), tuple()}. +delete_a_iprompt(Client, AiPromptId, AssistantId, Input) -> + delete_a_iprompt(Client, AiPromptId, AssistantId, Input, []). + +-spec delete_a_iprompt(aws_client:aws_client(), binary() | list(), binary() | list(), delete_a_iprompt_request(), proplists:proplist()) -> + {ok, delete_a_iprompt_response(), tuple()} | + {error, any()} | + {error, delete_a_iprompt_errors(), tuple()}. +delete_a_iprompt(Client, AiPromptId, AssistantId, Input0, Options0) -> + Method = delete, + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiprompts/", aws_util:encode_uri(AiPromptId), ""], + SuccessStatusCode = 204, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Delete and Amazon Q in Connect AI Prompt version. +-spec delete_a_iprompt_version(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), delete_a_iprompt_version_request()) -> + {ok, delete_a_iprompt_version_response(), tuple()} | + {error, any()} | + {error, delete_a_iprompt_version_errors(), tuple()}. +delete_a_iprompt_version(Client, AiPromptId, AssistantId, VersionNumber, Input) -> + delete_a_iprompt_version(Client, AiPromptId, AssistantId, VersionNumber, Input, []). + +-spec delete_a_iprompt_version(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), delete_a_iprompt_version_request(), proplists:proplist()) -> + {ok, delete_a_iprompt_version_response(), tuple()} | + {error, any()} | + {error, delete_a_iprompt_version_errors(), tuple()}. +delete_a_iprompt_version(Client, AiPromptId, AssistantId, VersionNumber, Input0, Options0) -> + Method = delete, + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiprompts/", aws_util:encode_uri(AiPromptId), "/versions/", aws_util:encode_uri(VersionNumber), ""], + SuccessStatusCode = 204, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Deletes an assistant. -spec delete_assistant(aws_client:aws_client(), binary() | list(), delete_assistant_request()) -> {ok, delete_assistant_response(), tuple()} | @@ -2310,6 +3341,80 @@ delete_quick_response(Client, KnowledgeBaseId, QuickResponseId, Input0, Options0 request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Gets an Amazon Q in Connect AI Agent. +-spec get_a_i_agent(aws_client:aws_client(), binary() | list(), binary() | list()) -> + {ok, get_a_i_agent_response(), tuple()} | + {error, any()} | + {error, get_a_i_agent_errors(), tuple()}. +get_a_i_agent(Client, AiAgentId, AssistantId) + when is_map(Client) -> + get_a_i_agent(Client, AiAgentId, AssistantId, #{}, #{}). + +-spec get_a_i_agent(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> + {ok, get_a_i_agent_response(), tuple()} | + {error, any()} | + {error, get_a_i_agent_errors(), tuple()}. +get_a_i_agent(Client, AiAgentId, AssistantId, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + get_a_i_agent(Client, AiAgentId, AssistantId, QueryMap, HeadersMap, []). + +-spec get_a_i_agent(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, get_a_i_agent_response(), tuple()} | + {error, any()} | + {error, get_a_i_agent_errors(), tuple()}. +get_a_i_agent(Client, AiAgentId, AssistantId, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiagents/", aws_util:encode_uri(AiAgentId), ""], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query_ = [], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + +%% @doc Gets and Amazon Q in Connect AI Prompt. +-spec get_a_iprompt(aws_client:aws_client(), binary() | list(), binary() | list()) -> + {ok, get_a_iprompt_response(), tuple()} | + {error, any()} | + {error, get_a_iprompt_errors(), tuple()}. +get_a_iprompt(Client, AiPromptId, AssistantId) + when is_map(Client) -> + get_a_iprompt(Client, AiPromptId, AssistantId, #{}, #{}). + +-spec get_a_iprompt(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> + {ok, get_a_iprompt_response(), tuple()} | + {error, any()} | + {error, get_a_iprompt_errors(), tuple()}. +get_a_iprompt(Client, AiPromptId, AssistantId, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + get_a_iprompt(Client, AiPromptId, AssistantId, QueryMap, HeadersMap, []). + +-spec get_a_iprompt(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, get_a_iprompt_response(), tuple()} | + {error, any()} | + {error, get_a_iprompt_errors(), tuple()}. +get_a_iprompt(Client, AiPromptId, AssistantId, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiprompts/", aws_util:encode_uri(AiPromptId), ""], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query_ = [], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + %% @doc Retrieves information about an assistant. -spec get_assistant(aws_client:aws_client(), binary() | list()) -> {ok, get_assistant_response(), tuple()} | @@ -2712,6 +3817,178 @@ get_session(Client, AssistantId, SessionId, QueryMap, HeadersMap, Options0) request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). +%% @doc List AI Agent versions. +-spec list_a_i_agent_versions(aws_client:aws_client(), binary() | list(), binary() | list()) -> + {ok, list_a_i_agent_versions_response(), tuple()} | + {error, any()} | + {error, list_a_i_agent_versions_errors(), tuple()}. +list_a_i_agent_versions(Client, AiAgentId, AssistantId) + when is_map(Client) -> + list_a_i_agent_versions(Client, AiAgentId, AssistantId, #{}, #{}). + +-spec list_a_i_agent_versions(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> + {ok, list_a_i_agent_versions_response(), tuple()} | + {error, any()} | + {error, list_a_i_agent_versions_errors(), tuple()}. +list_a_i_agent_versions(Client, AiAgentId, AssistantId, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + list_a_i_agent_versions(Client, AiAgentId, AssistantId, QueryMap, HeadersMap, []). + +-spec list_a_i_agent_versions(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, list_a_i_agent_versions_response(), tuple()} | + {error, any()} | + {error, list_a_i_agent_versions_errors(), tuple()}. +list_a_i_agent_versions(Client, AiAgentId, AssistantId, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiagents/", aws_util:encode_uri(AiAgentId), "/versions"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query0_ = + [ + {<<"maxResults">>, maps:get(<<"maxResults">>, QueryMap, undefined)}, + {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)}, + {<<"origin">>, maps:get(<<"origin">>, QueryMap, undefined)} + ], + Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + +%% @doc Lists AI Agents. +-spec list_a_i_agents(aws_client:aws_client(), binary() | list()) -> + {ok, list_a_i_agents_response(), tuple()} | + {error, any()} | + {error, list_a_i_agents_errors(), tuple()}. +list_a_i_agents(Client, AssistantId) + when is_map(Client) -> + list_a_i_agents(Client, AssistantId, #{}, #{}). + +-spec list_a_i_agents(aws_client:aws_client(), binary() | list(), map(), map()) -> + {ok, list_a_i_agents_response(), tuple()} | + {error, any()} | + {error, list_a_i_agents_errors(), tuple()}. +list_a_i_agents(Client, AssistantId, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + list_a_i_agents(Client, AssistantId, QueryMap, HeadersMap, []). + +-spec list_a_i_agents(aws_client:aws_client(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, list_a_i_agents_response(), tuple()} | + {error, any()} | + {error, list_a_i_agents_errors(), tuple()}. +list_a_i_agents(Client, AssistantId, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiagents"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query0_ = + [ + {<<"maxResults">>, maps:get(<<"maxResults">>, QueryMap, undefined)}, + {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)}, + {<<"origin">>, maps:get(<<"origin">>, QueryMap, undefined)} + ], + Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + +%% @doc Lists AI Prompt versions. +-spec list_a_iprompt_versions(aws_client:aws_client(), binary() | list(), binary() | list()) -> + {ok, list_a_iprompt_versions_response(), tuple()} | + {error, any()} | + {error, list_a_iprompt_versions_errors(), tuple()}. +list_a_iprompt_versions(Client, AiPromptId, AssistantId) + when is_map(Client) -> + list_a_iprompt_versions(Client, AiPromptId, AssistantId, #{}, #{}). + +-spec list_a_iprompt_versions(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> + {ok, list_a_iprompt_versions_response(), tuple()} | + {error, any()} | + {error, list_a_iprompt_versions_errors(), tuple()}. +list_a_iprompt_versions(Client, AiPromptId, AssistantId, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + list_a_iprompt_versions(Client, AiPromptId, AssistantId, QueryMap, HeadersMap, []). + +-spec list_a_iprompt_versions(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, list_a_iprompt_versions_response(), tuple()} | + {error, any()} | + {error, list_a_iprompt_versions_errors(), tuple()}. +list_a_iprompt_versions(Client, AiPromptId, AssistantId, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiprompts/", aws_util:encode_uri(AiPromptId), "/versions"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query0_ = + [ + {<<"maxResults">>, maps:get(<<"maxResults">>, QueryMap, undefined)}, + {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)}, + {<<"origin">>, maps:get(<<"origin">>, QueryMap, undefined)} + ], + Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + +%% @doc Lists the AI Prompts available on the Amazon Q in Connect assistant. +-spec list_a_iprompts(aws_client:aws_client(), binary() | list()) -> + {ok, list_a_iprompts_response(), tuple()} | + {error, any()} | + {error, list_a_iprompts_errors(), tuple()}. +list_a_iprompts(Client, AssistantId) + when is_map(Client) -> + list_a_iprompts(Client, AssistantId, #{}, #{}). + +-spec list_a_iprompts(aws_client:aws_client(), binary() | list(), map(), map()) -> + {ok, list_a_iprompts_response(), tuple()} | + {error, any()} | + {error, list_a_iprompts_errors(), tuple()}. +list_a_iprompts(Client, AssistantId, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + list_a_iprompts(Client, AssistantId, QueryMap, HeadersMap, []). + +-spec list_a_iprompts(aws_client:aws_client(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, list_a_iprompts_response(), tuple()} | + {error, any()} | + {error, list_a_iprompts_errors(), tuple()}. +list_a_iprompts(Client, AssistantId, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiprompts"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query0_ = + [ + {<<"maxResults">>, maps:get(<<"maxResults">>, QueryMap, undefined)}, + {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)}, + {<<"origin">>, maps:get(<<"origin">>, QueryMap, undefined)} + ], + Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + %% @doc Lists information about assistant associations. -spec list_assistant_associations(aws_client:aws_client(), binary() | list()) -> {ok, list_assistant_associations_response(), tuple()} | @@ -3176,6 +4453,43 @@ query_assistant(Client, AssistantId, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Removes the AI Agent that is set for use by defafult on an Amazon Q +%% in Connect +%% Assistant. +-spec remove_assistant_a_i_agent(aws_client:aws_client(), binary() | list(), remove_assistant_a_i_agent_request()) -> + {ok, remove_assistant_a_i_agent_response(), tuple()} | + {error, any()} | + {error, remove_assistant_a_i_agent_errors(), tuple()}. +remove_assistant_a_i_agent(Client, AssistantId, Input) -> + remove_assistant_a_i_agent(Client, AssistantId, Input, []). + +-spec remove_assistant_a_i_agent(aws_client:aws_client(), binary() | list(), remove_assistant_a_i_agent_request(), proplists:proplist()) -> + {ok, remove_assistant_a_i_agent_response(), tuple()} | + {error, any()} | + {error, remove_assistant_a_i_agent_errors(), tuple()}. +remove_assistant_a_i_agent(Client, AssistantId, Input0, Options0) -> + Method = delete, + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiagentConfiguration"], + SuccessStatusCode = 204, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + QueryMapping = [ + {<<"aiAgentType">>, <<"aiAgentType">>} + ], + {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Removes a URI template from a knowledge base. -spec remove_knowledge_base_template_uri(aws_client:aws_client(), binary() | list(), remove_knowledge_base_template_uri_request()) -> {ok, remove_knowledge_base_template_uri_response(), tuple()} | @@ -3485,6 +4799,110 @@ untag_resource(Client, ResourceArn, Input0, Options0) -> {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Updates an AI Agent. +-spec update_a_i_agent(aws_client:aws_client(), binary() | list(), binary() | list(), update_a_i_agent_request()) -> + {ok, update_a_i_agent_response(), tuple()} | + {error, any()} | + {error, update_a_i_agent_errors(), tuple()}. +update_a_i_agent(Client, AiAgentId, AssistantId, Input) -> + update_a_i_agent(Client, AiAgentId, AssistantId, Input, []). + +-spec update_a_i_agent(aws_client:aws_client(), binary() | list(), binary() | list(), update_a_i_agent_request(), proplists:proplist()) -> + {ok, update_a_i_agent_response(), tuple()} | + {error, any()} | + {error, update_a_i_agent_errors(), tuple()}. +update_a_i_agent(Client, AiAgentId, AssistantId, Input0, Options0) -> + Method = post, + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiagents/", aws_util:encode_uri(AiAgentId), ""], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Updates an AI Prompt. +-spec update_a_iprompt(aws_client:aws_client(), binary() | list(), binary() | list(), update_a_iprompt_request()) -> + {ok, update_a_iprompt_response(), tuple()} | + {error, any()} | + {error, update_a_iprompt_errors(), tuple()}. +update_a_iprompt(Client, AiPromptId, AssistantId, Input) -> + update_a_iprompt(Client, AiPromptId, AssistantId, Input, []). + +-spec update_a_iprompt(aws_client:aws_client(), binary() | list(), binary() | list(), update_a_iprompt_request(), proplists:proplist()) -> + {ok, update_a_iprompt_response(), tuple()} | + {error, any()} | + {error, update_a_iprompt_errors(), tuple()}. +update_a_iprompt(Client, AiPromptId, AssistantId, Input0, Options0) -> + Method = post, + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiprompts/", aws_util:encode_uri(AiPromptId), ""], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Updates the AI Agent that is set for use by defafult on an Amazon Q +%% in Connect +%% Assistant. +-spec update_assistant_a_i_agent(aws_client:aws_client(), binary() | list(), update_assistant_a_i_agent_request()) -> + {ok, update_assistant_a_i_agent_response(), tuple()} | + {error, any()} | + {error, update_assistant_a_i_agent_errors(), tuple()}. +update_assistant_a_i_agent(Client, AssistantId, Input) -> + update_assistant_a_i_agent(Client, AssistantId, Input, []). + +-spec update_assistant_a_i_agent(aws_client:aws_client(), binary() | list(), update_assistant_a_i_agent_request(), proplists:proplist()) -> + {ok, update_assistant_a_i_agent_response(), tuple()} | + {error, any()} | + {error, update_assistant_a_i_agent_errors(), tuple()}. +update_assistant_a_i_agent(Client, AssistantId, Input0, Options0) -> + Method = post, + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/aiagentConfiguration"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Updates information about the content. -spec update_content(aws_client:aws_client(), binary() | list(), binary() | list(), update_content_request()) -> {ok, update_content_response(), tuple()} | @@ -3634,6 +5052,40 @@ update_session(Client, AssistantId, SessionId, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Updates the data stored on an Amazon Q in Connect Session. +-spec update_session_data(aws_client:aws_client(), binary() | list(), binary() | list(), update_session_data_request()) -> + {ok, update_session_data_response(), tuple()} | + {error, any()} | + {error, update_session_data_errors(), tuple()}. +update_session_data(Client, AssistantId, SessionId, Input) -> + update_session_data(Client, AssistantId, SessionId, Input, []). + +-spec update_session_data(aws_client:aws_client(), binary() | list(), binary() | list(), update_session_data_request(), proplists:proplist()) -> + {ok, update_session_data_response(), tuple()} | + {error, any()} | + {error, update_session_data_errors(), tuple()}. +update_session_data(Client, AssistantId, SessionId, Input0, Options0) -> + Method = patch, + Path = ["/assistants/", aws_util:encode_uri(AssistantId), "/sessions/", aws_util:encode_uri(SessionId), "/data"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %%==================================================================== %% Internal functions %%====================================================================