%% WARNING: DO NOT EDIT, AUTO-GENERATED CODE! %% See https://github.com/aws-beam/aws-codegen for more details. %% @doc Welcome to the Amazon Bedrock AgentCore Data Plane API reference. %% %% Data Plane actions process and handle data or workloads within Amazon Web %% Services services. -module(aws_bedrock_agentcore). -export([batch_create_memory_records/3, batch_create_memory_records/4, batch_delete_memory_records/3, batch_delete_memory_records/4, batch_update_memory_records/3, batch_update_memory_records/4, complete_resource_token_auth/2, complete_resource_token_auth/3, create_a_b_test/2, create_a_b_test/3, create_event/3, create_event/4, create_payment_instrument/2, create_payment_instrument/3, create_payment_session/2, create_payment_session/3, delete_a_b_test/3, delete_a_b_test/4, delete_batch_evaluation/3, delete_batch_evaluation/4, delete_event/6, delete_event/7, delete_memory_record/4, delete_memory_record/5, delete_payment_instrument/2, delete_payment_instrument/3, delete_payment_session/2, delete_payment_session/3, delete_recommendation/3, delete_recommendation/4, evaluate/3, evaluate/4, get_a_b_test/2, get_a_b_test/4, get_a_b_test/5, get_agent_card/2, get_agent_card/4, get_agent_card/5, get_batch_evaluation/2, get_batch_evaluation/4, get_batch_evaluation/5, get_browser_session/3, get_browser_session/5, get_browser_session/6, get_code_interpreter_session/3, get_code_interpreter_session/5, get_code_interpreter_session/6, get_event/5, get_event/7, get_event/8, get_memory_record/3, get_memory_record/5, get_memory_record/6, get_payment_instrument/2, get_payment_instrument/3, get_payment_instrument_balance/2, get_payment_instrument_balance/3, get_payment_session/2, get_payment_session/3, get_recommendation/2, get_recommendation/4, get_recommendation/5, get_resource_api_key/2, get_resource_api_key/3, get_resource_oauth2_token/2, get_resource_oauth2_token/3, get_resource_payment_token/2, get_resource_payment_token/3, get_workload_access_token/2, get_workload_access_token/3, get_workload_access_token_for_j_w_t/2, get_workload_access_token_for_j_w_t/3, get_workload_access_token_for_user_id/2, get_workload_access_token_for_user_id/3, invoke_agent_runtime/3, invoke_agent_runtime/4, invoke_agent_runtime_command/3, invoke_agent_runtime_command/4, invoke_browser/3, invoke_browser/4, invoke_code_interpreter/3, invoke_code_interpreter/4, invoke_harness/2, invoke_harness/3, list_a_b_tests/1, list_a_b_tests/3, list_a_b_tests/4, list_actors/3, list_actors/4, list_batch_evaluations/1, list_batch_evaluations/3, list_batch_evaluations/4, list_browser_sessions/3, list_browser_sessions/4, list_code_interpreter_sessions/3, list_code_interpreter_sessions/4, list_events/5, list_events/6, list_memory_extraction_jobs/3, list_memory_extraction_jobs/4, list_memory_records/3, list_memory_records/4, list_payment_instruments/2, list_payment_instruments/3, list_payment_sessions/2, list_payment_sessions/3, list_recommendations/1, list_recommendations/3, list_recommendations/4, list_sessions/4, list_sessions/5, process_payment/2, process_payment/3, retrieve_memory_records/3, retrieve_memory_records/4, save_browser_session_profile/3, save_browser_session_profile/4, search_registry_records/2, search_registry_records/3, start_batch_evaluation/2, start_batch_evaluation/3, start_browser_session/3, start_browser_session/4, start_code_interpreter_session/3, start_code_interpreter_session/4, start_memory_extraction_job/3, start_memory_extraction_job/4, start_recommendation/2, start_recommendation/3, stop_batch_evaluation/3, stop_batch_evaluation/4, stop_browser_session/3, stop_browser_session/4, stop_code_interpreter_session/3, stop_code_interpreter_session/4, stop_runtime_session/3, stop_runtime_session/4, update_a_b_test/3, update_a_b_test/4, update_browser_stream/3, update_browser_stream/4]). -include_lib("hackney/include/hackney_lib.hrl"). %% Example: %% payment_session() :: #{ %% <<"availableLimits">> => available_limits(), %% <<"createdAt">> => non_neg_integer(), %% <<"expiryTimeInMinutes">> => [integer()], %% <<"limits">> => session_limits(), %% <<"paymentManagerArn">> => string(), %% <<"paymentSessionId">> => string(), %% <<"updatedAt">> => non_neg_integer(), %% <<"userId">> => string() %% } -type payment_session() :: #{binary() => any()}. %% Example: %% branch() :: #{ %% <<"name">> => string(), %% <<"rootEventId">> => string() %% } -type branch() :: #{binary() => any()}. %% Example: %% browser_enterprise_policy() :: #{ %% <<"location">> => list(), %% <<"type">> => list(any()) %% } -type browser_enterprise_policy() :: #{binary() => any()}. %% Example: %% tool_description_output() :: #{ %% <<"recommendedToolDescription">> => string(), %% <<"toolName">> => string() %% } -type tool_description_output() :: #{binary() => any()}. %% Example: %% harness_remote_mcp_config() :: #{ %% <<"headers">> => map(), %% <<"url">> => string() %% } -type harness_remote_mcp_config() :: #{binary() => any()}. %% Example: %% create_payment_instrument_request() :: #{ %% <<"agentName">> => string(), %% <<"clientToken">> => string(), %% <<"paymentConnectorId">> := string(), %% <<"paymentInstrumentDetails">> := list(), %% <<"paymentInstrumentType">> := list(any()), %% <<"paymentManagerArn">> := string(), %% <<"userId">> => string() %% } -type create_payment_instrument_request() :: #{binary() => any()}. %% Example: %% conversational() :: #{ %% <<"content">> => list(), %% <<"role">> => list(any()) %% } -type conversational() :: #{binary() => any()}. %% Example: %% live_view_stream() :: #{ %% <<"streamEndpoint">> => string() %% } -type live_view_stream() :: #{binary() => any()}. %% Example: %% recommendation_evaluator_reference() :: #{ %% <<"evaluatorArn">> => string() %% } -type recommendation_evaluator_reference() :: #{binary() => any()}. %% Example: %% evaluation_result_content() :: #{ %% <<"context">> => list(), %% <<"errorCode">> => string(), %% <<"errorMessage">> => string(), %% <<"evaluatorArn">> => string(), %% <<"evaluatorId">> => string(), %% <<"evaluatorName">> => string(), %% <<"explanation">> => string(), %% <<"ignoredReferenceInputFields">> => list(string()), %% <<"label">> => [string()], %% <<"tokenUsage">> => token_usage(), %% <<"value">> => [float()] %% } -type evaluation_result_content() :: #{binary() => any()}. %% Example: %% batch_update_memory_records_input() :: #{ %% <<"records">> := list(memory_record_update_input()) %% } -type batch_update_memory_records_input() :: #{binary() => any()}. %% Example: %% retrieve_memory_records_output() :: #{ %% <<"memoryRecordSummaries">> => list(memory_record_summary()), %% <<"nextToken">> => string() %% } -type retrieve_memory_records_output() :: #{binary() => any()}. %% Example: %% automation_stream() :: #{ %% <<"streamEndpoint">> => string(), %% <<"streamStatus">> => list(any()) %% } -type automation_stream() :: #{binary() => any()}. %% Example: %% a2a_descriptor() :: #{ %% <<"agentCard">> => agent_card_definition() %% } -type a2a_descriptor() :: #{binary() => any()}. %% Example: %% mouse_drag_arguments() :: #{ %% <<"button">> => list(any()), %% <<"endX">> => [integer()], %% <<"endY">> => [integer()], %% <<"startX">> => [integer()], %% <<"startY">> => [integer()] %% } -type mouse_drag_arguments() :: #{binary() => any()}. %% Example: %% stop_batch_evaluation_request() :: #{} -type stop_batch_evaluation_request() :: #{}. %% Example: %% key_press_result() :: #{ %% <<"error">> => [string()], %% <<"status">> => list(any()) %% } -type key_press_result() :: #{binary() => any()}. %% Example: %% batch_create_memory_records_input() :: #{ %% <<"clientToken">> => [string()], %% <<"records">> := list(memory_record_create_input()) %% } -type batch_create_memory_records_input() :: #{binary() => any()}. %% Example: %% ground_truth_turn() :: #{ %% <<"expectedResponse">> => list(), %% <<"input">> => list() %% } -type ground_truth_turn() :: #{binary() => any()}. %% Example: %% recommendation_evaluation_config() :: #{ %% <<"evaluators">> => list(recommendation_evaluator_reference()) %% } -type recommendation_evaluation_config() :: #{binary() => any()}. %% Example: %% session_summary() :: #{ %% <<"actorId">> => string(), %% <<"createdAt">> => [non_neg_integer()], %% <<"sessionId">> => string() %% } -type session_summary() :: #{binary() => any()}. %% Example: %% mouse_scroll_result() :: #{ %% <<"error">> => [string()], %% <<"status">> => list(any()) %% } -type mouse_scroll_result() :: #{binary() => any()}. %% Example: %% inline_ground_truth() :: #{ %% <<"assertions">> => list(list()), %% <<"expectedTrajectory">> => evaluation_expected_trajectory(), %% <<"turns">> => list(ground_truth_turn()) %% } -type inline_ground_truth() :: #{binary() => any()}. %% Example: %% duplicate_id_exception() :: #{ %% <<"message">> => string() %% } -type duplicate_id_exception() :: #{binary() => any()}. %% Example: %% unauthorized_exception() :: #{ %% <<"message">> => string() %% } -type unauthorized_exception() :: #{binary() => any()}. %% Example: %% memory_record_output() :: #{ %% <<"errorCode">> => [integer()], %% <<"errorMessage">> => [string()], %% <<"memoryRecordId">> => string(), %% <<"requestIdentifier">> => string(), %% <<"status">> => list(any()) %% } -type memory_record_output() :: #{binary() => any()}. %% Example: %% list_actors_input() :: #{ %% <<"maxResults">> => integer(), %% <<"nextToken">> => string() %% } -type list_actors_input() :: #{binary() => any()}. %% Example: %% invoke_code_interpreter_request() :: #{ %% <<"arguments">> => tool_arguments(), %% <<"name">> := list(any()), %% <<"sessionId">> => string(), %% <<"traceId">> => [string()], %% <<"traceParent">> => [string()] %% } -type invoke_code_interpreter_request() :: #{binary() => any()}. %% Example: %% per_variant_online_evaluation_config() :: #{ %% <<"name">> => string(), %% <<"onlineEvaluationConfigArn">> => string() %% } -type per_variant_online_evaluation_config() :: #{binary() => any()}. %% Example: %% retryable_conflict_exception() :: #{ %% <<"message">> => [string()] %% } -type retryable_conflict_exception() :: #{binary() => any()}. %% Example: %% proxy_configuration() :: #{ %% <<"bypass">> => proxy_bypass(), %% <<"proxies">> => list(list()) %% } -type proxy_configuration() :: #{binary() => any()}. %% Example: %% list_browser_sessions_request() :: #{ %% <<"maxResults">> => integer(), %% <<"nextToken">> => string(), %% <<"status">> => list(any()) %% } -type list_browser_sessions_request() :: #{binary() => any()}. %% Example: %% custom_descriptor() :: #{ %% <<"inlineContent">> => string() %% } -type custom_descriptor() :: #{binary() => any()}. %% Example: %% invoke_agent_runtime_command_request_body() :: #{ %% <<"command">> => [string()], %% <<"timeout">> => [integer()] %% } -type invoke_agent_runtime_command_request_body() :: #{binary() => any()}. %% Example: %% invoke_browser_request() :: #{ %% <<"action">> := list(), %% <<"sessionId">> := string() %% } -type invoke_browser_request() :: #{binary() => any()}. %% Example: %% cloud_watch_output_config() :: #{ %% <<"logGroupName">> => [string()], %% <<"logStreamName">> => [string()] %% } -type cloud_watch_output_config() :: #{binary() => any()}. %% Example: %% list_payment_instruments_response() :: #{ %% <<"nextToken">> => [string()], %% <<"paymentInstruments">> => list(payment_instrument_summary()) %% } -type list_payment_instruments_response() :: #{binary() => any()}. %% Example: %% content_stop_event() :: #{ %% <<"exitCode">> => [integer()], %% <<"status">> => list(any()) %% } -type content_stop_event() :: #{binary() => any()}. %% Example: %% memory_record_create_input() :: #{ %% <<"content">> => list(), %% <<"memoryStrategyId">> => string(), %% <<"metadata">> => map(), %% <<"namespaces">> => list(string()), %% <<"requestIdentifier">> => string(), %% <<"timestamp">> => [non_neg_integer()] %% } -type memory_record_create_input() :: #{binary() => any()}. %% Example: %% extraction_job_filter_input() :: #{ %% <<"actorId">> => [string()], %% <<"sessionId">> => [string()], %% <<"status">> => list(any()), %% <<"strategyId">> => [string()] %% } -type extraction_job_filter_input() :: #{binary() => any()}. %% Example: %% batch_delete_memory_records_input() :: #{ %% <<"records">> := list(memory_record_delete_input()) %% } -type batch_delete_memory_records_input() :: #{binary() => any()}. %% Example: %% get_workload_access_token_for_j_w_t_response() :: #{ %% <<"workloadAccessToken">> => string() %% } -type get_workload_access_token_for_j_w_t_response() :: #{binary() => any()}. %% Example: %% get_workload_access_token_request() :: #{ %% <<"workloadName">> := string() %% } -type get_workload_access_token_request() :: #{binary() => any()}. %% Example: %% event_metadata_filter_expression() :: #{ %% <<"left">> => list(), %% <<"operator">> => list(any()), %% <<"right">> => list() %% } -type event_metadata_filter_expression() :: #{binary() => any()}. %% Example: %% harness_content_block_start_event() :: #{ %% <<"contentBlockIndex">> => [integer()], %% <<"start">> => list() %% } -type harness_content_block_start_event() :: #{binary() => any()}. %% Example: %% evaluator_statistics() :: #{ %% <<"averageScore">> => [float()] %% } -type evaluator_statistics() :: #{binary() => any()}. %% Example: %% invoke_agent_runtime_command_response() :: #{ %% <<"baggage">> => [string()], %% <<"contentType">> => [string()], %% <<"runtimeSessionId">> => string(), %% <<"statusCode">> => integer(), %% <<"stream">> => list(), %% <<"traceId">> => [string()], %% <<"traceParent">> => [string()], %% <<"traceState">> => [string()] %% } -type invoke_agent_runtime_command_response() :: #{binary() => any()}. %% Example: %% external_proxy() :: #{ %% <<"credentials">> => list(), %% <<"domainPatterns">> => list(string()), %% <<"port">> => [integer()], %% <<"server">> => string() %% } -type external_proxy() :: #{binary() => any()}. %% Example: %% harness_skill_s3_source() :: #{ %% <<"uri">> => string() %% } -type harness_skill_s3_source() :: #{binary() => any()}. %% Example: %% update_a_b_test_response() :: #{ %% <<"abTestArn">> => string(), %% <<"abTestId">> => string(), %% <<"executionStatus">> => list(any()), %% <<"status">> => list(any()), %% <<"updatedAt">> => [non_neg_integer()] %% } -type update_a_b_test_response() :: #{binary() => any()}. %% Example: %% get_resource_api_key_request() :: #{ %% <<"resourceCredentialProviderName">> := string(), %% <<"workloadIdentityToken">> := string() %% } -type get_resource_api_key_request() :: #{binary() => any()}. %% Example: %% code_interpreter_session_summary() :: #{ %% <<"codeInterpreterIdentifier">> => [string()], %% <<"createdAt">> => non_neg_integer(), %% <<"lastUpdatedAt">> => non_neg_integer(), %% <<"name">> => string(), %% <<"sessionId">> => string(), %% <<"status">> => list(any()) %% } -type code_interpreter_session_summary() :: #{binary() => any()}. %% Example: %% control_stats() :: #{ %% <<"mean">> => [float()], %% <<"sampleSize">> => [integer()], %% <<"variantName">> => [string()] %% } -type control_stats() :: #{binary() => any()}. %% Example: %% complete_resource_token_auth_request() :: #{ %% <<"sessionUri">> := string(), %% <<"userIdentifier">> := list() %% } -type complete_resource_token_auth_request() :: #{binary() => any()}. %% Example: %% get_recommendation_request() :: #{} -type get_recommendation_request() :: #{}. %% Example: %% memory_record_update_input() :: #{ %% <<"content">> => list(), %% <<"memoryRecordId">> => string(), %% <<"memoryStrategyId">> => string(), %% <<"metadata">> => map(), %% <<"namespaces">> => list(string()), %% <<"timestamp">> => [non_neg_integer()] %% } -type memory_record_update_input() :: #{binary() => any()}. %% Example: %% mouse_click_result() :: #{ %% <<"error">> => [string()], %% <<"status">> => list(any()) %% } -type mouse_click_result() :: #{binary() => any()}. %% Example: %% create_a_b_test_response() :: #{ %% <<"abTestArn">> => string(), %% <<"abTestId">> => string(), %% <<"createdAt">> => [non_neg_integer()], %% <<"executionStatus">> => list(any()), %% <<"name">> => string(), %% <<"status">> => list(any()) %% } -type create_a_b_test_response() :: #{binary() => any()}. %% Example: %% list_batch_evaluations_response() :: #{ %% <<"batchEvaluations">> => list(batch_evaluation_summary()), %% <<"nextToken">> => [string()] %% } -type list_batch_evaluations_response() :: #{binary() => any()}. %% Example: %% harness_agent_core_gateway_config() :: #{ %% <<"gatewayArn">> => string(), %% <<"outboundAuth">> => list() %% } -type harness_agent_core_gateway_config() :: #{binary() => any()}. %% Example: %% cloud_watch_logs_trace_config() :: #{ %% <<"endTime">> => [non_neg_integer()], %% <<"logGroupArns">> => list([string()]()), %% <<"rule">> => cloud_watch_logs_rule(), %% <<"serviceNames">> => list(string()), %% <<"startTime">> => [non_neg_integer()] %% } -type cloud_watch_logs_trace_config() :: #{binary() => any()}. %% Example: %% harness_skill_git_source() :: #{ %% <<"auth">> => harness_skill_git_auth(), %% <<"path">> => [string()], %% <<"url">> => string() %% } -type harness_skill_git_source() :: #{binary() => any()}. %% Example: %% stop_browser_session_request() :: #{ %% <<"clientToken">> => string(), %% <<"sessionId">> := string(), %% <<"traceId">> => [string()], %% <<"traceParent">> => [string()] %% } -type stop_browser_session_request() :: #{binary() => any()}. %% Example: %% delete_memory_record_input() :: #{} -type delete_memory_record_input() :: #{}. %% Example: %% linked_account_developer_jwt() :: #{ %% <<"kid">> => string(), %% <<"sub">> => [string()] %% } -type linked_account_developer_jwt() :: #{binary() => any()}. %% Example: %% stop_runtime_session_response() :: #{ %% <<"runtimeSessionId">> => string(), %% <<"statusCode">> => integer() %% } -type stop_runtime_session_response() :: #{binary() => any()}. %% Example: %% variant_configuration() :: #{ %% <<"configurationBundle">> => configuration_bundle_ref(), %% <<"target">> => target_ref() %% } -type variant_configuration() :: #{binary() => any()}. %% Example: %% get_payment_session_request() :: #{ %% <<"agentName">> => string(), %% <<"paymentManagerArn">> := string(), %% <<"paymentSessionId">> := string(), %% <<"userId">> => string() %% } -type get_payment_session_request() :: #{binary() => any()}. %% Example: %% mouse_drag_result() :: #{ %% <<"error">> => [string()], %% <<"status">> => list(any()) %% } -type mouse_drag_result() :: #{binary() => any()}. %% Example: %% invoke_browser_response() :: #{ %% <<"result">> => list(), %% <<"sessionId">> => string() %% } -type invoke_browser_response() :: #{binary() => any()}. %% Example: %% delete_payment_instrument_response() :: #{ %% <<"status">> => list(any()) %% } -type delete_payment_instrument_response() :: #{binary() => any()}. %% Example: %% get_workload_access_token_response() :: #{ %% <<"workloadAccessToken">> => string() %% } -type get_workload_access_token_response() :: #{binary() => any()}. %% Example: %% tool_description_input() :: #{ %% <<"toolDescription">> => list(), %% <<"toolName">> => string() %% } -type tool_description_input() :: #{binary() => any()}. %% Example: %% list_memory_extraction_jobs_output() :: #{ %% <<"jobs">> => list(extraction_job_metadata()), %% <<"nextToken">> => string() %% } -type list_memory_extraction_jobs_output() :: #{binary() => any()}. %% Example: %% delete_a_b_test_request() :: #{} -type delete_a_b_test_request() :: #{}. %% Example: %% tool_arguments() :: #{ %% <<"clearContext">> => [boolean()], %% <<"code">> => string(), %% <<"command">> => string(), %% <<"content">> => list(input_content_block()), %% <<"directoryPath">> => string(), %% <<"language">> => list(any()), %% <<"path">> => string(), %% <<"paths">> => list(string()), %% <<"runtime">> => list(any()), %% <<"taskId">> => string() %% } -type tool_arguments() :: #{binary() => any()}. %% Example: %% content_block() :: #{ %% <<"data">> => [binary()], %% <<"description">> => [string()], %% <<"mimeType">> => [string()], %% <<"name">> => [string()], %% <<"resource">> => resource_content(), %% <<"size">> => [float()], %% <<"text">> => [string()], %% <<"type">> => list(any()), %% <<"uri">> => [string()] %% } -type content_block() :: #{binary() => any()}. %% Example: %% coinbase_cdp_token_response_output() :: #{ %% <<"bearerToken">> => string(), %% <<"walletAuthToken">> => string() %% } -type coinbase_cdp_token_response_output() :: #{binary() => any()}. %% Example: %% list_memory_extraction_jobs_input() :: #{ %% <<"filter">> => extraction_job_filter_input(), %% <<"maxResults">> => [integer()], %% <<"nextToken">> => string() %% } -type list_memory_extraction_jobs_input() :: #{binary() => any()}. %% Example: %% payment_instrument_summary() :: #{ %% <<"createdAt">> => non_neg_integer(), %% <<"paymentConnectorId">> => string(), %% <<"paymentInstrumentId">> => string(), %% <<"paymentInstrumentType">> => list(any()), %% <<"paymentManagerArn">> => string(), %% <<"status">> => list(any()), %% <<"updatedAt">> => non_neg_integer(), %% <<"userId">> => string() %% } -type payment_instrument_summary() :: #{binary() => any()}. %% Example: %% get_browser_session_request() :: #{ %% <<"sessionId">> := string() %% } -type get_browser_session_request() :: #{binary() => any()}. %% Example: %% view_port() :: #{ %% <<"height">> => integer(), %% <<"width">> => integer() %% } -type view_port() :: #{binary() => any()}. %% Example: %% input_content_block() :: #{ %% <<"blob">> => binary(), %% <<"path">> => string(), %% <<"text">> => string() %% } -type input_content_block() :: #{binary() => any()}. %% Example: %% process_payment_request() :: #{ %% <<"agentName">> => string(), %% <<"clientToken">> => string(), %% <<"paymentInput">> := list(), %% <<"paymentInstrumentId">> := string(), %% <<"paymentManagerArn">> := string(), %% <<"paymentSessionId">> := string(), %% <<"paymentType">> := list(any()), %% <<"userId">> => string() %% } -type process_payment_request() :: #{binary() => any()}. %% Example: %% harness_message() :: #{ %% <<"content">> => list(list()), %% <<"role">> => list(any()) %% } -type harness_message() :: #{binary() => any()}. %% Example: %% delete_batch_evaluation_response() :: #{ %% <<"batchEvaluationArn">> => string(), %% <<"batchEvaluationId">> => string(), %% <<"status">> => list(any()) %% } -type delete_batch_evaluation_response() :: #{binary() => any()}. %% Example: %% batch_update_memory_records_output() :: #{ %% <<"failedRecords">> => list(memory_record_output()), %% <<"successfulRecords">> => list(memory_record_output()) %% } -type batch_update_memory_records_output() :: #{binary() => any()}. %% Example: %% get_resource_payment_token_request() :: #{ %% <<"paymentTokenRequest">> := list(), %% <<"resourceCredentialProviderName">> := string(), %% <<"workloadIdentityToken">> := string() %% } -type get_resource_payment_token_request() :: #{binary() => any()}. %% Example: %% harness_tool_result_block() :: #{ %% <<"content">> => list(list()), %% <<"status">> => list(any()), %% <<"toolUseId">> => string(), %% <<"type">> => list(any()) %% } -type harness_tool_result_block() :: #{binary() => any()}. %% Example: %% harness_tool_use_block_start() :: #{ %% <<"name">> => string(), %% <<"serverName">> => [string()], %% <<"toolUseId">> => string(), %% <<"type">> => list(any()) %% } -type harness_tool_use_block_start() :: #{binary() => any()}. %% Example: %% stop_code_interpreter_session_request() :: #{ %% <<"clientToken">> => string(), %% <<"sessionId">> := string(), %% <<"traceId">> => [string()], %% <<"traceParent">> => [string()] %% } -type stop_code_interpreter_session_request() :: #{binary() => any()}. %% Example: %% start_memory_extraction_job_input() :: #{ %% <<"clientToken">> => [string()], %% <<"extractionJob">> := extraction_job() %% } -type start_memory_extraction_job_input() :: #{binary() => any()}. %% Example: %% session_filter_config() :: #{ %% <<"endTime">> => [non_neg_integer()], %% <<"startTime">> => [non_neg_integer()] %% } -type session_filter_config() :: #{binary() => any()}. %% Example: %% cloud_watch_filter_config() :: #{ %% <<"sessionIds">> => list([string()]()), %% <<"timeRange">> => session_filter_config() %% } -type cloud_watch_filter_config() :: #{binary() => any()}. %% Example: %% key_shortcut_result() :: #{ %% <<"error">> => [string()], %% <<"status">> => list(any()) %% } -type key_shortcut_result() :: #{binary() => any()}. %% Example: %% delete_recommendation_response() :: #{ %% <<"recommendationId">> => string(), %% <<"status">> => list(any()) %% } -type delete_recommendation_response() :: #{binary() => any()}. %% Example: %% harness_inline_function_config() :: #{ %% <<"description">> => string(), %% <<"inputSchema">> => any() %% } -type harness_inline_function_config() :: #{binary() => any()}. %% Example: %% content_start_event() :: #{} -type content_start_event() :: #{}. %% Example: %% get_payment_session_response() :: #{ %% <<"paymentSession">> => payment_session() %% } -type get_payment_session_response() :: #{binary() => any()}. %% Example: %% throttled_exception() :: #{ %% <<"message">> => [string()] %% } -type throttled_exception() :: #{binary() => any()}. %% Example: %% start_browser_session_response() :: #{ %% <<"browserIdentifier">> => [string()], %% <<"createdAt">> => non_neg_integer(), %% <<"sessionId">> => string(), %% <<"streams">> => browser_session_stream() %% } -type start_browser_session_response() :: #{binary() => any()}. %% Example: %% recommendation_result_configuration_bundle() :: #{ %% <<"bundleArn">> => string(), %% <<"versionId">> => string() %% } -type recommendation_result_configuration_bundle() :: #{binary() => any()}. %% Example: %% start_browser_session_request() :: #{ %% <<"certificates">> => list(certificate()), %% <<"clientToken">> => string(), %% <<"enterprisePolicies">> => list(browser_enterprise_policy()), %% <<"extensions">> => list(browser_extension()), %% <<"name">> => string(), %% <<"profileConfiguration">> => browser_profile_configuration(), %% <<"proxyConfiguration">> => proxy_configuration(), %% <<"sessionTimeoutSeconds">> => integer(), %% <<"traceId">> => [string()], %% <<"traceParent">> => [string()], %% <<"viewPort">> => view_port() %% } -type start_browser_session_request() :: #{binary() => any()}. %% Example: %% branch_filter() :: #{ %% <<"includeParentBranches">> => [boolean()], %% <<"name">> => string() %% } -type branch_filter() :: #{binary() => any()}. %% Example: %% start_memory_extraction_job_output() :: #{ %% <<"jobId">> => [string()] %% } -type start_memory_extraction_job_output() :: #{binary() => any()}. %% Example: %% evaluation_reference_input() :: #{ %% <<"assertions">> => list(list()), %% <<"context">> => list(), %% <<"expectedResponse">> => list(), %% <<"expectedTrajectory">> => evaluation_expected_trajectory() %% } -type evaluation_reference_input() :: #{binary() => any()}. %% Example: %% create_a_b_test_request() :: #{ %% <<"clientToken">> => string(), %% <<"description">> => string(), %% <<"enableOnCreate">> => [boolean()], %% <<"evaluationConfig">> := list(), %% <<"gatewayArn">> := string(), %% <<"gatewayFilter">> => gateway_filter(), %% <<"name">> := string(), %% <<"roleArn">> := string(), %% <<"variants">> := list(variant()) %% } -type create_a_b_test_request() :: #{binary() => any()}. %% Example: %% get_resource_oauth2_token_request() :: #{ %% <<"audiences">> => list(string()), %% <<"customParameters">> => map(), %% <<"customState">> => string(), %% <<"forceAuthentication">> => [boolean()], %% <<"oauth2Flow">> := list(any()), %% <<"resourceCredentialProviderName">> := string(), %% <<"resourceOauth2ReturnUrl">> => string(), %% <<"resources">> => list(string()), %% <<"scopes">> := list(string()), %% <<"sessionUri">> => string(), %% <<"workloadIdentityToken">> := string() %% } -type get_resource_oauth2_token_request() :: #{binary() => any()}. %% Example: %% screenshot_arguments() :: #{ %% <<"format">> => list(any()) %% } -type screenshot_arguments() :: #{binary() => any()}. %% Example: %% conflict_exception() :: #{ %% <<"message">> => string() %% } -type conflict_exception() :: #{binary() => any()}. %% Example: %% resource_not_found_exception() :: #{ %% <<"message">> => string() %% } -type resource_not_found_exception() :: #{binary() => any()}. %% Example: %% list_memory_records_input() :: #{ %% <<"maxResults">> => integer(), %% <<"memoryStrategyId">> => string(), %% <<"metadataFilters">> => list(memory_metadata_filter_expression()), %% <<"namespace">> => string(), %% <<"namespacePath">> => string(), %% <<"nextToken">> => string() %% } -type list_memory_records_input() :: #{binary() => any()}. %% Example: %% amount() :: #{ %% <<"currency">> => list(any()), %% <<"value">> => [string()] %% } -type amount() :: #{binary() => any()}. %% Example: %% start_recommendation_request() :: #{ %% <<"clientToken">> => string(), %% <<"description">> => string(), %% <<"name">> := string(), %% <<"recommendationConfig">> := list(), %% <<"type">> := list(any()) %% } -type start_recommendation_request() :: #{binary() => any()}. %% Example: %% harness_token_usage() :: #{ %% <<"cacheReadInputTokens">> => [integer()], %% <<"cacheWriteInputTokens">> => [integer()], %% <<"inputTokens">> => [integer()], %% <<"outputTokens">> => [integer()], %% <<"totalTokens">> => [integer()] %% } -type harness_token_usage() :: #{binary() => any()}. %% Example: %% extraction_job_metadata() :: #{ %% <<"actorId">> => [string()], %% <<"failureReason">> => [string()], %% <<"jobID">> => [string()], %% <<"messages">> => list(), %% <<"sessionId">> => [string()], %% <<"status">> => list(any()), %% <<"strategyId">> => [string()] %% } -type extraction_job_metadata() :: #{binary() => any()}. %% Example: %% mouse_move_arguments() :: #{ %% <<"x">> => [integer()], %% <<"y">> => [integer()] %% } -type mouse_move_arguments() :: #{binary() => any()}. %% Example: %% get_payment_instrument_balance_response() :: #{ %% <<"paymentInstrumentId">> => string(), %% <<"tokenBalance">> => token_balance() %% } -type get_payment_instrument_balance_response() :: #{binary() => any()}. %% Example: %% get_event_input() :: #{} -type get_event_input() :: #{}. %% Example: %% update_a_b_test_request() :: #{ %% <<"clientToken">> => string(), %% <<"description">> => string(), %% <<"evaluationConfig">> => list(), %% <<"executionStatus">> => list(any()), %% <<"gatewayFilter">> => gateway_filter(), %% <<"name">> => string(), %% <<"roleArn">> => string(), %% <<"variants">> => list(variant()) %% } -type update_a_b_test_request() :: #{binary() => any()}. %% Example: %% get_workload_access_token_for_j_w_t_request() :: #{ %% <<"userToken">> := string(), %% <<"workloadName">> := string() %% } -type get_workload_access_token_for_j_w_t_request() :: #{binary() => any()}. %% Example: %% filter_input() :: #{ %% <<"branch">> => branch_filter(), %% <<"eventMetadata">> => list(event_metadata_filter_expression()) %% } -type filter_input() :: #{binary() => any()}. %% Example: %% tool_description_recommendation_result() :: #{ %% <<"configurationBundle">> => recommendation_result_configuration_bundle(), %% <<"errorCode">> => string(), %% <<"errorMessage">> => string(), %% <<"tools">> => list(tool_description_output()) %% } -type tool_description_recommendation_result() :: #{binary() => any()}. %% Example: %% a_b_test_summary() :: #{ %% <<"abTestArn">> => string(), %% <<"abTestId">> => string(), %% <<"createdAt">> => [non_neg_integer()], %% <<"description">> => string(), %% <<"executionStatus">> => list(any()), %% <<"gatewayArn">> => string(), %% <<"name">> => string(), %% <<"status">> => list(any()), %% <<"updatedAt">> => [non_neg_integer()] %% } -type a_b_test_summary() :: #{binary() => any()}. %% Example: %% stripe_privy_token_response_output() :: #{ %% <<"appId">> => string(), %% <<"authorizationSignature">> => string(), %% <<"basicAuthToken">> => string(), %% <<"requestExpiry">> => [float()] %% } -type stripe_privy_token_response_output() :: #{binary() => any()}. %% Example: %% delete_recommendation_request() :: #{} -type delete_recommendation_request() :: #{}. %% Example: %% registry_record_summary() :: #{ %% <<"createdAt">> => non_neg_integer(), %% <<"description">> => string(), %% <<"descriptorType">> => list(any()), %% <<"descriptors">> => descriptors(), %% <<"name">> => string(), %% <<"recordArn">> => string(), %% <<"recordId">> => string(), %% <<"registryArn">> => string(), %% <<"status">> => list(any()), %% <<"updatedAt">> => non_neg_integer(), %% <<"version">> => string() %% } -type registry_record_summary() :: #{binary() => any()}. %% Example: %% evaluator_metric() :: #{ %% <<"controlStats">> => control_stats(), %% <<"evaluatorArn">> => [string()], %% <<"variantResults">> => list(variant_result()) %% } -type evaluator_metric() :: #{binary() => any()}. %% Example: %% cloud_watch_logs_filter() :: #{ %% <<"key">> => [string()], %% <<"operator">> => list(any()), %% <<"value">> => list() %% } -type cloud_watch_logs_filter() :: #{binary() => any()}. %% Example: %% key_type_arguments() :: #{ %% <<"text">> => [string()] %% } -type key_type_arguments() :: #{binary() => any()}. %% Example: %% search_registry_records_response() :: #{ %% <<"registryRecords">> => list(registry_record_summary()) %% } -type search_registry_records_response() :: #{binary() => any()}. %% Example: %% start_code_interpreter_session_response() :: #{ %% <<"codeInterpreterIdentifier">> => [string()], %% <<"createdAt">> => non_neg_integer(), %% <<"sessionId">> => string() %% } -type start_code_interpreter_session_response() :: #{binary() => any()}. %% Example: %% get_resource_oauth2_token_response() :: #{ %% <<"accessToken">> => string(), %% <<"authorizationUrl">> => string(), %% <<"sessionStatus">> => list(any()), %% <<"sessionUri">> => string() %% } -type get_resource_oauth2_token_response() :: #{binary() => any()}. %% Example: %% update_browser_stream_response() :: #{ %% <<"browserIdentifier">> => [string()], %% <<"sessionId">> => string(), %% <<"streams">> => browser_session_stream(), %% <<"updatedAt">> => non_neg_integer() %% } -type update_browser_stream_response() :: #{binary() => any()}. %% Example: %% start_code_interpreter_session_request() :: #{ %% <<"certificates">> => list(certificate()), %% <<"clientToken">> => string(), %% <<"name">> => string(), %% <<"sessionTimeoutSeconds">> => integer(), %% <<"traceId">> => [string()], %% <<"traceParent">> => [string()] %% } -type start_code_interpreter_session_request() :: #{binary() => any()}. %% Example: %% service_quota_exceeded_exception() :: #{ %% <<"message">> => string() %% } -type service_quota_exceeded_exception() :: #{binary() => any()}. %% Example: %% harness_tool_result_block_start() :: #{ %% <<"status">> => list(any()), %% <<"toolUseId">> => string() %% } -type harness_tool_result_block_start() :: #{binary() => any()}. %% Example: %% get_agent_card_request() :: #{ %% <<"qualifier">> => [string()], %% <<"runtimeSessionId">> => string() %% } -type get_agent_card_request() :: #{binary() => any()}. %% Example: %% mouse_move_result() :: #{ %% <<"error">> => [string()], %% <<"status">> => list(any()) %% } -type mouse_move_result() :: #{binary() => any()}. %% Example: %% harness_agent_core_browser_config() :: #{ %% <<"browserArn">> => string() %% } -type harness_agent_core_browser_config() :: #{binary() => any()}. %% Example: %% memory_record_summary() :: #{ %% <<"content">> => list(), %% <<"createdAt">> => [non_neg_integer()], %% <<"memoryRecordId">> => string(), %% <<"memoryStrategyId">> => string(), %% <<"metadata">> => map(), %% <<"namespaces">> => list(string()), %% <<"score">> => [float()] %% } -type memory_record_summary() :: #{binary() => any()}. %% Example: %% list_events_output() :: #{ %% <<"events">> => list(event()), %% <<"nextToken">> => string() %% } -type list_events_output() :: #{binary() => any()}. %% Example: %% create_payment_session_response() :: #{ %% <<"paymentSession">> => payment_session() %% } -type create_payment_session_response() :: #{binary() => any()}. %% Example: %% key_type_result() :: #{ %% <<"error">> => [string()], %% <<"status">> => list(any()) %% } -type key_type_result() :: #{binary() => any()}. %% Example: %% save_browser_session_profile_request() :: #{ %% <<"browserIdentifier">> := [string()], %% <<"clientToken">> => string(), %% <<"sessionId">> := string(), %% <<"traceId">> => [string()], %% <<"traceParent">> => [string()] %% } -type save_browser_session_profile_request() :: #{binary() => any()}. %% Example: %% stop_batch_evaluation_response() :: #{ %% <<"batchEvaluationArn">> => string(), %% <<"batchEvaluationId">> => string(), %% <<"description">> => string(), %% <<"status">> => list(any()) %% } -type stop_batch_evaluation_response() :: #{binary() => any()}. %% Example: %% message_metadata() :: #{ %% <<"eventId">> => [string()], %% <<"messageIndex">> => [integer()] %% } -type message_metadata() :: #{binary() => any()}. %% Example: %% service_exception() :: #{ %% <<"message">> => [string()] %% } -type service_exception() :: #{binary() => any()}. %% Example: %% batch_create_memory_records_output() :: #{ %% <<"failedRecords">> => list(memory_record_output()), %% <<"successfulRecords">> => list(memory_record_output()) %% } -type batch_create_memory_records_output() :: #{binary() => any()}. %% Example: %% get_payment_instrument_balance_request() :: #{ %% <<"agentName">> => string(), %% <<"chain">> := list(any()), %% <<"paymentConnectorId">> := string(), %% <<"paymentInstrumentId">> := string(), %% <<"paymentManagerArn">> := string(), %% <<"token">> := list(any()), %% <<"userId">> => string() %% } -type get_payment_instrument_balance_request() :: #{binary() => any()}. %% Example: %% retrieve_memory_records_input() :: #{ %% <<"maxResults">> => integer(), %% <<"namespace">> => string(), %% <<"namespacePath">> => string(), %% <<"nextToken">> => string(), %% <<"searchCriteria">> := search_criteria() %% } -type retrieve_memory_records_input() :: #{binary() => any()}. %% Example: %% invoke_agent_runtime_command_request() :: #{ %% <<"accept">> => string(), %% <<"accountId">> => [string()], %% <<"baggage">> => [string()], %% <<"body">> := invoke_agent_runtime_command_request_body(), %% <<"contentType">> => string(), %% <<"qualifier">> => [string()], %% <<"runtimeSessionId">> => string(), %% <<"traceId">> => [string()], %% <<"traceParent">> => [string()], %% <<"traceState">> => [string()] %% } -type invoke_agent_runtime_command_request() :: #{binary() => any()}. %% Example: %% invalid_input_exception() :: #{ %% <<"message">> => [string()] %% } -type invalid_input_exception() :: #{binary() => any()}. %% Example: %% gateway_filter() :: #{ %% <<"targetPaths">> => list(string()) %% } -type gateway_filter() :: #{binary() => any()}. %% Example: %% get_code_interpreter_session_request() :: #{ %% <<"sessionId">> := string() %% } -type get_code_interpreter_session_request() :: #{binary() => any()}. %% Example: %% configuration_bundle_tool_entry() :: #{ %% <<"toolDescriptionJsonPath">> => [string()], %% <<"toolName">> => string() %% } -type configuration_bundle_tool_entry() :: #{binary() => any()}. %% Example: %% stripe_privy_token_request_input() :: #{ %% <<"includeAuthorizationSignature">> => [boolean()], %% <<"requestBody">> => string(), %% <<"requestHost">> => string(), %% <<"requestPath">> => string() %% } -type stripe_privy_token_request_input() :: #{binary() => any()}. %% Example: %% browser_session_summary() :: #{ %% <<"browserIdentifier">> => [string()], %% <<"createdAt">> => non_neg_integer(), %% <<"lastUpdatedAt">> => non_neg_integer(), %% <<"name">> => string(), %% <<"sessionId">> => string(), %% <<"status">> => list(any()) %% } -type browser_session_summary() :: #{binary() => any()}. %% Example: %% response_chunk() :: #{ %% <<"contentDelta">> => content_delta_event(), %% <<"contentStart">> => content_start_event(), %% <<"contentStop">> => content_stop_event() %% } -type response_chunk() :: #{binary() => any()}. %% Example: %% validation_exception_field() :: #{ %% <<"message">> => [string()], %% <<"name">> => [string()] %% } -type validation_exception_field() :: #{binary() => any()}. %% Example: %% stop_browser_session_response() :: #{ %% <<"browserIdentifier">> => [string()], %% <<"lastUpdatedAt">> => non_neg_integer(), %% <<"sessionId">> => string() %% } -type stop_browser_session_response() :: #{binary() => any()}. %% Example: %% harness_gemini_model_config() :: #{ %% <<"apiKeyArn">> => string(), %% <<"maxTokens">> => integer(), %% <<"modelId">> => string(), %% <<"temperature">> => float(), %% <<"topK">> => integer(), %% <<"topP">> => float() %% } -type harness_gemini_model_config() :: #{binary() => any()}. %% Example: %% invoke_harness_request() :: #{ %% <<"actorId">> => [string()], %% <<"allowedTools">> => list(string()), %% <<"harnessArn">> := string(), %% <<"maxIterations">> => [integer()], %% <<"maxTokens">> => [integer()], %% <<"messages">> := list(harness_message()), %% <<"model">> => list(), %% <<"runtimeSessionId">> := string(), %% <<"runtimeUserId">> => [string()], %% <<"skills">> => list(list()), %% <<"systemPrompt">> => list(list()), %% <<"timeoutSeconds">> => [integer()], %% <<"tools">> => list(harness_tool()) %% } -type invoke_harness_request() :: #{binary() => any()}. %% Example: %% key_press_arguments() :: #{ %% <<"key">> => [string()], %% <<"presses">> => [integer()] %% } -type key_press_arguments() :: #{binary() => any()}. %% Example: %% harness_content_block_delta_event() :: #{ %% <<"contentBlockIndex">> => [integer()], %% <<"delta">> => list() %% } -type harness_content_block_delta_event() :: #{binary() => any()}. %% Example: %% tool_result_structured_content() :: #{ %% <<"executionTime">> => [float()], %% <<"exitCode">> => [integer()], %% <<"stderr">> => [string()], %% <<"stdout">> => [string()], %% <<"taskId">> => [string()], %% <<"taskStatus">> => list(any()) %% } -type tool_result_structured_content() :: #{binary() => any()}. %% Example: %% cloud_watch_logs_source() :: #{ %% <<"filterConfig">> => cloud_watch_filter_config(), %% <<"logGroupNames">> => list([string()]()), %% <<"serviceNames">> => list([string()]()) %% } -type cloud_watch_logs_source() :: #{binary() => any()}. %% Example: %% get_a_b_test_response() :: #{ %% <<"abTestArn">> => string(), %% <<"abTestId">> => string(), %% <<"createdAt">> => [non_neg_integer()], %% <<"currentRunId">> => [string()], %% <<"description">> => string(), %% <<"errorDetails">> => list([string()]()), %% <<"evaluationConfig">> => list(), %% <<"executionStatus">> => list(any()), %% <<"gatewayArn">> => string(), %% <<"gatewayFilter">> => gateway_filter(), %% <<"maxDurationExpiresAt">> => [non_neg_integer()], %% <<"name">> => string(), %% <<"results">> => a_b_test_results(), %% <<"roleArn">> => string(), %% <<"startedAt">> => [non_neg_integer()], %% <<"status">> => list(any()), %% <<"stoppedAt">> => [non_neg_integer()], %% <<"updatedAt">> => [non_neg_integer()], %% <<"variants">> => list(variant()) %% } -type get_a_b_test_response() :: #{binary() => any()}. %% Example: %% harness_metadata_event() :: #{ %% <<"metrics">> => harness_stream_metrics(), %% <<"usage">> => harness_token_usage() %% } -type harness_metadata_event() :: #{binary() => any()}. %% Example: %% harness_skill_git_auth() :: #{ %% <<"credentialArn">> => string(), %% <<"username">> => [string()] %% } -type harness_skill_git_auth() :: #{binary() => any()}. %% Example: %% harness_content_block_stop_event() :: #{ %% <<"contentBlockIndex">> => [integer()] %% } -type harness_content_block_stop_event() :: #{binary() => any()}. %% Example: %% s3_location() :: #{ %% <<"bucket">> => [string()], %% <<"prefix">> => [string()], %% <<"versionId">> => [string()] %% } -type s3_location() :: #{binary() => any()}. %% Example: %% o_auth2_authentication() :: #{ %% <<"emailAddress">> => string(), %% <<"name">> => [string()], %% <<"sub">> => [string()], %% <<"username">> => [string()] %% } -type o_auth2_authentication() :: #{binary() => any()}. %% Example: %% basic_auth() :: #{ %% <<"secretArn">> => string() %% } -type basic_auth() :: #{binary() => any()}. %% Example: %% list_a_b_tests_response() :: #{ %% <<"abTests">> => list(a_b_test_summary()), %% <<"nextToken">> => [string()] %% } -type list_a_b_tests_response() :: #{binary() => any()}. %% Example: %% system_prompt_recommendation_config() :: #{ %% <<"agentTraces">> => list(), %% <<"evaluationConfig">> => recommendation_evaluation_config(), %% <<"systemPrompt">> => list() %% } -type system_prompt_recommendation_config() :: #{binary() => any()}. %% Example: %% proxy_bypass() :: #{ %% <<"domainPatterns">> => list(string()) %% } -type proxy_bypass() :: #{binary() => any()}. %% Example: %% tools_definition() :: #{ %% <<"inlineContent">> => string(), %% <<"protocolVersion">> => string() %% } -type tools_definition() :: #{binary() => any()}. %% Example: %% o_auth_credential_provider() :: #{ %% <<"customParameters">> => map(), %% <<"defaultReturnUrl">> => string(), %% <<"grantType">> => list(any()), %% <<"providerArn">> => string(), %% <<"scopes">> => list(string()) %% } -type o_auth_credential_provider() :: #{binary() => any()}. %% Example: %% save_browser_session_profile_response() :: #{ %% <<"browserIdentifier">> => [string()], %% <<"lastUpdatedAt">> => non_neg_integer(), %% <<"profileIdentifier">> => string(), %% <<"sessionId">> => string() %% } -type save_browser_session_profile_response() :: #{binary() => any()}. %% Example: %% delete_event_output() :: #{ %% <<"eventId">> => string() %% } -type delete_event_output() :: #{binary() => any()}. %% Example: %% span_context() :: #{ %% <<"sessionId">> => [string()], %% <<"spanId">> => [string()], %% <<"traceId">> => [string()] %% } -type span_context() :: #{binary() => any()}. %% Example: %% evaluate_response() :: #{ %% <<"evaluationResults">> => list(evaluation_result_content()) %% } -type evaluate_response() :: #{binary() => any()}. %% Example: %% get_memory_record_input() :: #{} -type get_memory_record_input() :: #{}. %% Example: %% server_definition() :: #{ %% <<"inlineContent">> => string(), %% <<"schemaVersion">> => string() %% } -type server_definition() :: #{binary() => any()}. %% Example: %% get_workload_access_token_for_user_id_request() :: #{ %% <<"userId">> := string(), %% <<"workloadName">> := string() %% } -type get_workload_access_token_for_user_id_request() :: #{binary() => any()}. %% Example: %% delete_batch_evaluation_request() :: #{} -type delete_batch_evaluation_request() :: #{}. %% Example: %% mcp_descriptor() :: #{ %% <<"server">> => server_definition(), %% <<"tools">> => tools_definition() %% } -type mcp_descriptor() :: #{binary() => any()}. %% Example: %% harness_tool() :: #{ %% <<"config">> => list(), %% <<"name">> => string(), %% <<"type">> => list(any()) %% } -type harness_tool() :: #{binary() => any()}. %% Example: %% internal_server_exception() :: #{ %% <<"message">> => string() %% } -type internal_server_exception() :: #{binary() => any()}. %% Example: %% configuration_bundle_ref() :: #{ %% <<"bundleArn">> => string(), %% <<"bundleVersion">> => string() %% } -type configuration_bundle_ref() :: #{binary() => any()}. %% Example: %% get_memory_record_output() :: #{ %% <<"memoryRecord">> => memory_record() %% } -type get_memory_record_output() :: #{binary() => any()}. %% Example: %% harness_tool_use_block() :: #{ %% <<"input">> => any(), %% <<"name">> => string(), %% <<"serverName">> => [string()], %% <<"toolUseId">> => string(), %% <<"type">> => list(any()) %% } -type harness_tool_use_block() :: #{binary() => any()}. %% Example: %% search_registry_records_request() :: #{ %% <<"filters">> => any(), %% <<"maxResults">> => [integer()], %% <<"registryIds">> := list(string()), %% <<"searchQuery">> := [string()] %% } -type search_registry_records_request() :: #{binary() => any()}. %% Example: %% list_payment_sessions_response() :: #{ %% <<"nextToken">> => string(), %% <<"paymentSessions">> => list(payment_session_summary()) %% } -type list_payment_sessions_response() :: #{binary() => any()}. %% Example: %% stop_runtime_session_request() :: #{ %% <<"clientToken">> => string(), %% <<"qualifier">> => [string()], %% <<"runtimeSessionId">> := string() %% } -type stop_runtime_session_request() :: #{binary() => any()}. %% Example: %% certificate() :: #{ %% <<"location">> => list() %% } -type certificate() :: #{binary() => any()}. %% Example: %% get_batch_evaluation_request() :: #{} -type get_batch_evaluation_request() :: #{}. %% Example: %% tool_description_text_input() :: #{ %% <<"tools">> => list(tool_description_input()) %% } -type tool_description_text_input() :: #{binary() => any()}. %% Example: %% get_resource_payment_token_response() :: #{ %% <<"paymentTokenResponse">> => list() %% } -type get_resource_payment_token_response() :: #{binary() => any()}. %% Example: %% session_filter() :: #{ %% <<"eventFilter">> => list(any()) %% } -type session_filter() :: #{binary() => any()}. %% Example: %% event() :: #{ %% <<"actorId">> => string(), %% <<"branch">> => branch(), %% <<"eventId">> => string(), %% <<"eventTimestamp">> => [non_neg_integer()], %% <<"memoryId">> => string(), %% <<"metadata">> => map(), %% <<"payload">> => list(list()), %% <<"sessionId">> => string() %% } -type event() :: #{binary() => any()}. %% Example: %% screenshot_result() :: #{ %% <<"data">> => [binary()], %% <<"error">> => [string()], %% <<"status">> => list(any()) %% } -type screenshot_result() :: #{binary() => any()}. %% Example: %% list_events_input() :: #{ %% <<"filter">> => filter_input(), %% <<"includePayloads">> => [boolean()], %% <<"maxResults">> => integer(), %% <<"nextToken">> => string() %% } -type list_events_input() :: #{binary() => any()}. %% Example: %% skill_definition() :: #{ %% <<"inlineContent">> => string(), %% <<"schemaVersion">> => string() %% } -type skill_definition() :: #{binary() => any()}. %% Example: %% harness_message_stop_event() :: #{ %% <<"stopReason">> => list(any()) %% } -type harness_message_stop_event() :: #{binary() => any()}. %% Example: %% memory_record() :: #{ %% <<"content">> => list(), %% <<"createdAt">> => [non_neg_integer()], %% <<"memoryRecordId">> => string(), %% <<"memoryStrategyId">> => string(), %% <<"metadata">> => map(), %% <<"namespaces">> => list(string()) %% } -type memory_record() :: #{binary() => any()}. %% Example: %% harness_message_start_event() :: #{ %% <<"role">> => list(any()) %% } -type harness_message_start_event() :: #{binary() => any()}. %% Example: %% create_event_input() :: #{ %% <<"actorId">> := string(), %% <<"branch">> => branch(), %% <<"clientToken">> => [string()], %% <<"eventTimestamp">> := [non_neg_integer()], %% <<"metadata">> => map(), %% <<"payload">> := list(list()), %% <<"sessionId">> => string() %% } -type create_event_input() :: #{binary() => any()}. %% Example: %% confidence_interval() :: #{ %% <<"lower">> => [float()], %% <<"upper">> => [float()] %% } -type confidence_interval() :: #{binary() => any()}. %% Example: %% list_batch_evaluations_request() :: #{ %% <<"maxResults">> => [integer()], %% <<"nextToken">> => [string()] %% } -type list_batch_evaluations_request() :: #{binary() => any()}. %% Example: %% harness_reasoning_text_block() :: #{ %% <<"signature">> => [string()], %% <<"text">> => [string()] %% } -type harness_reasoning_text_block() :: #{binary() => any()}. %% Example: %% delete_payment_instrument_request() :: #{ %% <<"paymentConnectorId">> := string(), %% <<"paymentInstrumentId">> := string(), %% <<"paymentManagerArn">> := string(), %% <<"userId">> => string() %% } -type delete_payment_instrument_request() :: #{binary() => any()}. %% Example: %% start_batch_evaluation_request() :: #{ %% <<"batchEvaluationName">> := string(), %% <<"clientToken">> => string(), %% <<"dataSourceConfig">> := list(), %% <<"description">> => string(), %% <<"evaluationMetadata">> => list(), %% <<"evaluators">> => list(evaluator()) %% } -type start_batch_evaluation_request() :: #{binary() => any()}. %% Example: %% delete_payment_session_request() :: #{ %% <<"paymentManagerArn">> := string(), %% <<"paymentSessionId">> := string(), %% <<"userId">> => string() %% } -type delete_payment_session_request() :: #{binary() => any()}. %% Example: %% access_denied_exception() :: #{ %% <<"message">> => string() %% } -type access_denied_exception() :: #{binary() => any()}. %% Example: %% token_usage() :: #{ %% <<"inputTokens">> => [integer()], %% <<"outputTokens">> => [integer()], %% <<"totalTokens">> => [integer()] %% } -type token_usage() :: #{binary() => any()}. %% Example: %% invoke_agent_runtime_response() :: #{ %% <<"baggage">> => [string()], %% <<"contentType">> => [string()], %% <<"mcpProtocolVersion">> => [string()], %% <<"mcpSessionId">> => string(), %% <<"response">> => binary(), %% <<"runtimeSessionId">> => string(), %% <<"statusCode">> => integer(), %% <<"traceId">> => [string()], %% <<"traceParent">> => [string()], %% <<"traceState">> => [string()] %% } -type invoke_agent_runtime_response() :: #{binary() => any()}. %% Example: %% mouse_click_arguments() :: #{ %% <<"button">> => list(any()), %% <<"clickCount">> => [integer()], %% <<"x">> => [integer()], %% <<"y">> => [integer()] %% } -type mouse_click_arguments() :: #{binary() => any()}. %% Example: %% secrets_manager_location() :: #{ %% <<"secretArn">> => string() %% } -type secrets_manager_location() :: #{binary() => any()}. %% Example: %% harness_tool_use_block_delta() :: #{ %% <<"input">> => string() %% } -type harness_tool_use_block_delta() :: #{binary() => any()}. %% Example: %% session_metadata_shape() :: #{ %% <<"groundTruth">> => list(), %% <<"metadata">> => map(), %% <<"sessionId">> => [string()], %% <<"testScenarioId">> => [string()] %% } -type session_metadata_shape() :: #{binary() => any()}. %% Example: %% embedded_crypto_wallet() :: #{ %% <<"linkedAccounts">> => list(list()), %% <<"network">> => list(any()), %% <<"redirectUrl">> => [string()], %% <<"walletAddress">> => [string()] %% } -type embedded_crypto_wallet() :: #{binary() => any()}. %% Example: %% evaluator() :: #{ %% <<"evaluatorId">> => string() %% } -type evaluator() :: #{binary() => any()}. %% Example: %% invoke_agent_runtime_request() :: #{ %% <<"accept">> => string(), %% <<"accountId">> => [string()], %% <<"baggage">> => [string()], %% <<"contentType">> => string(), %% <<"mcpProtocolVersion">> => string(), %% <<"mcpSessionId">> => string(), %% <<"payload">> := binary(), %% <<"qualifier">> => [string()], %% <<"runtimeSessionId">> => string(), %% <<"runtimeUserId">> => string(), %% <<"traceId">> => [string()], %% <<"traceParent">> => [string()], %% <<"traceState">> => [string()] %% } -type invoke_agent_runtime_request() :: #{binary() => any()}. %% Example: %% harness_lite_llm_model_config() :: #{ %% <<"additionalParams">> => [any()], %% <<"apiBase">> => string(), %% <<"apiKeyArn">> => string(), %% <<"maxTokens">> => integer(), %% <<"modelId">> => string(), %% <<"temperature">> => float(), %% <<"topP">> => float() %% } -type harness_lite_llm_model_config() :: #{binary() => any()}. %% Example: %% validation_exception() :: #{ %% <<"fieldList">> => list(validation_exception_field()), %% <<"message">> => [string()], %% <<"reason">> => list(any()) %% } -type validation_exception() :: #{binary() => any()}. %% Example: %% get_browser_session_response() :: #{ %% <<"browserIdentifier">> => [string()], %% <<"certificates">> => list(certificate()), %% <<"createdAt">> => non_neg_integer(), %% <<"enterprisePolicies">> => list(browser_enterprise_policy()), %% <<"extensions">> => list(browser_extension()), %% <<"lastUpdatedAt">> => non_neg_integer(), %% <<"name">> => string(), %% <<"profileConfiguration">> => browser_profile_configuration(), %% <<"proxyConfiguration">> => proxy_configuration(), %% <<"sessionId">> => string(), %% <<"sessionReplayArtifact">> => [string()], %% <<"sessionTimeoutSeconds">> => integer(), %% <<"status">> => list(any()), %% <<"streams">> => browser_session_stream(), %% <<"viewPort">> => view_port() %% } -type get_browser_session_response() :: #{binary() => any()}. %% Example: %% key_shortcut_arguments() :: #{ %% <<"keys">> => list([string()]()) %% } -type key_shortcut_arguments() :: #{binary() => any()}. %% Example: %% complete_resource_token_auth_response() :: #{} -type complete_resource_token_auth_response() :: #{}. %% Example: %% memory_record_delete_input() :: #{ %% <<"memoryRecordId">> => string() %% } -type memory_record_delete_input() :: #{binary() => any()}. %% Example: %% resource_content() :: #{ %% <<"blob">> => [binary()], %% <<"mimeType">> => [string()], %% <<"text">> => [string()], %% <<"type">> => list(any()), %% <<"uri">> => [string()] %% } -type resource_content() :: #{binary() => any()}. %% Example: %% harness_bedrock_model_config() :: #{ %% <<"additionalParams">> => [any()], %% <<"apiFormat">> => list(any()), %% <<"maxTokens">> => integer(), %% <<"modelId">> => string(), %% <<"temperature">> => float(), %% <<"topP">> => float() %% } -type harness_bedrock_model_config() :: #{binary() => any()}. %% Example: %% variant_result() :: #{ %% <<"absoluteChange">> => [float()], %% <<"confidenceInterval">> => confidence_interval(), %% <<"isSignificant">> => [boolean()], %% <<"mean">> => [float()], %% <<"pValue">> => [float()], %% <<"percentChange">> => [float()], %% <<"sampleSize">> => [integer()], %% <<"variantName">> => [string()] %% } -type variant_result() :: #{binary() => any()}. %% Example: %% throttling_exception() :: #{ %% <<"message">> => string() %% } -type throttling_exception() :: #{binary() => any()}. %% Example: %% token_balance() :: #{ %% <<"amount">> => [string()], %% <<"chain">> => list(any()), %% <<"decimals">> => [integer()], %% <<"network">> => list(any()), %% <<"token">> => list(any()) %% } -type token_balance() :: #{binary() => any()}. %% Example: %% list_browser_sessions_response() :: #{ %% <<"items">> => list(browser_session_summary()), %% <<"nextToken">> => string() %% } -type list_browser_sessions_response() :: #{binary() => any()}. %% Example: %% browser_extension() :: #{ %% <<"location">> => list() %% } -type browser_extension() :: #{binary() => any()}. %% Example: %% harness_open_ai_model_config() :: #{ %% <<"additionalParams">> => [any()], %% <<"apiFormat">> => list(any()), %% <<"apiKeyArn">> => string(), %% <<"maxTokens">> => integer(), %% <<"modelId">> => string(), %% <<"temperature">> => float(), %% <<"topP">> => float() %% } -type harness_open_ai_model_config() :: #{binary() => any()}. %% Example: %% mouse_scroll_arguments() :: #{ %% <<"deltaX">> => [integer()], %% <<"deltaY">> => [integer()], %% <<"x">> => [integer()], %% <<"y">> => [integer()] %% } -type mouse_scroll_arguments() :: #{binary() => any()}. %% Example: %% system_prompt_configuration_bundle() :: #{ %% <<"bundleArn">> => string(), %% <<"systemPromptJsonPath">> => [string()], %% <<"versionId">> => string() %% } -type system_prompt_configuration_bundle() :: #{binary() => any()}. %% Example: %% crypto_x402_payment_input() :: #{ %% <<"payload">> => any(), %% <<"version">> => [string()] %% } -type crypto_x402_payment_input() :: #{binary() => any()}. %% Example: %% stop_code_interpreter_session_response() :: #{ %% <<"codeInterpreterIdentifier">> => [string()], %% <<"lastUpdatedAt">> => non_neg_integer(), %% <<"sessionId">> => string() %% } -type stop_code_interpreter_session_response() :: #{binary() => any()}. %% Example: %% delete_a_b_test_response() :: #{ %% <<"abTestArn">> => string(), %% <<"abTestId">> => string(), %% <<"status">> => list(any()) %% } -type delete_a_b_test_response() :: #{binary() => any()}. %% Example: %% cloud_watch_logs_rule() :: #{ %% <<"filters">> => list(cloud_watch_logs_filter()) %% } -type cloud_watch_logs_rule() :: #{binary() => any()}. %% Example: %% coinbase_cdp_token_request_input() :: #{ %% <<"includeWalletAuthToken">> => [boolean()], %% <<"requestBody">> => string(), %% <<"requestHost">> => string(), %% <<"requestMethod">> => list(any()), %% <<"requestPath">> => string() %% } -type coinbase_cdp_token_request_input() :: #{binary() => any()}. %% Example: %% get_event_output() :: #{ %% <<"event">> => event() %% } -type get_event_output() :: #{binary() => any()}. %% Example: %% get_agent_card_response() :: #{ %% <<"agentCard">> => any(), %% <<"runtimeSessionId">> => string(), %% <<"statusCode">> => integer() %% } -type get_agent_card_response() :: #{binary() => any()}. %% Example: %% system_prompt_recommendation_result() :: #{ %% <<"configurationBundle">> => recommendation_result_configuration_bundle(), %% <<"errorCode">> => string(), %% <<"errorMessage">> => string(), %% <<"recommendedSystemPrompt">> => string() %% } -type system_prompt_recommendation_result() :: #{binary() => any()}. %% Example: %% start_batch_evaluation_response() :: #{ %% <<"batchEvaluationArn">> => string(), %% <<"batchEvaluationId">> => string(), %% <<"batchEvaluationName">> => string(), %% <<"createdAt">> => [non_neg_integer()], %% <<"description">> => string(), %% <<"evaluators">> => list(evaluator()), %% <<"outputConfig">> => list(), %% <<"status">> => list(any()) %% } -type start_batch_evaluation_response() :: #{binary() => any()}. %% Example: %% tool_description_configuration_bundle() :: #{ %% <<"bundleArn">> => string(), %% <<"tools">> => list(configuration_bundle_tool_entry()), %% <<"versionId">> => string() %% } -type tool_description_configuration_bundle() :: #{binary() => any()}. %% Example: %% evaluation_expected_trajectory() :: #{ %% <<"toolNames">> => list(string()) %% } -type evaluation_expected_trajectory() :: #{binary() => any()}. %% Example: %% list_sessions_output() :: #{ %% <<"nextToken">> => string(), %% <<"sessionSummaries">> => list(session_summary()) %% } -type list_sessions_output() :: #{binary() => any()}. %% Example: %% evaluation_job_results() :: #{ %% <<"evaluatorSummaries">> => list(evaluator_summary()), %% <<"numberOfSessionsCompleted">> => [integer()], %% <<"numberOfSessionsFailed">> => [integer()], %% <<"numberOfSessionsIgnored">> => [integer()], %% <<"numberOfSessionsInProgress">> => [integer()], %% <<"totalNumberOfSessions">> => [integer()] %% } -type evaluation_job_results() :: #{binary() => any()}. %% Example: %% agent_card_definition() :: #{ %% <<"inlineContent">> => string(), %% <<"schemaVersion">> => string() %% } -type agent_card_definition() :: #{binary() => any()}. %% Example: %% list_a_b_tests_request() :: #{ %% <<"maxResults">> => [integer()], %% <<"nextToken">> => [string()] %% } -type list_a_b_tests_request() :: #{binary() => any()}. %% Example: %% get_code_interpreter_session_response() :: #{ %% <<"certificates">> => list(certificate()), %% <<"codeInterpreterIdentifier">> => [string()], %% <<"createdAt">> => non_neg_integer(), %% <<"name">> => string(), %% <<"sessionId">> => string(), %% <<"sessionTimeoutSeconds">> => integer(), %% <<"status">> => list(any()) %% } -type get_code_interpreter_session_response() :: #{binary() => any()}. %% Example: %% invoke_harness_response() :: #{ %% <<"stream">> => list() %% } -type invoke_harness_response() :: #{binary() => any()}. %% Example: %% get_payment_instrument_response() :: #{ %% <<"paymentInstrument">> => payment_instrument() %% } -type get_payment_instrument_response() :: #{binary() => any()}. %% Example: %% list_actors_output() :: #{ %% <<"actorSummaries">> => list(actor_summary()), %% <<"nextToken">> => string() %% } -type list_actors_output() :: #{binary() => any()}. %% Example: %% get_workload_access_token_for_user_id_response() :: #{ %% <<"workloadAccessToken">> => string() %% } -type get_workload_access_token_for_user_id_response() :: #{binary() => any()}. %% Example: %% list_payment_instruments_request() :: #{ %% <<"agentName">> => string(), %% <<"maxResults">> => [integer()], %% <<"nextToken">> => string(), %% <<"paymentConnectorId">> => string(), %% <<"paymentManagerArn">> := string(), %% <<"userId">> => string() %% } -type list_payment_instruments_request() :: #{binary() => any()}. %% Example: %% recommendation_summary() :: #{ %% <<"createdAt">> => [non_neg_integer()], %% <<"description">> => string(), %% <<"name">> => string(), %% <<"recommendationArn">> => string(), %% <<"recommendationId">> => string(), %% <<"status">> => list(any()), %% <<"type">> => list(any()), %% <<"updatedAt">> => [non_neg_integer()] %% } -type recommendation_summary() :: #{binary() => any()}. %% Example: %% delete_event_input() :: #{} -type delete_event_input() :: #{}. %% Example: %% linked_account_email() :: #{ %% <<"emailAddress">> => string() %% } -type linked_account_email() :: #{binary() => any()}. %% Example: %% list_code_interpreter_sessions_request() :: #{ %% <<"maxResults">> => integer(), %% <<"nextToken">> => string(), %% <<"status">> => list(any()) %% } -type list_code_interpreter_sessions_request() :: #{binary() => any()}. %% Example: %% automation_stream_update() :: #{ %% <<"streamStatus">> => list(any()) %% } -type automation_stream_update() :: #{binary() => any()}. %% Example: %% code_interpreter_result() :: #{ %% <<"content">> => list(content_block()), %% <<"isError">> => [boolean()], %% <<"structuredContent">> => tool_result_structured_content() %% } -type code_interpreter_result() :: #{binary() => any()}. %% Example: %% skill_md_definition() :: #{ %% <<"inlineContent">> => string() %% } -type skill_md_definition() :: #{binary() => any()}. %% Example: %% get_payment_instrument_request() :: #{ %% <<"agentName">> => string(), %% <<"paymentConnectorId">> => string(), %% <<"paymentInstrumentId">> := string(), %% <<"paymentManagerArn">> := string(), %% <<"userId">> => string() %% } -type get_payment_instrument_request() :: #{binary() => any()}. %% Example: %% harness_stream_metrics() :: #{ %% <<"latencyMs">> => [float()] %% } -type harness_stream_metrics() :: #{binary() => any()}. %% Example: %% evaluate_request() :: #{ %% <<"evaluationInput">> := list(), %% <<"evaluationReferenceInputs">> => list(evaluation_reference_input()), %% <<"evaluationTarget">> => list() %% } -type evaluate_request() :: #{binary() => any()}. %% Example: %% get_resource_api_key_response() :: #{ %% <<"apiKey">> => string() %% } -type get_resource_api_key_response() :: #{binary() => any()}. %% Example: %% process_payment_response() :: #{ %% <<"createdAt">> => non_neg_integer(), %% <<"paymentInstrumentId">> => string(), %% <<"paymentManagerArn">> => string(), %% <<"paymentOutput">> => list(), %% <<"paymentSessionId">> => string(), %% <<"paymentType">> => list(any()), %% <<"processPaymentId">> => string(), %% <<"status">> => list(any()), %% <<"updatedAt">> => non_neg_integer() %% } -type process_payment_response() :: #{binary() => any()}. %% Example: %% invoke_code_interpreter_response() :: #{ %% <<"sessionId">> => string(), %% <<"stream">> => list() %% } -type invoke_code_interpreter_response() :: #{binary() => any()}. %% Example: %% list_recommendations_response() :: #{ %% <<"nextToken">> => string(), %% <<"recommendationSummaries">> => list(recommendation_summary()) %% } -type list_recommendations_response() :: #{binary() => any()}. %% Example: %% content_delta_event() :: #{ %% <<"stderr">> => [string()], %% <<"stdout">> => [string()] %% } -type content_delta_event() :: #{binary() => any()}. %% Example: %% browser_session_stream() :: #{ %% <<"automationStream">> => automation_stream(), %% <<"liveViewStream">> => live_view_stream() %% } -type browser_session_stream() :: #{binary() => any()}. %% Example: %% actor_summary() :: #{ %% <<"actorId">> => string() %% } -type actor_summary() :: #{binary() => any()}. %% Example: %% descriptors() :: #{ %% <<"a2a">> => a2a_descriptor(), %% <<"agentSkills">> => agent_skills_descriptor(), %% <<"custom">> => custom_descriptor(), %% <<"mcp">> => mcp_descriptor() %% } -type descriptors() :: #{binary() => any()}. %% Example: %% create_event_output() :: #{ %% <<"event">> => event() %% } -type create_event_output() :: #{binary() => any()}. %% Example: %% available_limits() :: #{ %% <<"availableSpendAmount">> => amount(), %% <<"updatedAt">> => non_neg_integer() %% } -type available_limits() :: #{binary() => any()}. %% Example: %% search_criteria() :: #{ %% <<"memoryStrategyId">> => string(), %% <<"metadataFilters">> => list(memory_metadata_filter_expression()), %% <<"searchQuery">> => string(), %% <<"topK">> => [integer()] %% } -type search_criteria() :: #{binary() => any()}. %% Example: %% create_payment_session_request() :: #{ %% <<"agentName">> => string(), %% <<"clientToken">> => string(), %% <<"expiryTimeInMinutes">> := [integer()], %% <<"limits">> => session_limits(), %% <<"paymentManagerArn">> := string(), %% <<"userId">> => string() %% } -type create_payment_session_request() :: #{binary() => any()}. %% Example: %% list_payment_sessions_request() :: #{ %% <<"agentName">> => string(), %% <<"maxResults">> => [integer()], %% <<"nextToken">> => string(), %% <<"paymentManagerArn">> := string(), %% <<"userId">> => string() %% } -type list_payment_sessions_request() :: #{binary() => any()}. %% Example: %% list_code_interpreter_sessions_response() :: #{ %% <<"items">> => list(code_interpreter_session_summary()), %% <<"nextToken">> => string() %% } -type list_code_interpreter_sessions_response() :: #{binary() => any()}. %% Example: %% update_browser_stream_request() :: #{ %% <<"clientToken">> => string(), %% <<"sessionId">> := string(), %% <<"streamUpdate">> := list() %% } -type update_browser_stream_request() :: #{binary() => any()}. %% Example: %% delete_payment_session_response() :: #{ %% <<"status">> => list(any()) %% } -type delete_payment_session_response() :: #{binary() => any()}. %% Example: %% batch_evaluation_summary() :: #{ %% <<"batchEvaluationArn">> => string(), %% <<"batchEvaluationId">> => string(), %% <<"batchEvaluationName">> => string(), %% <<"createdAt">> => [non_neg_integer()], %% <<"description">> => string(), %% <<"errorDetails">> => list([string()]()), %% <<"evaluationResults">> => evaluation_job_results(), %% <<"evaluators">> => list(evaluator()), %% <<"status">> => list(any()), %% <<"updatedAt">> => [non_neg_integer()] %% } -type batch_evaluation_summary() :: #{binary() => any()}. %% Example: %% get_a_b_test_request() :: #{} -type get_a_b_test_request() :: #{}. %% Example: %% get_recommendation_response() :: #{ %% <<"createdAt">> => [non_neg_integer()], %% <<"description">> => string(), %% <<"name">> => string(), %% <<"recommendationArn">> => string(), %% <<"recommendationConfig">> => list(), %% <<"recommendationId">> => string(), %% <<"recommendationResult">> => list(), %% <<"status">> => list(any()), %% <<"type">> => list(any()), %% <<"updatedAt">> => [non_neg_integer()] %% } -type get_recommendation_response() :: #{binary() => any()}. %% Example: %% tool_description_recommendation_config() :: #{ %% <<"agentTraces">> => list(), %% <<"toolDescription">> => list() %% } -type tool_description_recommendation_config() :: #{binary() => any()}. %% Example: %% linked_account_sms() :: #{ %% <<"phoneNumber">> => string() %% } -type linked_account_sms() :: #{binary() => any()}. %% Example: %% agent_skills_descriptor() :: #{ %% <<"skillDefinition">> => skill_definition(), %% <<"skillMd">> => skill_md_definition() %% } -type agent_skills_descriptor() :: #{binary() => any()}. %% Example: %% list_memory_records_output() :: #{ %% <<"memoryRecordSummaries">> => list(memory_record_summary()), %% <<"nextToken">> => string() %% } -type list_memory_records_output() :: #{binary() => any()}. %% Example: %% delete_memory_record_output() :: #{ %% <<"memoryRecordId">> => string() %% } -type delete_memory_record_output() :: #{binary() => any()}. %% Example: %% crypto_x402_payment_output() :: #{ %% <<"payload">> => any(), %% <<"version">> => [string()] %% } -type crypto_x402_payment_output() :: #{binary() => any()}. %% Example: %% target_ref() :: #{ %% <<"name">> => string() %% } -type target_ref() :: #{binary() => any()}. %% Example: %% harness_agent_core_code_interpreter_config() :: #{ %% <<"codeInterpreterArn">> => string() %% } -type harness_agent_core_code_interpreter_config() :: #{binary() => any()}. %% Example: %% create_payment_instrument_response() :: #{ %% <<"paymentInstrument">> => payment_instrument() %% } -type create_payment_instrument_response() :: #{binary() => any()}. %% Example: %% variant() :: #{ %% <<"name">> => string(), %% <<"variantConfiguration">> => variant_configuration(), %% <<"weight">> => [integer()] %% } -type variant() :: #{binary() => any()}. %% Example: %% batch_delete_memory_records_output() :: #{ %% <<"failedRecords">> => list(memory_record_output()), %% <<"successfulRecords">> => list(memory_record_output()) %% } -type batch_delete_memory_records_output() :: #{binary() => any()}. %% Example: %% evaluator_summary() :: #{ %% <<"evaluatorId">> => [string()], %% <<"statistics">> => evaluator_statistics(), %% <<"totalEvaluated">> => [integer()], %% <<"totalFailed">> => [integer()] %% } -type evaluator_summary() :: #{binary() => any()}. %% Example: %% list_sessions_input() :: #{ %% <<"filter">> => session_filter(), %% <<"maxResults">> => integer(), %% <<"nextToken">> => string() %% } -type list_sessions_input() :: #{binary() => any()}. %% Example: %% session_limits() :: #{ %% <<"maxSpendAmount">> => amount() %% } -type session_limits() :: #{binary() => any()}. %% Example: %% memory_metadata_filter_expression() :: #{ %% <<"left">> => list(), %% <<"operator">> => list(any()), %% <<"right">> => list() %% } -type memory_metadata_filter_expression() :: #{binary() => any()}. %% Example: %% list_recommendations_request() :: #{ %% <<"maxResults">> => [integer()], %% <<"nextToken">> => string(), %% <<"statusFilter">> => list(any()) %% } -type list_recommendations_request() :: #{binary() => any()}. %% Example: %% get_batch_evaluation_response() :: #{ %% <<"batchEvaluationArn">> => string(), %% <<"batchEvaluationId">> => string(), %% <<"batchEvaluationName">> => string(), %% <<"createdAt">> => [non_neg_integer()], %% <<"dataSourceConfig">> => list(), %% <<"description">> => string(), %% <<"errorDetails">> => list([string()]()), %% <<"evaluationResults">> => evaluation_job_results(), %% <<"evaluators">> => list(evaluator()), %% <<"outputConfig">> => list(), %% <<"status">> => list(any()), %% <<"updatedAt">> => [non_neg_integer()] %% } -type get_batch_evaluation_response() :: #{binary() => any()}. %% Example: %% browser_profile_configuration() :: #{ %% <<"profileIdentifier">> => string() %% } -type browser_profile_configuration() :: #{binary() => any()}. %% Example: %% start_recommendation_response() :: #{ %% <<"createdAt">> => [non_neg_integer()], %% <<"description">> => string(), %% <<"name">> => string(), %% <<"recommendationArn">> => string(), %% <<"recommendationConfig">> => list(), %% <<"recommendationId">> => string(), %% <<"status">> => list(any()), %% <<"type">> => list(any()), %% <<"updatedAt">> => [non_neg_integer()] %% } -type start_recommendation_response() :: #{binary() => any()}. %% Example: %% payment_instrument() :: #{ %% <<"createdAt">> => non_neg_integer(), %% <<"paymentConnectorId">> => string(), %% <<"paymentInstrumentDetails">> => list(), %% <<"paymentInstrumentId">> => string(), %% <<"paymentInstrumentType">> => list(any()), %% <<"paymentManagerArn">> => string(), %% <<"status">> => list(any()), %% <<"updatedAt">> => non_neg_integer(), %% <<"userId">> => string() %% } -type payment_instrument() :: #{binary() => any()}. %% Example: %% extraction_job() :: #{ %% <<"jobId">> => [string()] %% } -type extraction_job() :: #{binary() => any()}. %% Example: %% a_b_test_results() :: #{ %% <<"analysisTimestamp">> => [non_neg_integer()], %% <<"evaluatorMetrics">> => list(evaluator_metric()) %% } -type a_b_test_results() :: #{binary() => any()}. %% Example: %% payment_session_summary() :: #{ %% <<"createdAt">> => non_neg_integer(), %% <<"expiryTimeInMinutes">> => [integer()], %% <<"paymentManagerArn">> => string(), %% <<"paymentSessionId">> => string(), %% <<"updatedAt">> => non_neg_integer(), %% <<"userId">> => string() %% } -type payment_session_summary() :: #{binary() => any()}. %% Example: %% runtime_client_error() :: #{ %% <<"message">> => string() %% } -type runtime_client_error() :: #{binary() => any()}. -type batch_create_memory_records_errors() :: validation_exception() | access_denied_exception() | service_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | throttled_exception(). -type batch_delete_memory_records_errors() :: validation_exception() | access_denied_exception() | service_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | throttled_exception(). -type batch_update_memory_records_errors() :: validation_exception() | access_denied_exception() | service_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | throttled_exception(). -type complete_resource_token_auth_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception() | unauthorized_exception(). -type create_a_b_test_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | conflict_exception() | unauthorized_exception(). -type create_event_errors() :: validation_exception() | access_denied_exception() | invalid_input_exception() | service_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | throttled_exception() | retryable_conflict_exception(). -type create_payment_instrument_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | conflict_exception(). -type create_payment_session_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | conflict_exception(). -type delete_a_b_test_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception() | conflict_exception() | unauthorized_exception(). -type delete_batch_evaluation_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception() | conflict_exception() | unauthorized_exception(). -type delete_event_errors() :: validation_exception() | access_denied_exception() | invalid_input_exception() | service_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | throttled_exception(). -type delete_memory_record_errors() :: validation_exception() | access_denied_exception() | invalid_input_exception() | service_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | throttled_exception(). -type delete_payment_instrument_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). -type delete_payment_session_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). -type delete_recommendation_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception() | conflict_exception(). -type evaluate_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | conflict_exception() | unauthorized_exception() | duplicate_id_exception(). -type get_a_b_test_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception() | unauthorized_exception(). -type get_agent_card_errors() :: runtime_client_error() | throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | resource_not_found_exception(). -type get_batch_evaluation_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception() | unauthorized_exception(). -type get_browser_session_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). -type get_code_interpreter_session_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). -type get_event_errors() :: validation_exception() | access_denied_exception() | invalid_input_exception() | service_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | throttled_exception(). -type get_memory_record_errors() :: validation_exception() | access_denied_exception() | invalid_input_exception() | service_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | throttled_exception(). -type get_payment_instrument_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). -type get_payment_instrument_balance_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). -type get_payment_session_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). -type get_recommendation_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). -type get_resource_api_key_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception() | unauthorized_exception(). -type get_resource_oauth2_token_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception() | unauthorized_exception(). -type get_resource_payment_token_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception() | unauthorized_exception(). -type get_workload_access_token_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception() | unauthorized_exception(). -type get_workload_access_token_for_j_w_t_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception() | unauthorized_exception(). -type get_workload_access_token_for_user_id_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception() | unauthorized_exception(). -type invoke_agent_runtime_errors() :: runtime_client_error() | throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | retryable_conflict_exception(). -type invoke_agent_runtime_command_errors() :: runtime_client_error() | throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | resource_not_found_exception(). -type invoke_browser_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | resource_not_found_exception(). -type invoke_code_interpreter_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | conflict_exception(). -type invoke_harness_errors() :: runtime_client_error() | throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). -type list_a_b_tests_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | unauthorized_exception(). -type list_actors_errors() :: validation_exception() | access_denied_exception() | invalid_input_exception() | service_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | throttled_exception(). -type list_batch_evaluations_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | unauthorized_exception(). -type list_browser_sessions_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). -type list_code_interpreter_sessions_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). -type list_events_errors() :: validation_exception() | access_denied_exception() | invalid_input_exception() | service_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | throttled_exception(). -type list_memory_extraction_jobs_errors() :: validation_exception() | access_denied_exception() | service_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | throttled_exception(). -type list_memory_records_errors() :: validation_exception() | access_denied_exception() | invalid_input_exception() | service_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | throttled_exception(). -type list_payment_instruments_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception(). -type list_payment_sessions_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception(). -type list_recommendations_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception(). -type list_sessions_errors() :: validation_exception() | access_denied_exception() | invalid_input_exception() | service_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | throttled_exception(). -type process_payment_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | conflict_exception(). -type retrieve_memory_records_errors() :: validation_exception() | access_denied_exception() | invalid_input_exception() | service_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | throttled_exception(). -type save_browser_session_profile_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception() | conflict_exception(). -type search_registry_records_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception() | unauthorized_exception(). -type start_batch_evaluation_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | conflict_exception() | unauthorized_exception(). -type start_browser_session_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | conflict_exception(). -type start_code_interpreter_session_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | conflict_exception(). -type start_memory_extraction_job_errors() :: validation_exception() | access_denied_exception() | service_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | throttled_exception(). -type start_recommendation_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | conflict_exception(). -type stop_batch_evaluation_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception() | conflict_exception() | unauthorized_exception(). -type stop_browser_session_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | conflict_exception(). -type stop_code_interpreter_session_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | conflict_exception(). -type stop_runtime_session_errors() :: runtime_client_error() | throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | conflict_exception() | retryable_conflict_exception() | unauthorized_exception(). -type update_a_b_test_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | conflict_exception() | unauthorized_exception(). -type update_browser_stream_errors() :: throttling_exception() | validation_exception() | access_denied_exception() | internal_server_exception() | service_quota_exceeded_exception() | resource_not_found_exception() | conflict_exception(). %%==================================================================== %% API %%==================================================================== %% @doc Creates multiple memory records in a single batch operation for the %% specified memory with custom content. -spec batch_create_memory_records(aws_client:aws_client(), binary() | list(), batch_create_memory_records_input()) -> {ok, batch_create_memory_records_output(), tuple()} | {error, any()} | {error, batch_create_memory_records_errors(), tuple()}. batch_create_memory_records(Client, MemoryId, Input) -> batch_create_memory_records(Client, MemoryId, Input, []). -spec batch_create_memory_records(aws_client:aws_client(), binary() | list(), batch_create_memory_records_input(), proplists:proplist()) -> {ok, batch_create_memory_records_output(), tuple()} | {error, any()} | {error, batch_create_memory_records_errors(), tuple()}. batch_create_memory_records(Client, MemoryId, Input0, Options0) -> Method = post, Path = ["/memories/", aws_util:encode_uri(MemoryId), "/memoryRecords/batchCreate"], SuccessStatusCode = 201, {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 multiple memory records in a single batch operation from the %% specified memory. -spec batch_delete_memory_records(aws_client:aws_client(), binary() | list(), batch_delete_memory_records_input()) -> {ok, batch_delete_memory_records_output(), tuple()} | {error, any()} | {error, batch_delete_memory_records_errors(), tuple()}. batch_delete_memory_records(Client, MemoryId, Input) -> batch_delete_memory_records(Client, MemoryId, Input, []). -spec batch_delete_memory_records(aws_client:aws_client(), binary() | list(), batch_delete_memory_records_input(), proplists:proplist()) -> {ok, batch_delete_memory_records_output(), tuple()} | {error, any()} | {error, batch_delete_memory_records_errors(), tuple()}. batch_delete_memory_records(Client, MemoryId, Input0, Options0) -> Method = post, Path = ["/memories/", aws_util:encode_uri(MemoryId), "/memoryRecords/batchDelete"], 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 multiple memory records with custom content in a single batch %% operation within the specified memory. -spec batch_update_memory_records(aws_client:aws_client(), binary() | list(), batch_update_memory_records_input()) -> {ok, batch_update_memory_records_output(), tuple()} | {error, any()} | {error, batch_update_memory_records_errors(), tuple()}. batch_update_memory_records(Client, MemoryId, Input) -> batch_update_memory_records(Client, MemoryId, Input, []). -spec batch_update_memory_records(aws_client:aws_client(), binary() | list(), batch_update_memory_records_input(), proplists:proplist()) -> {ok, batch_update_memory_records_output(), tuple()} | {error, any()} | {error, batch_update_memory_records_errors(), tuple()}. batch_update_memory_records(Client, MemoryId, Input0, Options0) -> Method = post, Path = ["/memories/", aws_util:encode_uri(MemoryId), "/memoryRecords/batchUpdate"], 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 Confirms the user authentication session for obtaining OAuth2.0 %% tokens for a resource. -spec complete_resource_token_auth(aws_client:aws_client(), complete_resource_token_auth_request()) -> {ok, complete_resource_token_auth_response(), tuple()} | {error, any()} | {error, complete_resource_token_auth_errors(), tuple()}. complete_resource_token_auth(Client, Input) -> complete_resource_token_auth(Client, Input, []). -spec complete_resource_token_auth(aws_client:aws_client(), complete_resource_token_auth_request(), proplists:proplist()) -> {ok, complete_resource_token_auth_response(), tuple()} | {error, any()} | {error, complete_resource_token_auth_errors(), tuple()}. complete_resource_token_auth(Client, Input0, Options0) -> Method = post, Path = ["/identities/CompleteResourceTokenAuth"], 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 A/B test for comparing agent configurations. %% %% A/B tests split traffic between a control variant and a treatment variant %% through a gateway, then evaluate performance using online evaluation %% configurations to determine which variant performs better. -spec create_a_b_test(aws_client:aws_client(), create_a_b_test_request()) -> {ok, create_a_b_test_response(), tuple()} | {error, any()} | {error, create_a_b_test_errors(), tuple()}. create_a_b_test(Client, Input) -> create_a_b_test(Client, Input, []). -spec create_a_b_test(aws_client:aws_client(), create_a_b_test_request(), proplists:proplist()) -> {ok, create_a_b_test_response(), tuple()} | {error, any()} | {error, create_a_b_test_errors(), tuple()}. create_a_b_test(Client, Input0, Options0) -> Method = post, Path = ["/ab-tests"], SuccessStatusCode = 202, {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 event in an AgentCore Memory resource. %% %% Events represent interactions or activities that occur within a session %% and are associated with specific actors. %% %% To use this operation, you must have the %% `bedrock-agentcore:CreateEvent' permission. %% %% This operation is subject to request rate limiting. -spec create_event(aws_client:aws_client(), binary() | list(), create_event_input()) -> {ok, create_event_output(), tuple()} | {error, any()} | {error, create_event_errors(), tuple()}. create_event(Client, MemoryId, Input) -> create_event(Client, MemoryId, Input, []). -spec create_event(aws_client:aws_client(), binary() | list(), create_event_input(), proplists:proplist()) -> {ok, create_event_output(), tuple()} | {error, any()} | {error, create_event_errors(), tuple()}. create_event(Client, MemoryId, Input0, Options0) -> Method = post, Path = ["/memories/", aws_util:encode_uri(MemoryId), "/events"], SuccessStatusCode = 201, {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 Create a new payment instrument for a connector. -spec create_payment_instrument(aws_client:aws_client(), create_payment_instrument_request()) -> {ok, create_payment_instrument_response(), tuple()} | {error, any()} | {error, create_payment_instrument_errors(), tuple()}. create_payment_instrument(Client, Input) -> create_payment_instrument(Client, Input, []). -spec create_payment_instrument(aws_client:aws_client(), create_payment_instrument_request(), proplists:proplist()) -> {ok, create_payment_instrument_response(), tuple()} | {error, any()} | {error, create_payment_instrument_errors(), tuple()}. create_payment_instrument(Client, Input0, Options0) -> Method = post, Path = ["/payments/createPaymentInstrument"], SuccessStatusCode = 201, {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], HeadersMapping = [ {<<"X-Amzn-Bedrock-AgentCore-Payments-Agent-Name">>, <<"agentName">>}, {<<"X-Amzn-Bedrock-AgentCore-Payments-User-Id">>, <<"userId">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, Query_ = [], Input = Input2, request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Create a new payment session. -spec create_payment_session(aws_client:aws_client(), create_payment_session_request()) -> {ok, create_payment_session_response(), tuple()} | {error, any()} | {error, create_payment_session_errors(), tuple()}. create_payment_session(Client, Input) -> create_payment_session(Client, Input, []). -spec create_payment_session(aws_client:aws_client(), create_payment_session_request(), proplists:proplist()) -> {ok, create_payment_session_response(), tuple()} | {error, any()} | {error, create_payment_session_errors(), tuple()}. create_payment_session(Client, Input0, Options0) -> Method = post, Path = ["/payments/createPaymentSession"], SuccessStatusCode = 201, {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], HeadersMapping = [ {<<"X-Amzn-Bedrock-AgentCore-Payments-Agent-Name">>, <<"agentName">>}, {<<"X-Amzn-Bedrock-AgentCore-Payments-User-Id">>, <<"userId">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, Query_ = [], Input = Input2, request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Deletes an A/B test and its associated gateway rules. -spec delete_a_b_test(aws_client:aws_client(), binary() | list(), delete_a_b_test_request()) -> {ok, delete_a_b_test_response(), tuple()} | {error, any()} | {error, delete_a_b_test_errors(), tuple()}. delete_a_b_test(Client, AbTestId, Input) -> delete_a_b_test(Client, AbTestId, Input, []). -spec delete_a_b_test(aws_client:aws_client(), binary() | list(), delete_a_b_test_request(), proplists:proplist()) -> {ok, delete_a_b_test_response(), tuple()} | {error, any()} | {error, delete_a_b_test_errors(), tuple()}. delete_a_b_test(Client, AbTestId, Input0, Options0) -> Method = delete, Path = ["/ab-tests/", aws_util:encode_uri(AbTestId), ""], SuccessStatusCode = 202, {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 a batch evaluation and its associated results. -spec delete_batch_evaluation(aws_client:aws_client(), binary() | list(), delete_batch_evaluation_request()) -> {ok, delete_batch_evaluation_response(), tuple()} | {error, any()} | {error, delete_batch_evaluation_errors(), tuple()}. delete_batch_evaluation(Client, BatchEvaluationId, Input) -> delete_batch_evaluation(Client, BatchEvaluationId, Input, []). -spec delete_batch_evaluation(aws_client:aws_client(), binary() | list(), delete_batch_evaluation_request(), proplists:proplist()) -> {ok, delete_batch_evaluation_response(), tuple()} | {error, any()} | {error, delete_batch_evaluation_errors(), tuple()}. delete_batch_evaluation(Client, BatchEvaluationId, Input0, Options0) -> Method = delete, Path = ["/evaluations/batch-evaluate/", aws_util:encode_uri(BatchEvaluationId), ""], SuccessStatusCode = 202, {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 event from an AgentCore Memory resource. %% %% When you delete an event, it is permanently removed. %% %% To use this operation, you must have the %% `bedrock-agentcore:DeleteEvent' permission. -spec delete_event(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), binary() | list(), delete_event_input()) -> {ok, delete_event_output(), tuple()} | {error, any()} | {error, delete_event_errors(), tuple()}. delete_event(Client, ActorId, EventId, MemoryId, SessionId, Input) -> delete_event(Client, ActorId, EventId, MemoryId, SessionId, Input, []). -spec delete_event(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), binary() | list(), delete_event_input(), proplists:proplist()) -> {ok, delete_event_output(), tuple()} | {error, any()} | {error, delete_event_errors(), tuple()}. delete_event(Client, ActorId, EventId, MemoryId, SessionId, Input0, Options0) -> Method = delete, Path = ["/memories/", aws_util:encode_uri(MemoryId), "/actor/", aws_util:encode_uri(ActorId), "/sessions/", aws_util:encode_uri(SessionId), "/events/", aws_util:encode_uri(EventId), ""], 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 Deletes a memory record from an AgentCore Memory resource. %% %% When you delete a memory record, it is permanently removed. %% %% To use this operation, you must have the %% `bedrock-agentcore:DeleteMemoryRecord' permission. -spec delete_memory_record(aws_client:aws_client(), binary() | list(), binary() | list(), delete_memory_record_input()) -> {ok, delete_memory_record_output(), tuple()} | {error, any()} | {error, delete_memory_record_errors(), tuple()}. delete_memory_record(Client, MemoryId, MemoryRecordId, Input) -> delete_memory_record(Client, MemoryId, MemoryRecordId, Input, []). -spec delete_memory_record(aws_client:aws_client(), binary() | list(), binary() | list(), delete_memory_record_input(), proplists:proplist()) -> {ok, delete_memory_record_output(), tuple()} | {error, any()} | {error, delete_memory_record_errors(), tuple()}. delete_memory_record(Client, MemoryId, MemoryRecordId, Input0, Options0) -> Method = delete, Path = ["/memories/", aws_util:encode_uri(MemoryId), "/memoryRecords/", aws_util:encode_uri(MemoryRecordId), ""], 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 Deletes a payment instrument. %% %% This is a soft delete operation that preserves the record for audit and %% compliance purposes. -spec delete_payment_instrument(aws_client:aws_client(), delete_payment_instrument_request()) -> {ok, delete_payment_instrument_response(), tuple()} | {error, any()} | {error, delete_payment_instrument_errors(), tuple()}. delete_payment_instrument(Client, Input) -> delete_payment_instrument(Client, Input, []). -spec delete_payment_instrument(aws_client:aws_client(), delete_payment_instrument_request(), proplists:proplist()) -> {ok, delete_payment_instrument_response(), tuple()} | {error, any()} | {error, delete_payment_instrument_errors(), tuple()}. delete_payment_instrument(Client, Input0, Options0) -> Method = post, Path = ["/payments/deletePaymentInstrument"], 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], HeadersMapping = [ {<<"X-Amzn-Bedrock-AgentCore-Payments-User-Id">>, <<"userId">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, Query_ = [], Input = Input2, request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Deletes a payment session. %% %% This permanently removes the payment session record. -spec delete_payment_session(aws_client:aws_client(), delete_payment_session_request()) -> {ok, delete_payment_session_response(), tuple()} | {error, any()} | {error, delete_payment_session_errors(), tuple()}. delete_payment_session(Client, Input) -> delete_payment_session(Client, Input, []). -spec delete_payment_session(aws_client:aws_client(), delete_payment_session_request(), proplists:proplist()) -> {ok, delete_payment_session_response(), tuple()} | {error, any()} | {error, delete_payment_session_errors(), tuple()}. delete_payment_session(Client, Input0, Options0) -> Method = post, Path = ["/payments/deletePaymentSession"], 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], HeadersMapping = [ {<<"X-Amzn-Bedrock-AgentCore-Payments-User-Id">>, <<"userId">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, Query_ = [], Input = Input2, request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Deletes a recommendation and its associated results. -spec delete_recommendation(aws_client:aws_client(), binary() | list(), delete_recommendation_request()) -> {ok, delete_recommendation_response(), tuple()} | {error, any()} | {error, delete_recommendation_errors(), tuple()}. delete_recommendation(Client, RecommendationId, Input) -> delete_recommendation(Client, RecommendationId, Input, []). -spec delete_recommendation(aws_client:aws_client(), binary() | list(), delete_recommendation_request(), proplists:proplist()) -> {ok, delete_recommendation_response(), tuple()} | {error, any()} | {error, delete_recommendation_errors(), tuple()}. delete_recommendation(Client, RecommendationId, Input0, Options0) -> Method = delete, Path = ["/recommendations/", aws_util:encode_uri(RecommendationId), ""], SuccessStatusCode = 202, {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 Performs on-demand evaluation of agent traces using a specified %% evaluator. %% %% This synchronous API accepts traces in OpenTelemetry format and returns %% immediate scoring results with detailed explanations. -spec evaluate(aws_client:aws_client(), binary() | list(), evaluate_request()) -> {ok, evaluate_response(), tuple()} | {error, any()} | {error, evaluate_errors(), tuple()}. evaluate(Client, EvaluatorId, Input) -> evaluate(Client, EvaluatorId, Input, []). -spec evaluate(aws_client:aws_client(), binary() | list(), evaluate_request(), proplists:proplist()) -> {ok, evaluate_response(), tuple()} | {error, any()} | {error, evaluate_errors(), tuple()}. evaluate(Client, EvaluatorId, Input0, Options0) -> Method = post, Path = ["/evaluations/evaluate/", aws_util:encode_uri(EvaluatorId), ""], 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 Retrieves detailed information about an A/B test, including its %% configuration, status, and statistical results. -spec get_a_b_test(aws_client:aws_client(), binary() | list()) -> {ok, get_a_b_test_response(), tuple()} | {error, any()} | {error, get_a_b_test_errors(), tuple()}. get_a_b_test(Client, AbTestId) when is_map(Client) -> get_a_b_test(Client, AbTestId, #{}, #{}). -spec get_a_b_test(aws_client:aws_client(), binary() | list(), map(), map()) -> {ok, get_a_b_test_response(), tuple()} | {error, any()} | {error, get_a_b_test_errors(), tuple()}. get_a_b_test(Client, AbTestId, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_a_b_test(Client, AbTestId, QueryMap, HeadersMap, []). -spec get_a_b_test(aws_client:aws_client(), binary() | list(), map(), map(), proplists:proplist()) -> {ok, get_a_b_test_response(), tuple()} | {error, any()} | {error, get_a_b_test_errors(), tuple()}. get_a_b_test(Client, AbTestId, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/ab-tests/", aws_util:encode_uri(AbTestId), ""], 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 the A2A agent card associated with an AgentCore Runtime %% agent. -spec get_agent_card(aws_client:aws_client(), binary() | list()) -> {ok, get_agent_card_response(), tuple()} | {error, any()} | {error, get_agent_card_errors(), tuple()}. get_agent_card(Client, AgentRuntimeArn) when is_map(Client) -> get_agent_card(Client, AgentRuntimeArn, #{}, #{}). -spec get_agent_card(aws_client:aws_client(), binary() | list(), map(), map()) -> {ok, get_agent_card_response(), tuple()} | {error, any()} | {error, get_agent_card_errors(), tuple()}. get_agent_card(Client, AgentRuntimeArn, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_agent_card(Client, AgentRuntimeArn, QueryMap, HeadersMap, []). -spec get_agent_card(aws_client:aws_client(), binary() | list(), map(), map(), proplists:proplist()) -> {ok, get_agent_card_response(), tuple()} | {error, any()} | {error, get_agent_card_errors(), tuple()}. get_agent_card(Client, AgentRuntimeArn, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/runtimes/", aws_util:encode_uri(AgentRuntimeArn), "/invocations/.well-known/agent-card.json"], 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], Headers0 = [ {<<"X-Amzn-Bedrock-AgentCore-Runtime-Session-Id">>, maps:get(<<"X-Amzn-Bedrock-AgentCore-Runtime-Session-Id">>, HeadersMap, undefined)} ], Headers = [H || {_, V} = H <- Headers0, V =/= undefined], Query0_ = [ {<<"qualifier">>, maps:get(<<"qualifier">>, QueryMap, undefined)} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], case request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode) of {ok, Body0, {_, ResponseHeaders, _} = Response} -> ResponseHeadersParams = [ {<<"X-Amzn-Bedrock-AgentCore-Runtime-Session-Id">>, <<"runtimeSessionId">>} ], FoldFun = fun({Name_, Key_}, Acc_) -> case lists:keyfind(Name_, 1, ResponseHeaders) of false -> Acc_; {_, Value_} -> Acc_#{Key_ => Value_} end end, Body = lists:foldl(FoldFun, Body0, ResponseHeadersParams), {ok, Body, Response}; Result -> Result end. %% @doc Retrieves detailed information about a batch evaluation, including %% its status, configuration, results, and any error details. -spec get_batch_evaluation(aws_client:aws_client(), binary() | list()) -> {ok, get_batch_evaluation_response(), tuple()} | {error, any()} | {error, get_batch_evaluation_errors(), tuple()}. get_batch_evaluation(Client, BatchEvaluationId) when is_map(Client) -> get_batch_evaluation(Client, BatchEvaluationId, #{}, #{}). -spec get_batch_evaluation(aws_client:aws_client(), binary() | list(), map(), map()) -> {ok, get_batch_evaluation_response(), tuple()} | {error, any()} | {error, get_batch_evaluation_errors(), tuple()}. get_batch_evaluation(Client, BatchEvaluationId, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_batch_evaluation(Client, BatchEvaluationId, QueryMap, HeadersMap, []). -spec get_batch_evaluation(aws_client:aws_client(), binary() | list(), map(), map(), proplists:proplist()) -> {ok, get_batch_evaluation_response(), tuple()} | {error, any()} | {error, get_batch_evaluation_errors(), tuple()}. get_batch_evaluation(Client, BatchEvaluationId, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/evaluations/batch-evaluate/", aws_util:encode_uri(BatchEvaluationId), ""], 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 detailed information about a specific browser session in %% Amazon Bedrock AgentCore. %% %% This operation returns the session's configuration, current status, %% associated streams, and metadata. %% %% To get a browser session, you must specify both the browser identifier and %% the session ID. The response includes information about the session's %% viewport configuration, timeout settings, and stream endpoints. %% %% The following operations are related to `GetBrowserSession': %% %% StartBrowserSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StartBrowserSession.html %% %% ListBrowserSessions: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_ListBrowserSessions.html %% %% StopBrowserSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StopBrowserSession.html -spec get_browser_session(aws_client:aws_client(), binary() | list(), binary() | list()) -> {ok, get_browser_session_response(), tuple()} | {error, any()} | {error, get_browser_session_errors(), tuple()}. get_browser_session(Client, BrowserIdentifier, SessionId) when is_map(Client) -> get_browser_session(Client, BrowserIdentifier, SessionId, #{}, #{}). -spec get_browser_session(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> {ok, get_browser_session_response(), tuple()} | {error, any()} | {error, get_browser_session_errors(), tuple()}. get_browser_session(Client, BrowserIdentifier, SessionId, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_browser_session(Client, BrowserIdentifier, SessionId, QueryMap, HeadersMap, []). -spec get_browser_session(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> {ok, get_browser_session_response(), tuple()} | {error, any()} | {error, get_browser_session_errors(), tuple()}. get_browser_session(Client, BrowserIdentifier, SessionId, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/browsers/", aws_util:encode_uri(BrowserIdentifier), "/sessions/get"], 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_ = [ {<<"sessionId">>, SessionId} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). %% @doc Retrieves detailed information about a specific code interpreter %% session in Amazon Bedrock AgentCore. %% %% This operation returns the session's configuration, current status, %% and metadata. %% %% To get a code interpreter session, you must specify both the code %% interpreter identifier and the session ID. The response includes %% information about the session's timeout settings and current status. %% %% The following operations are related to `GetCodeInterpreterSession': %% %% StartCodeInterpreterSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StartCodeInterpreterSession.html %% %% ListCodeInterpreterSessions: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_ListCodeInterpreterSessions.html %% %% StopCodeInterpreterSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StopCodeInterpreterSession.html -spec get_code_interpreter_session(aws_client:aws_client(), binary() | list(), binary() | list()) -> {ok, get_code_interpreter_session_response(), tuple()} | {error, any()} | {error, get_code_interpreter_session_errors(), tuple()}. get_code_interpreter_session(Client, CodeInterpreterIdentifier, SessionId) when is_map(Client) -> get_code_interpreter_session(Client, CodeInterpreterIdentifier, SessionId, #{}, #{}). -spec get_code_interpreter_session(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> {ok, get_code_interpreter_session_response(), tuple()} | {error, any()} | {error, get_code_interpreter_session_errors(), tuple()}. get_code_interpreter_session(Client, CodeInterpreterIdentifier, SessionId, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_code_interpreter_session(Client, CodeInterpreterIdentifier, SessionId, QueryMap, HeadersMap, []). -spec get_code_interpreter_session(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> {ok, get_code_interpreter_session_response(), tuple()} | {error, any()} | {error, get_code_interpreter_session_errors(), tuple()}. get_code_interpreter_session(Client, CodeInterpreterIdentifier, SessionId, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/code-interpreters/", aws_util:encode_uri(CodeInterpreterIdentifier), "/sessions/get"], 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_ = [ {<<"sessionId">>, SessionId} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). %% @doc Retrieves information about a specific event in an AgentCore Memory %% resource. %% %% To use this operation, you must have the `bedrock-agentcore:GetEvent' %% permission. -spec get_event(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), binary() | list()) -> {ok, get_event_output(), tuple()} | {error, any()} | {error, get_event_errors(), tuple()}. get_event(Client, ActorId, EventId, MemoryId, SessionId) when is_map(Client) -> get_event(Client, ActorId, EventId, MemoryId, SessionId, #{}, #{}). -spec get_event(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), binary() | list(), map(), map()) -> {ok, get_event_output(), tuple()} | {error, any()} | {error, get_event_errors(), tuple()}. get_event(Client, ActorId, EventId, MemoryId, SessionId, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_event(Client, ActorId, EventId, MemoryId, SessionId, QueryMap, HeadersMap, []). -spec get_event(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> {ok, get_event_output(), tuple()} | {error, any()} | {error, get_event_errors(), tuple()}. get_event(Client, ActorId, EventId, MemoryId, SessionId, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/memories/", aws_util:encode_uri(MemoryId), "/actor/", aws_util:encode_uri(ActorId), "/sessions/", aws_util:encode_uri(SessionId), "/events/", aws_util:encode_uri(EventId), ""], 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 a specific memory record from an AgentCore Memory resource. %% %% To use this operation, you must have the %% `bedrock-agentcore:GetMemoryRecord' permission. -spec get_memory_record(aws_client:aws_client(), binary() | list(), binary() | list()) -> {ok, get_memory_record_output(), tuple()} | {error, any()} | {error, get_memory_record_errors(), tuple()}. get_memory_record(Client, MemoryId, MemoryRecordId) when is_map(Client) -> get_memory_record(Client, MemoryId, MemoryRecordId, #{}, #{}). -spec get_memory_record(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> {ok, get_memory_record_output(), tuple()} | {error, any()} | {error, get_memory_record_errors(), tuple()}. get_memory_record(Client, MemoryId, MemoryRecordId, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_memory_record(Client, MemoryId, MemoryRecordId, QueryMap, HeadersMap, []). -spec get_memory_record(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> {ok, get_memory_record_output(), tuple()} | {error, any()} | {error, get_memory_record_errors(), tuple()}. get_memory_record(Client, MemoryId, MemoryRecordId, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/memories/", aws_util:encode_uri(MemoryId), "/memoryRecord/", aws_util:encode_uri(MemoryRecordId), ""], 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 Get a payment instrument by ID. -spec get_payment_instrument(aws_client:aws_client(), get_payment_instrument_request()) -> {ok, get_payment_instrument_response(), tuple()} | {error, any()} | {error, get_payment_instrument_errors(), tuple()}. get_payment_instrument(Client, Input) -> get_payment_instrument(Client, Input, []). -spec get_payment_instrument(aws_client:aws_client(), get_payment_instrument_request(), proplists:proplist()) -> {ok, get_payment_instrument_response(), tuple()} | {error, any()} | {error, get_payment_instrument_errors(), tuple()}. get_payment_instrument(Client, Input0, Options0) -> Method = post, Path = ["/payments/getPaymentInstrument"], 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], HeadersMapping = [ {<<"X-Amzn-Bedrock-AgentCore-Payments-Agent-Name">>, <<"agentName">>}, {<<"X-Amzn-Bedrock-AgentCore-Payments-User-Id">>, <<"userId">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, Query_ = [], Input = Input2, request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Get the balance of a payment instrument. -spec get_payment_instrument_balance(aws_client:aws_client(), get_payment_instrument_balance_request()) -> {ok, get_payment_instrument_balance_response(), tuple()} | {error, any()} | {error, get_payment_instrument_balance_errors(), tuple()}. get_payment_instrument_balance(Client, Input) -> get_payment_instrument_balance(Client, Input, []). -spec get_payment_instrument_balance(aws_client:aws_client(), get_payment_instrument_balance_request(), proplists:proplist()) -> {ok, get_payment_instrument_balance_response(), tuple()} | {error, any()} | {error, get_payment_instrument_balance_errors(), tuple()}. get_payment_instrument_balance(Client, Input0, Options0) -> Method = post, Path = ["/payments/getPaymentInstrumentBalance"], 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], HeadersMapping = [ {<<"X-Amzn-Bedrock-AgentCore-Payments-Agent-Name">>, <<"agentName">>}, {<<"X-Amzn-Bedrock-AgentCore-Payments-User-Id">>, <<"userId">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, Query_ = [], Input = Input2, request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Get a payment session. -spec get_payment_session(aws_client:aws_client(), get_payment_session_request()) -> {ok, get_payment_session_response(), tuple()} | {error, any()} | {error, get_payment_session_errors(), tuple()}. get_payment_session(Client, Input) -> get_payment_session(Client, Input, []). -spec get_payment_session(aws_client:aws_client(), get_payment_session_request(), proplists:proplist()) -> {ok, get_payment_session_response(), tuple()} | {error, any()} | {error, get_payment_session_errors(), tuple()}. get_payment_session(Client, Input0, Options0) -> Method = post, Path = ["/payments/getPaymentSession"], 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], HeadersMapping = [ {<<"X-Amzn-Bedrock-AgentCore-Payments-Agent-Name">>, <<"agentName">>}, {<<"X-Amzn-Bedrock-AgentCore-Payments-User-Id">>, <<"userId">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, Query_ = [], Input = Input2, request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Retrieves detailed information about a recommendation, including its %% configuration, status, and results. -spec get_recommendation(aws_client:aws_client(), binary() | list()) -> {ok, get_recommendation_response(), tuple()} | {error, any()} | {error, get_recommendation_errors(), tuple()}. get_recommendation(Client, RecommendationId) when is_map(Client) -> get_recommendation(Client, RecommendationId, #{}, #{}). -spec get_recommendation(aws_client:aws_client(), binary() | list(), map(), map()) -> {ok, get_recommendation_response(), tuple()} | {error, any()} | {error, get_recommendation_errors(), tuple()}. get_recommendation(Client, RecommendationId, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> get_recommendation(Client, RecommendationId, QueryMap, HeadersMap, []). -spec get_recommendation(aws_client:aws_client(), binary() | list(), map(), map(), proplists:proplist()) -> {ok, get_recommendation_response(), tuple()} | {error, any()} | {error, get_recommendation_errors(), tuple()}. get_recommendation(Client, RecommendationId, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/recommendations/", aws_util:encode_uri(RecommendationId), ""], 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 the API key associated with an API key credential provider. -spec get_resource_api_key(aws_client:aws_client(), get_resource_api_key_request()) -> {ok, get_resource_api_key_response(), tuple()} | {error, any()} | {error, get_resource_api_key_errors(), tuple()}. get_resource_api_key(Client, Input) -> get_resource_api_key(Client, Input, []). -spec get_resource_api_key(aws_client:aws_client(), get_resource_api_key_request(), proplists:proplist()) -> {ok, get_resource_api_key_response(), tuple()} | {error, any()} | {error, get_resource_api_key_errors(), tuple()}. get_resource_api_key(Client, Input0, Options0) -> Method = post, Path = ["/identities/api-key"], 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 Returns the OAuth 2.0 token of the provided resource. -spec get_resource_oauth2_token(aws_client:aws_client(), get_resource_oauth2_token_request()) -> {ok, get_resource_oauth2_token_response(), tuple()} | {error, any()} | {error, get_resource_oauth2_token_errors(), tuple()}. get_resource_oauth2_token(Client, Input) -> get_resource_oauth2_token(Client, Input, []). -spec get_resource_oauth2_token(aws_client:aws_client(), get_resource_oauth2_token_request(), proplists:proplist()) -> {ok, get_resource_oauth2_token_response(), tuple()} | {error, any()} | {error, get_resource_oauth2_token_errors(), tuple()}. get_resource_oauth2_token(Client, Input0, Options0) -> Method = post, Path = ["/identities/oauth2/token"], 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 Generates authentication tokens for payment providers that use %% vendor-specific authentication mechanisms. -spec get_resource_payment_token(aws_client:aws_client(), get_resource_payment_token_request()) -> {ok, get_resource_payment_token_response(), tuple()} | {error, any()} | {error, get_resource_payment_token_errors(), tuple()}. get_resource_payment_token(Client, Input) -> get_resource_payment_token(Client, Input, []). -spec get_resource_payment_token(aws_client:aws_client(), get_resource_payment_token_request(), proplists:proplist()) -> {ok, get_resource_payment_token_response(), tuple()} | {error, any()} | {error, get_resource_payment_token_errors(), tuple()}. get_resource_payment_token(Client, Input0, Options0) -> Method = post, Path = ["/identities/payment/token"], 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 Obtains a workload access token for agentic workloads not acting on %% behalf of a user. -spec get_workload_access_token(aws_client:aws_client(), get_workload_access_token_request()) -> {ok, get_workload_access_token_response(), tuple()} | {error, any()} | {error, get_workload_access_token_errors(), tuple()}. get_workload_access_token(Client, Input) -> get_workload_access_token(Client, Input, []). -spec get_workload_access_token(aws_client:aws_client(), get_workload_access_token_request(), proplists:proplist()) -> {ok, get_workload_access_token_response(), tuple()} | {error, any()} | {error, get_workload_access_token_errors(), tuple()}. get_workload_access_token(Client, Input0, Options0) -> Method = post, Path = ["/identities/GetWorkloadAccessToken"], 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 Obtains a workload access token for agentic workloads acting on %% behalf of a user, using a JWT token. -spec get_workload_access_token_for_j_w_t(aws_client:aws_client(), get_workload_access_token_for_j_w_t_request()) -> {ok, get_workload_access_token_for_j_w_t_response(), tuple()} | {error, any()} | {error, get_workload_access_token_for_j_w_t_errors(), tuple()}. get_workload_access_token_for_j_w_t(Client, Input) -> get_workload_access_token_for_j_w_t(Client, Input, []). -spec get_workload_access_token_for_j_w_t(aws_client:aws_client(), get_workload_access_token_for_j_w_t_request(), proplists:proplist()) -> {ok, get_workload_access_token_for_j_w_t_response(), tuple()} | {error, any()} | {error, get_workload_access_token_for_j_w_t_errors(), tuple()}. get_workload_access_token_for_j_w_t(Client, Input0, Options0) -> Method = post, Path = ["/identities/GetWorkloadAccessTokenForJWT"], 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 Obtains a workload access token for agentic workloads acting on %% behalf of a user, using the user's ID. -spec get_workload_access_token_for_user_id(aws_client:aws_client(), get_workload_access_token_for_user_id_request()) -> {ok, get_workload_access_token_for_user_id_response(), tuple()} | {error, any()} | {error, get_workload_access_token_for_user_id_errors(), tuple()}. get_workload_access_token_for_user_id(Client, Input) -> get_workload_access_token_for_user_id(Client, Input, []). -spec get_workload_access_token_for_user_id(aws_client:aws_client(), get_workload_access_token_for_user_id_request(), proplists:proplist()) -> {ok, get_workload_access_token_for_user_id_response(), tuple()} | {error, any()} | {error, get_workload_access_token_for_user_id_errors(), tuple()}. get_workload_access_token_for_user_id(Client, Input0, Options0) -> Method = post, Path = ["/identities/GetWorkloadAccessTokenForUserId"], 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 Sends a request to an agent or tool hosted in an Amazon Bedrock %% AgentCore Runtime and receives responses in real-time. %% %% To invoke an agent, you can specify either the AgentCore Runtime ARN or %% the agent ID with an account ID, and provide a payload containing your %% request. When you use the agent ID instead of the full ARN, you don't %% need to URL-encode the identifier. You can optionally specify a qualifier %% to target a specific endpoint of the agent. %% %% This operation supports streaming responses, allowing you to receive %% partial responses as they become available. We recommend using pagination %% to ensure that the operation returns quickly and successfully when %% processing large responses. %% %% For example code, see Invoke an AgentCore Runtime agent: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-invoke-agent.html. %% %% If you're integrating your agent with OAuth, you can't use the %% Amazon Web Services SDK to call `InvokeAgentRuntime'. Instead, make a %% HTTPS request to `InvokeAgentRuntime'. For an example, see %% Authenticate and authorize with Inbound Auth and Outbound Auth: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-oauth.html. %% %% To use this operation, you must have the %% `bedrock-agentcore:InvokeAgentRuntime' permission. If you are making a %% call to `InvokeAgentRuntime' on behalf of a user ID with the %% `X-Amzn-Bedrock-AgentCore-Runtime-User-Id' header, You require %% permissions to both actions (`bedrock-agentcore:InvokeAgentRuntime' %% and `bedrock-agentcore:InvokeAgentRuntimeForUser'). -spec invoke_agent_runtime(aws_client:aws_client(), binary() | list(), invoke_agent_runtime_request()) -> {ok, invoke_agent_runtime_response(), tuple()} | {error, any()} | {error, invoke_agent_runtime_errors(), tuple()}. invoke_agent_runtime(Client, AgentRuntimeArn, Input) -> invoke_agent_runtime(Client, AgentRuntimeArn, Input, []). -spec invoke_agent_runtime(aws_client:aws_client(), binary() | list(), invoke_agent_runtime_request(), proplists:proplist()) -> {ok, invoke_agent_runtime_response(), tuple()} | {error, any()} | {error, invoke_agent_runtime_errors(), tuple()}. invoke_agent_runtime(Client, AgentRuntimeArn, Input0, Options0) -> Method = post, Path = ["/runtimes/", aws_util:encode_uri(AgentRuntimeArn), "/invocations"], 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], HeadersMapping = [ {<<"Accept">>, <<"accept">>}, {<<"baggage">>, <<"baggage">>}, {<<"Content-Type">>, <<"contentType">>}, {<<"Mcp-Protocol-Version">>, <<"mcpProtocolVersion">>}, {<<"Mcp-Session-Id">>, <<"mcpSessionId">>}, {<<"X-Amzn-Bedrock-AgentCore-Runtime-Session-Id">>, <<"runtimeSessionId">>}, {<<"X-Amzn-Bedrock-AgentCore-Runtime-User-Id">>, <<"runtimeUserId">>}, {<<"X-Amzn-Trace-Id">>, <<"traceId">>}, {<<"traceparent">>, <<"traceParent">>}, {<<"tracestate">>, <<"traceState">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, QueryMapping = [ {<<"accountId">>, <<"accountId">>}, {<<"qualifier">>, <<"qualifier">>} ], {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), case request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode) of {ok, Body0, {_, ResponseHeaders, _} = Response} -> ResponseHeadersParams = [ {<<"baggage">>, <<"baggage">>}, {<<"Content-Type">>, <<"contentType">>}, {<<"Mcp-Protocol-Version">>, <<"mcpProtocolVersion">>}, {<<"Mcp-Session-Id">>, <<"mcpSessionId">>}, {<<"X-Amzn-Bedrock-AgentCore-Runtime-Session-Id">>, <<"runtimeSessionId">>}, {<<"X-Amzn-Trace-Id">>, <<"traceId">>}, {<<"traceparent">>, <<"traceParent">>}, {<<"tracestate">>, <<"traceState">>} ], FoldFun = fun({Name_, Key_}, Acc_) -> case lists:keyfind(Name_, 1, ResponseHeaders) of false -> Acc_; {_, Value_} -> Acc_#{Key_ => Value_} end end, Body = lists:foldl(FoldFun, Body0, ResponseHeadersParams), {ok, Body, Response}; Result -> Result end. %% @doc Executes a command in a runtime session container and streams the %% output back to the caller. %% %% This operation allows you to run shell commands within the agent runtime %% environment and receive real-time streaming responses including standard %% output and standard error. %% %% To invoke a command, you must specify the agent runtime ARN and a runtime %% session ID. The command execution supports streaming responses, allowing %% you to receive output as it becomes available through `contentStart', %% `contentDelta', and `contentStop' events. %% %% To use this operation, you must have the %% `bedrock-agentcore:InvokeAgentRuntimeCommand' permission. -spec invoke_agent_runtime_command(aws_client:aws_client(), binary() | list(), invoke_agent_runtime_command_request()) -> {ok, invoke_agent_runtime_command_response(), tuple()} | {error, any()} | {error, invoke_agent_runtime_command_errors(), tuple()}. invoke_agent_runtime_command(Client, AgentRuntimeArn, Input) -> invoke_agent_runtime_command(Client, AgentRuntimeArn, Input, []). -spec invoke_agent_runtime_command(aws_client:aws_client(), binary() | list(), invoke_agent_runtime_command_request(), proplists:proplist()) -> {ok, invoke_agent_runtime_command_response(), tuple()} | {error, any()} | {error, invoke_agent_runtime_command_errors(), tuple()}. invoke_agent_runtime_command(Client, AgentRuntimeArn, Input0, Options0) -> Method = post, Path = ["/runtimes/", aws_util:encode_uri(AgentRuntimeArn), "/commands"], 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], HeadersMapping = [ {<<"Accept">>, <<"accept">>}, {<<"baggage">>, <<"baggage">>}, {<<"Content-Type">>, <<"contentType">>}, {<<"X-Amzn-Bedrock-AgentCore-Runtime-Session-Id">>, <<"runtimeSessionId">>}, {<<"X-Amzn-Trace-Id">>, <<"traceId">>}, {<<"traceparent">>, <<"traceParent">>}, {<<"tracestate">>, <<"traceState">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, QueryMapping = [ {<<"accountId">>, <<"accountId">>}, {<<"qualifier">>, <<"qualifier">>} ], {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), case request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode) of {ok, Body0, {_, ResponseHeaders, _} = Response} -> ResponseHeadersParams = [ {<<"baggage">>, <<"baggage">>}, {<<"Content-Type">>, <<"contentType">>}, {<<"X-Amzn-Bedrock-AgentCore-Runtime-Session-Id">>, <<"runtimeSessionId">>}, {<<"X-Amzn-Trace-Id">>, <<"traceId">>}, {<<"traceparent">>, <<"traceParent">>}, {<<"tracestate">>, <<"traceState">>} ], FoldFun = fun({Name_, Key_}, Acc_) -> case lists:keyfind(Name_, 1, ResponseHeaders) of false -> Acc_; {_, Value_} -> Acc_#{Key_ => Value_} end end, Body = lists:foldl(FoldFun, Body0, ResponseHeadersParams), {ok, Body, Response}; Result -> Result end. %% @doc Invokes an operating system-level action on a browser session in %% Amazon Bedrock AgentCore. %% %% This operation provides direct OS-level control over browser sessions, %% enabling mouse actions, keyboard input, and screenshots that the %% WebSocket-based Chrome DevTools Protocol (CDP) cannot handle — such as %% interacting with print dialogs, context menus, and JavaScript alerts. %% %% You send a request with exactly one action in the `BrowserAction' %% union, and receive a corresponding result in the `BrowserActionResult' %% union. %% %% The following operations are related to `InvokeBrowser': %% %% StartBrowserSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StartBrowserSession.html %% %% GetBrowserSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_GetBrowserSession.html %% %% StopBrowserSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StopBrowserSession.html -spec invoke_browser(aws_client:aws_client(), binary() | list(), invoke_browser_request()) -> {ok, invoke_browser_response(), tuple()} | {error, any()} | {error, invoke_browser_errors(), tuple()}. invoke_browser(Client, BrowserIdentifier, Input) -> invoke_browser(Client, BrowserIdentifier, Input, []). -spec invoke_browser(aws_client:aws_client(), binary() | list(), invoke_browser_request(), proplists:proplist()) -> {ok, invoke_browser_response(), tuple()} | {error, any()} | {error, invoke_browser_errors(), tuple()}. invoke_browser(Client, BrowserIdentifier, Input0, Options0) -> Method = post, Path = ["/browsers/", aws_util:encode_uri(BrowserIdentifier), "/sessions/invoke"], 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], HeadersMapping = [ {<<"x-amzn-browser-session-id">>, <<"sessionId">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, Query_ = [], Input = Input2, case request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode) of {ok, Body0, {_, ResponseHeaders, _} = Response} -> ResponseHeadersParams = [ {<<"x-amzn-browser-session-id">>, <<"sessionId">>} ], FoldFun = fun({Name_, Key_}, Acc_) -> case lists:keyfind(Name_, 1, ResponseHeaders) of false -> Acc_; {_, Value_} -> Acc_#{Key_ => Value_} end end, Body = lists:foldl(FoldFun, Body0, ResponseHeadersParams), {ok, Body, Response}; Result -> Result end. %% @doc Executes code within an active code interpreter session in Amazon %% Bedrock AgentCore. %% %% This operation processes the provided code, runs it in a secure %% environment, and returns the execution results including output, errors, %% and generated visualizations. %% %% To execute code, you must specify the code interpreter identifier, session %% ID, and the code to run in the arguments parameter. The operation returns %% a stream containing the execution results, which can include text output, %% error messages, and data visualizations. %% %% This operation is subject to request rate limiting based on your %% account's service quotas. %% %% The following operations are related to `InvokeCodeInterpreter': %% %% StartCodeInterpreterSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StartCodeInterpreterSession.html %% %% GetCodeInterpreterSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_GetCodeInterpreterSession.html -spec invoke_code_interpreter(aws_client:aws_client(), binary() | list(), invoke_code_interpreter_request()) -> {ok, invoke_code_interpreter_response(), tuple()} | {error, any()} | {error, invoke_code_interpreter_errors(), tuple()}. invoke_code_interpreter(Client, CodeInterpreterIdentifier, Input) -> invoke_code_interpreter(Client, CodeInterpreterIdentifier, Input, []). -spec invoke_code_interpreter(aws_client:aws_client(), binary() | list(), invoke_code_interpreter_request(), proplists:proplist()) -> {ok, invoke_code_interpreter_response(), tuple()} | {error, any()} | {error, invoke_code_interpreter_errors(), tuple()}. invoke_code_interpreter(Client, CodeInterpreterIdentifier, Input0, Options0) -> Method = post, Path = ["/code-interpreters/", aws_util:encode_uri(CodeInterpreterIdentifier), "/tools/invoke"], 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], HeadersMapping = [ {<<"x-amzn-code-interpreter-session-id">>, <<"sessionId">>}, {<<"X-Amzn-Trace-Id">>, <<"traceId">>}, {<<"traceparent">>, <<"traceParent">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, Query_ = [], Input = Input2, case request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode) of {ok, Body0, {_, ResponseHeaders, _} = Response} -> ResponseHeadersParams = [ {<<"x-amzn-code-interpreter-session-id">>, <<"sessionId">>} ], FoldFun = fun({Name_, Key_}, Acc_) -> case lists:keyfind(Name_, 1, ResponseHeaders) of false -> Acc_; {_, Value_} -> Acc_#{Key_ => Value_} end end, Body = lists:foldl(FoldFun, Body0, ResponseHeadersParams), {ok, Body, Response}; Result -> Result end. %% @doc Operation to invoke a Harness. -spec invoke_harness(aws_client:aws_client(), invoke_harness_request()) -> {ok, invoke_harness_response(), tuple()} | {error, any()} | {error, invoke_harness_errors(), tuple()}. invoke_harness(Client, Input) -> invoke_harness(Client, Input, []). -spec invoke_harness(aws_client:aws_client(), invoke_harness_request(), proplists:proplist()) -> {ok, invoke_harness_response(), tuple()} | {error, any()} | {error, invoke_harness_errors(), tuple()}. invoke_harness(Client, Input0, Options0) -> Method = post, Path = ["/harnesses/invoke"], 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], HeadersMapping = [ {<<"X-Amzn-Bedrock-AgentCore-Runtime-Session-Id">>, <<"runtimeSessionId">>}, {<<"X-Amzn-Bedrock-AgentCore-Runtime-User-Id">>, <<"runtimeUserId">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, QueryMapping = [ {<<"harnessArn">>, <<"harnessArn">>} ], {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Lists all A/B tests in the account. -spec list_a_b_tests(aws_client:aws_client()) -> {ok, list_a_b_tests_response(), tuple()} | {error, any()} | {error, list_a_b_tests_errors(), tuple()}. list_a_b_tests(Client) when is_map(Client) -> list_a_b_tests(Client, #{}, #{}). -spec list_a_b_tests(aws_client:aws_client(), map(), map()) -> {ok, list_a_b_tests_response(), tuple()} | {error, any()} | {error, list_a_b_tests_errors(), tuple()}. list_a_b_tests(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> list_a_b_tests(Client, QueryMap, HeadersMap, []). -spec list_a_b_tests(aws_client:aws_client(), map(), map(), proplists:proplist()) -> {ok, list_a_b_tests_response(), tuple()} | {error, any()} | {error, list_a_b_tests_errors(), tuple()}. list_a_b_tests(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/ab-tests"], 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 all actors in an AgentCore Memory resource. %% %% We recommend using pagination to ensure that the operation returns quickly %% and successfully. %% %% To use this operation, you must have the %% `bedrock-agentcore:ListActors' permission. -spec list_actors(aws_client:aws_client(), binary() | list(), list_actors_input()) -> {ok, list_actors_output(), tuple()} | {error, any()} | {error, list_actors_errors(), tuple()}. list_actors(Client, MemoryId, Input) -> list_actors(Client, MemoryId, Input, []). -spec list_actors(aws_client:aws_client(), binary() | list(), list_actors_input(), proplists:proplist()) -> {ok, list_actors_output(), tuple()} | {error, any()} | {error, list_actors_errors(), tuple()}. list_actors(Client, MemoryId, Input0, Options0) -> Method = post, Path = ["/memories/", aws_util:encode_uri(MemoryId), "/actors"], 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 Lists all batch evaluations in the account, providing summary %% information about each evaluation's status and configuration. -spec list_batch_evaluations(aws_client:aws_client()) -> {ok, list_batch_evaluations_response(), tuple()} | {error, any()} | {error, list_batch_evaluations_errors(), tuple()}. list_batch_evaluations(Client) when is_map(Client) -> list_batch_evaluations(Client, #{}, #{}). -spec list_batch_evaluations(aws_client:aws_client(), map(), map()) -> {ok, list_batch_evaluations_response(), tuple()} | {error, any()} | {error, list_batch_evaluations_errors(), tuple()}. list_batch_evaluations(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> list_batch_evaluations(Client, QueryMap, HeadersMap, []). -spec list_batch_evaluations(aws_client:aws_client(), map(), map(), proplists:proplist()) -> {ok, list_batch_evaluations_response(), tuple()} | {error, any()} | {error, list_batch_evaluations_errors(), tuple()}. list_batch_evaluations(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/evaluations/batch-evaluate"], 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 Retrieves a list of browser sessions in Amazon Bedrock AgentCore that %% match the specified criteria. %% %% This operation returns summary information about each session, including %% identifiers, status, and timestamps. %% %% You can filter the results by browser identifier and session status. The %% operation supports pagination to handle large result sets efficiently. %% %% We recommend using pagination to ensure that the operation returns quickly %% and successfully when retrieving large numbers of sessions. %% %% The following operations are related to `ListBrowserSessions': %% %% StartBrowserSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StartBrowserSession.html %% %% GetBrowserSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_GetBrowserSession.html -spec list_browser_sessions(aws_client:aws_client(), binary() | list(), list_browser_sessions_request()) -> {ok, list_browser_sessions_response(), tuple()} | {error, any()} | {error, list_browser_sessions_errors(), tuple()}. list_browser_sessions(Client, BrowserIdentifier, Input) -> list_browser_sessions(Client, BrowserIdentifier, Input, []). -spec list_browser_sessions(aws_client:aws_client(), binary() | list(), list_browser_sessions_request(), proplists:proplist()) -> {ok, list_browser_sessions_response(), tuple()} | {error, any()} | {error, list_browser_sessions_errors(), tuple()}. list_browser_sessions(Client, BrowserIdentifier, Input0, Options0) -> Method = post, Path = ["/browsers/", aws_util:encode_uri(BrowserIdentifier), "/sessions/list"], 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 Retrieves a list of code interpreter sessions in Amazon Bedrock %% AgentCore that match the specified criteria. %% %% This operation returns summary information about each session, including %% identifiers, status, and timestamps. %% %% You can filter the results by code interpreter identifier and session %% status. The operation supports pagination to handle large result sets %% efficiently. %% %% We recommend using pagination to ensure that the operation returns quickly %% and successfully when retrieving large numbers of sessions. %% %% The following operations are related to `ListCodeInterpreterSessions': %% %% StartCodeInterpreterSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StartCodeInterpreterSession.html %% %% GetCodeInterpreterSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_GetCodeInterpreterSession.html -spec list_code_interpreter_sessions(aws_client:aws_client(), binary() | list(), list_code_interpreter_sessions_request()) -> {ok, list_code_interpreter_sessions_response(), tuple()} | {error, any()} | {error, list_code_interpreter_sessions_errors(), tuple()}. list_code_interpreter_sessions(Client, CodeInterpreterIdentifier, Input) -> list_code_interpreter_sessions(Client, CodeInterpreterIdentifier, Input, []). -spec list_code_interpreter_sessions(aws_client:aws_client(), binary() | list(), list_code_interpreter_sessions_request(), proplists:proplist()) -> {ok, list_code_interpreter_sessions_response(), tuple()} | {error, any()} | {error, list_code_interpreter_sessions_errors(), tuple()}. list_code_interpreter_sessions(Client, CodeInterpreterIdentifier, Input0, Options0) -> Method = post, Path = ["/code-interpreters/", aws_util:encode_uri(CodeInterpreterIdentifier), "/sessions/list"], 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 Lists events in an AgentCore Memory resource based on specified %% criteria. %% %% We recommend using pagination to ensure that the operation returns quickly %% and successfully. %% %% To use this operation, you must have the %% `bedrock-agentcore:ListEvents' permission. -spec list_events(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), list_events_input()) -> {ok, list_events_output(), tuple()} | {error, any()} | {error, list_events_errors(), tuple()}. list_events(Client, ActorId, MemoryId, SessionId, Input) -> list_events(Client, ActorId, MemoryId, SessionId, Input, []). -spec list_events(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), list_events_input(), proplists:proplist()) -> {ok, list_events_output(), tuple()} | {error, any()} | {error, list_events_errors(), tuple()}. list_events(Client, ActorId, MemoryId, SessionId, Input0, Options0) -> Method = post, Path = ["/memories/", aws_util:encode_uri(MemoryId), "/actor/", aws_util:encode_uri(ActorId), "/sessions/", aws_util:encode_uri(SessionId), ""], 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 Lists all long-term memory extraction jobs that are eligible to be %% started with optional filtering. %% %% To use this operation, you must have the %% `bedrock-agentcore:ListMemoryExtractionJobs' permission. -spec list_memory_extraction_jobs(aws_client:aws_client(), binary() | list(), list_memory_extraction_jobs_input()) -> {ok, list_memory_extraction_jobs_output(), tuple()} | {error, any()} | {error, list_memory_extraction_jobs_errors(), tuple()}. list_memory_extraction_jobs(Client, MemoryId, Input) -> list_memory_extraction_jobs(Client, MemoryId, Input, []). -spec list_memory_extraction_jobs(aws_client:aws_client(), binary() | list(), list_memory_extraction_jobs_input(), proplists:proplist()) -> {ok, list_memory_extraction_jobs_output(), tuple()} | {error, any()} | {error, list_memory_extraction_jobs_errors(), tuple()}. list_memory_extraction_jobs(Client, MemoryId, Input0, Options0) -> Method = post, Path = ["/memories/", aws_util:encode_uri(MemoryId), "/extractionJobs"], 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 Lists memory records in an AgentCore Memory resource based on %% specified criteria. %% %% We recommend using pagination to ensure that the operation returns quickly %% and successfully. %% %% To use this operation, you must have the %% `bedrock-agentcore:ListMemoryRecords' permission. -spec list_memory_records(aws_client:aws_client(), binary() | list(), list_memory_records_input()) -> {ok, list_memory_records_output(), tuple()} | {error, any()} | {error, list_memory_records_errors(), tuple()}. list_memory_records(Client, MemoryId, Input) -> list_memory_records(Client, MemoryId, Input, []). -spec list_memory_records(aws_client:aws_client(), binary() | list(), list_memory_records_input(), proplists:proplist()) -> {ok, list_memory_records_output(), tuple()} | {error, any()} | {error, list_memory_records_errors(), tuple()}. list_memory_records(Client, MemoryId, Input0, Options0) -> Method = post, Path = ["/memories/", aws_util:encode_uri(MemoryId), "/memoryRecords"], 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 List payment instruments for a manager. -spec list_payment_instruments(aws_client:aws_client(), list_payment_instruments_request()) -> {ok, list_payment_instruments_response(), tuple()} | {error, any()} | {error, list_payment_instruments_errors(), tuple()}. list_payment_instruments(Client, Input) -> list_payment_instruments(Client, Input, []). -spec list_payment_instruments(aws_client:aws_client(), list_payment_instruments_request(), proplists:proplist()) -> {ok, list_payment_instruments_response(), tuple()} | {error, any()} | {error, list_payment_instruments_errors(), tuple()}. list_payment_instruments(Client, Input0, Options0) -> Method = post, Path = ["/payments/listPaymentInstruments"], 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], HeadersMapping = [ {<<"X-Amzn-Bedrock-AgentCore-Payments-Agent-Name">>, <<"agentName">>}, {<<"X-Amzn-Bedrock-AgentCore-Payments-User-Id">>, <<"userId">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, Query_ = [], Input = Input2, request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc List payment sessions. -spec list_payment_sessions(aws_client:aws_client(), list_payment_sessions_request()) -> {ok, list_payment_sessions_response(), tuple()} | {error, any()} | {error, list_payment_sessions_errors(), tuple()}. list_payment_sessions(Client, Input) -> list_payment_sessions(Client, Input, []). -spec list_payment_sessions(aws_client:aws_client(), list_payment_sessions_request(), proplists:proplist()) -> {ok, list_payment_sessions_response(), tuple()} | {error, any()} | {error, list_payment_sessions_errors(), tuple()}. list_payment_sessions(Client, Input0, Options0) -> Method = post, Path = ["/payments/listPaymentSessions"], 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], HeadersMapping = [ {<<"X-Amzn-Bedrock-AgentCore-Payments-Agent-Name">>, <<"agentName">>}, {<<"X-Amzn-Bedrock-AgentCore-Payments-User-Id">>, <<"userId">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, Query_ = [], Input = Input2, request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Lists all recommendations in the account, with optional filtering by %% status. -spec list_recommendations(aws_client:aws_client()) -> {ok, list_recommendations_response(), tuple()} | {error, any()} | {error, list_recommendations_errors(), tuple()}. list_recommendations(Client) when is_map(Client) -> list_recommendations(Client, #{}, #{}). -spec list_recommendations(aws_client:aws_client(), map(), map()) -> {ok, list_recommendations_response(), tuple()} | {error, any()} | {error, list_recommendations_errors(), tuple()}. list_recommendations(Client, QueryMap, HeadersMap) when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> list_recommendations(Client, QueryMap, HeadersMap, []). -spec list_recommendations(aws_client:aws_client(), map(), map(), proplists:proplist()) -> {ok, list_recommendations_response(), tuple()} | {error, any()} | {error, list_recommendations_errors(), tuple()}. list_recommendations(Client, QueryMap, HeadersMap, Options0) when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> Path = ["/recommendations"], 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)}, {<<"status">>, maps:get(<<"status">>, QueryMap, undefined)} ], Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). %% @doc Lists sessions in an AgentCore Memory resource based on specified %% criteria. %% %% We recommend using pagination to ensure that the operation returns quickly %% and successfully. %% %% Empty sessions are automatically deleted after one day. %% %% To use this operation, you must have the %% `bedrock-agentcore:ListSessions' permission. -spec list_sessions(aws_client:aws_client(), binary() | list(), binary() | list(), list_sessions_input()) -> {ok, list_sessions_output(), tuple()} | {error, any()} | {error, list_sessions_errors(), tuple()}. list_sessions(Client, ActorId, MemoryId, Input) -> list_sessions(Client, ActorId, MemoryId, Input, []). -spec list_sessions(aws_client:aws_client(), binary() | list(), binary() | list(), list_sessions_input(), proplists:proplist()) -> {ok, list_sessions_output(), tuple()} | {error, any()} | {error, list_sessions_errors(), tuple()}. list_sessions(Client, ActorId, MemoryId, Input0, Options0) -> Method = post, Path = ["/memories/", aws_util:encode_uri(MemoryId), "/actor/", aws_util:encode_uri(ActorId), "/sessions"], 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 Processes a payment using a payment instrument within a payment %% session. -spec process_payment(aws_client:aws_client(), process_payment_request()) -> {ok, process_payment_response(), tuple()} | {error, any()} | {error, process_payment_errors(), tuple()}. process_payment(Client, Input) -> process_payment(Client, Input, []). -spec process_payment(aws_client:aws_client(), process_payment_request(), proplists:proplist()) -> {ok, process_payment_response(), tuple()} | {error, any()} | {error, process_payment_errors(), tuple()}. process_payment(Client, Input0, Options0) -> Method = post, Path = ["/payments/processPayment"], 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], HeadersMapping = [ {<<"X-Amzn-Bedrock-AgentCore-Payments-Agent-Name">>, <<"agentName">>}, {<<"X-Amzn-Bedrock-AgentCore-Payments-User-Id">>, <<"userId">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, Query_ = [], Input = Input2, request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Searches for and retrieves memory records from an AgentCore Memory %% resource based on specified search criteria. %% %% We recommend using pagination to ensure that the operation returns quickly %% and successfully. %% %% To use this operation, you must have the %% `bedrock-agentcore:RetrieveMemoryRecords' permission. -spec retrieve_memory_records(aws_client:aws_client(), binary() | list(), retrieve_memory_records_input()) -> {ok, retrieve_memory_records_output(), tuple()} | {error, any()} | {error, retrieve_memory_records_errors(), tuple()}. retrieve_memory_records(Client, MemoryId, Input) -> retrieve_memory_records(Client, MemoryId, Input, []). -spec retrieve_memory_records(aws_client:aws_client(), binary() | list(), retrieve_memory_records_input(), proplists:proplist()) -> {ok, retrieve_memory_records_output(), tuple()} | {error, any()} | {error, retrieve_memory_records_errors(), tuple()}. retrieve_memory_records(Client, MemoryId, Input0, Options0) -> Method = post, Path = ["/memories/", aws_util:encode_uri(MemoryId), "/retrieve"], 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 Saves the current state of a browser session as a reusable profile in %% Amazon Bedrock AgentCore. %% %% A browser profile captures persistent browser data such as cookies and %% local storage from an active session, enabling you to reuse this data in %% future browser sessions. %% %% To save a browser session profile, you must specify the profile %% identifier, browser identifier, and session ID. The session must be active %% when saving the profile. Once saved, the profile can be used with the %% `StartBrowserSession' operation to initialize new sessions with the %% stored browser state. %% %% Browser profiles are useful for scenarios that require persistent %% authentication, maintaining user preferences across sessions, or %% continuing tasks that depend on previously stored browser data. %% %% The following operations are related to `SaveBrowserSessionProfile': %% %% StartBrowserSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StartBrowserSession.html %% %% GetBrowserSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_GetBrowserSession.html -spec save_browser_session_profile(aws_client:aws_client(), binary() | list(), save_browser_session_profile_request()) -> {ok, save_browser_session_profile_response(), tuple()} | {error, any()} | {error, save_browser_session_profile_errors(), tuple()}. save_browser_session_profile(Client, ProfileIdentifier, Input) -> save_browser_session_profile(Client, ProfileIdentifier, Input, []). -spec save_browser_session_profile(aws_client:aws_client(), binary() | list(), save_browser_session_profile_request(), proplists:proplist()) -> {ok, save_browser_session_profile_response(), tuple()} | {error, any()} | {error, save_browser_session_profile_errors(), tuple()}. save_browser_session_profile(Client, ProfileIdentifier, Input0, Options0) -> Method = put, Path = ["/browser-profiles/", aws_util:encode_uri(ProfileIdentifier), "/save"], 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], HeadersMapping = [ {<<"X-Amzn-Trace-Id">>, <<"traceId">>}, {<<"traceparent">>, <<"traceParent">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, Query_ = [], Input = Input2, request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Searches for registry records using semantic, lexical, or hybrid %% queries. %% %% Returns metadata for matching records ordered by relevance within the %% specified registry. -spec search_registry_records(aws_client:aws_client(), search_registry_records_request()) -> {ok, search_registry_records_response(), tuple()} | {error, any()} | {error, search_registry_records_errors(), tuple()}. search_registry_records(Client, Input) -> search_registry_records(Client, Input, []). -spec search_registry_records(aws_client:aws_client(), search_registry_records_request(), proplists:proplist()) -> {ok, search_registry_records_response(), tuple()} | {error, any()} | {error, search_registry_records_errors(), tuple()}. search_registry_records(Client, Input0, Options0) -> Method = post, Path = ["/registry-records/search"], 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 Starts a batch evaluation job that evaluates agent performance across %% multiple sessions. %% %% Batch evaluations pull agent traces from CloudWatch Logs or an existing %% online evaluation configuration and run specified evaluators and insights %% against them. -spec start_batch_evaluation(aws_client:aws_client(), start_batch_evaluation_request()) -> {ok, start_batch_evaluation_response(), tuple()} | {error, any()} | {error, start_batch_evaluation_errors(), tuple()}. start_batch_evaluation(Client, Input) -> start_batch_evaluation(Client, Input, []). -spec start_batch_evaluation(aws_client:aws_client(), start_batch_evaluation_request(), proplists:proplist()) -> {ok, start_batch_evaluation_response(), tuple()} | {error, any()} | {error, start_batch_evaluation_errors(), tuple()}. start_batch_evaluation(Client, Input0, Options0) -> Method = post, Path = ["/evaluations/batch-evaluate"], SuccessStatusCode = 202, {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 initializes a browser session in Amazon Bedrock %% AgentCore. %% %% The session enables agents to navigate and interact with web content, %% extract information from websites, and perform web-based tasks as part of %% their response generation. %% %% To create a session, you must specify a browser identifier and a name. You %% can also configure the viewport dimensions to control the visible area of %% web content. The session remains active until it times out or you %% explicitly stop it using the `StopBrowserSession' operation. %% %% The following operations are related to `StartBrowserSession': %% %% GetBrowserSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_GetBrowserSession.html %% %% UpdateBrowserStream: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_UpdateBrowserStream.html %% %% SaveBrowserSessionProfile: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_SaveBrowserSessionProfile.html %% %% StopBrowserSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StopBrowserSession.html %% %% InvokeBrowser: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_InvokeBrowser.html -spec start_browser_session(aws_client:aws_client(), binary() | list(), start_browser_session_request()) -> {ok, start_browser_session_response(), tuple()} | {error, any()} | {error, start_browser_session_errors(), tuple()}. start_browser_session(Client, BrowserIdentifier, Input) -> start_browser_session(Client, BrowserIdentifier, Input, []). -spec start_browser_session(aws_client:aws_client(), binary() | list(), start_browser_session_request(), proplists:proplist()) -> {ok, start_browser_session_response(), tuple()} | {error, any()} | {error, start_browser_session_errors(), tuple()}. start_browser_session(Client, BrowserIdentifier, Input0, Options0) -> Method = put, Path = ["/browsers/", aws_util:encode_uri(BrowserIdentifier), "/sessions/start"], 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], HeadersMapping = [ {<<"X-Amzn-Trace-Id">>, <<"traceId">>}, {<<"traceparent">>, <<"traceParent">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, Query_ = [], Input = Input2, request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Creates and initializes a code interpreter session in Amazon Bedrock %% AgentCore. %% %% The session enables agents to execute code as part of their response %% generation, supporting programming languages such as Python for data %% analysis, visualization, and computation tasks. %% %% To create a session, you must specify a code interpreter identifier and a %% name. The session remains active until it times out or you explicitly stop %% it using the `StopCodeInterpreterSession' operation. %% %% The following operations are related to `StartCodeInterpreterSession': %% %% InvokeCodeInterpreter: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_InvokeCodeInterpreter.html %% %% GetCodeInterpreterSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_GetCodeInterpreterSession.html %% %% StopCodeInterpreterSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StopCodeInterpreterSession.html -spec start_code_interpreter_session(aws_client:aws_client(), binary() | list(), start_code_interpreter_session_request()) -> {ok, start_code_interpreter_session_response(), tuple()} | {error, any()} | {error, start_code_interpreter_session_errors(), tuple()}. start_code_interpreter_session(Client, CodeInterpreterIdentifier, Input) -> start_code_interpreter_session(Client, CodeInterpreterIdentifier, Input, []). -spec start_code_interpreter_session(aws_client:aws_client(), binary() | list(), start_code_interpreter_session_request(), proplists:proplist()) -> {ok, start_code_interpreter_session_response(), tuple()} | {error, any()} | {error, start_code_interpreter_session_errors(), tuple()}. start_code_interpreter_session(Client, CodeInterpreterIdentifier, Input0, Options0) -> Method = put, Path = ["/code-interpreters/", aws_util:encode_uri(CodeInterpreterIdentifier), "/sessions/start"], 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], HeadersMapping = [ {<<"X-Amzn-Trace-Id">>, <<"traceId">>}, {<<"traceparent">>, <<"traceParent">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, Query_ = [], Input = Input2, request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Starts a memory extraction job that processes events that failed %% extraction previously in an AgentCore Memory resource and produces %% structured memory records. %% %% When earlier extraction attempts have left events unprocessed, this job %% will pick up and extract those as well. %% %% To use this operation, you must have the %% `bedrock-agentcore:StartMemoryExtractionJob' permission. -spec start_memory_extraction_job(aws_client:aws_client(), binary() | list(), start_memory_extraction_job_input()) -> {ok, start_memory_extraction_job_output(), tuple()} | {error, any()} | {error, start_memory_extraction_job_errors(), tuple()}. start_memory_extraction_job(Client, MemoryId, Input) -> start_memory_extraction_job(Client, MemoryId, Input, []). -spec start_memory_extraction_job(aws_client:aws_client(), binary() | list(), start_memory_extraction_job_input(), proplists:proplist()) -> {ok, start_memory_extraction_job_output(), tuple()} | {error, any()} | {error, start_memory_extraction_job_errors(), tuple()}. start_memory_extraction_job(Client, MemoryId, Input0, Options0) -> Method = post, Path = ["/memories/", aws_util:encode_uri(MemoryId), "/extractionJobs/start"], 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 Starts a recommendation job that analyzes agent traces and generates %% optimization suggestions for system prompts or tool descriptions to %% improve agent performance. -spec start_recommendation(aws_client:aws_client(), start_recommendation_request()) -> {ok, start_recommendation_response(), tuple()} | {error, any()} | {error, start_recommendation_errors(), tuple()}. start_recommendation(Client, Input) -> start_recommendation(Client, Input, []). -spec start_recommendation(aws_client:aws_client(), start_recommendation_request(), proplists:proplist()) -> {ok, start_recommendation_response(), tuple()} | {error, any()} | {error, start_recommendation_errors(), tuple()}. start_recommendation(Client, Input0, Options0) -> Method = post, Path = ["/recommendations"], SuccessStatusCode = 202, {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 Stops a running batch evaluation. %% %% Sessions that have already been evaluated retain their results. -spec stop_batch_evaluation(aws_client:aws_client(), binary() | list(), stop_batch_evaluation_request()) -> {ok, stop_batch_evaluation_response(), tuple()} | {error, any()} | {error, stop_batch_evaluation_errors(), tuple()}. stop_batch_evaluation(Client, BatchEvaluationId, Input) -> stop_batch_evaluation(Client, BatchEvaluationId, Input, []). -spec stop_batch_evaluation(aws_client:aws_client(), binary() | list(), stop_batch_evaluation_request(), proplists:proplist()) -> {ok, stop_batch_evaluation_response(), tuple()} | {error, any()} | {error, stop_batch_evaluation_errors(), tuple()}. stop_batch_evaluation(Client, BatchEvaluationId, Input0, Options0) -> Method = post, Path = ["/evaluations/batch-evaluate/", aws_util:encode_uri(BatchEvaluationId), "/stop"], SuccessStatusCode = 202, {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 Terminates an active browser session in Amazon Bedrock AgentCore. %% %% This operation stops the session, releases associated resources, and makes %% the session unavailable for further use. %% %% To stop a browser session, you must specify both the browser identifier %% and the session ID. Once stopped, a session cannot be restarted; you must %% create a new session using `StartBrowserSession'. %% %% The following operations are related to `StopBrowserSession': %% %% StartBrowserSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StartBrowserSession.html %% %% GetBrowserSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_GetBrowserSession.html -spec stop_browser_session(aws_client:aws_client(), binary() | list(), stop_browser_session_request()) -> {ok, stop_browser_session_response(), tuple()} | {error, any()} | {error, stop_browser_session_errors(), tuple()}. stop_browser_session(Client, BrowserIdentifier, Input) -> stop_browser_session(Client, BrowserIdentifier, Input, []). -spec stop_browser_session(aws_client:aws_client(), binary() | list(), stop_browser_session_request(), proplists:proplist()) -> {ok, stop_browser_session_response(), tuple()} | {error, any()} | {error, stop_browser_session_errors(), tuple()}. stop_browser_session(Client, BrowserIdentifier, Input0, Options0) -> Method = put, Path = ["/browsers/", aws_util:encode_uri(BrowserIdentifier), "/sessions/stop"], 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], HeadersMapping = [ {<<"X-Amzn-Trace-Id">>, <<"traceId">>}, {<<"traceparent">>, <<"traceParent">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, QueryMapping = [ {<<"sessionId">>, <<"sessionId">>} ], {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Terminates an active code interpreter session in Amazon Bedrock %% AgentCore. %% %% This operation stops the session, releases associated resources, and makes %% the session unavailable for further use. %% %% To stop a code interpreter session, you must specify both the code %% interpreter identifier and the session ID. Once stopped, a session cannot %% be restarted; you must create a new session using %% `StartCodeInterpreterSession'. %% %% The following operations are related to `StopCodeInterpreterSession': %% %% StartCodeInterpreterSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StartCodeInterpreterSession.html %% %% GetCodeInterpreterSession: %% https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_GetCodeInterpreterSession.html -spec stop_code_interpreter_session(aws_client:aws_client(), binary() | list(), stop_code_interpreter_session_request()) -> {ok, stop_code_interpreter_session_response(), tuple()} | {error, any()} | {error, stop_code_interpreter_session_errors(), tuple()}. stop_code_interpreter_session(Client, CodeInterpreterIdentifier, Input) -> stop_code_interpreter_session(Client, CodeInterpreterIdentifier, Input, []). -spec stop_code_interpreter_session(aws_client:aws_client(), binary() | list(), stop_code_interpreter_session_request(), proplists:proplist()) -> {ok, stop_code_interpreter_session_response(), tuple()} | {error, any()} | {error, stop_code_interpreter_session_errors(), tuple()}. stop_code_interpreter_session(Client, CodeInterpreterIdentifier, Input0, Options0) -> Method = put, Path = ["/code-interpreters/", aws_util:encode_uri(CodeInterpreterIdentifier), "/sessions/stop"], 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], HeadersMapping = [ {<<"X-Amzn-Trace-Id">>, <<"traceId">>}, {<<"traceparent">>, <<"traceParent">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, QueryMapping = [ {<<"sessionId">>, <<"sessionId">>} ], {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %% @doc Stops a session that is running in an running AgentCore Runtime %% agent. -spec stop_runtime_session(aws_client:aws_client(), binary() | list(), stop_runtime_session_request()) -> {ok, stop_runtime_session_response(), tuple()} | {error, any()} | {error, stop_runtime_session_errors(), tuple()}. stop_runtime_session(Client, AgentRuntimeArn, Input) -> stop_runtime_session(Client, AgentRuntimeArn, Input, []). -spec stop_runtime_session(aws_client:aws_client(), binary() | list(), stop_runtime_session_request(), proplists:proplist()) -> {ok, stop_runtime_session_response(), tuple()} | {error, any()} | {error, stop_runtime_session_errors(), tuple()}. stop_runtime_session(Client, AgentRuntimeArn, Input0, Options0) -> Method = post, Path = ["/runtimes/", aws_util:encode_uri(AgentRuntimeArn), "/stopruntimesession"], 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], HeadersMapping = [ {<<"X-Amzn-Bedrock-AgentCore-Runtime-Session-Id">>, <<"runtimeSessionId">>} ], {Headers, Input1} = aws_request:build_headers(HeadersMapping, Input0), CustomHeaders = [], Input2 = Input1, QueryMapping = [ {<<"qualifier">>, <<"qualifier">>} ], {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), case request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode) of {ok, Body0, {_, ResponseHeaders, _} = Response} -> ResponseHeadersParams = [ {<<"X-Amzn-Bedrock-AgentCore-Runtime-Session-Id">>, <<"runtimeSessionId">>} ], FoldFun = fun({Name_, Key_}, Acc_) -> case lists:keyfind(Name_, 1, ResponseHeaders) of false -> Acc_; {_, Value_} -> Acc_#{Key_ => Value_} end end, Body = lists:foldl(FoldFun, Body0, ResponseHeadersParams), {ok, Body, Response}; Result -> Result end. %% @doc Updates an A/B test's configuration, including variants, traffic %% allocation, evaluation settings, or execution status. -spec update_a_b_test(aws_client:aws_client(), binary() | list(), update_a_b_test_request()) -> {ok, update_a_b_test_response(), tuple()} | {error, any()} | {error, update_a_b_test_errors(), tuple()}. update_a_b_test(Client, AbTestId, Input) -> update_a_b_test(Client, AbTestId, Input, []). -spec update_a_b_test(aws_client:aws_client(), binary() | list(), update_a_b_test_request(), proplists:proplist()) -> {ok, update_a_b_test_response(), tuple()} | {error, any()} | {error, update_a_b_test_errors(), tuple()}. update_a_b_test(Client, AbTestId, Input0, Options0) -> Method = put, Path = ["/ab-tests/", aws_util:encode_uri(AbTestId), ""], SuccessStatusCode = 202, {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 a browser stream. %% %% To use this operation, you must have permissions to perform the %% bedrock:UpdateBrowserStream action. -spec update_browser_stream(aws_client:aws_client(), binary() | list(), update_browser_stream_request()) -> {ok, update_browser_stream_response(), tuple()} | {error, any()} | {error, update_browser_stream_errors(), tuple()}. update_browser_stream(Client, BrowserIdentifier, Input) -> update_browser_stream(Client, BrowserIdentifier, Input, []). -spec update_browser_stream(aws_client:aws_client(), binary() | list(), update_browser_stream_request(), proplists:proplist()) -> {ok, update_browser_stream_response(), tuple()} | {error, any()} | {error, update_browser_stream_errors(), tuple()}. update_browser_stream(Client, BrowserIdentifier, Input0, Options0) -> Method = put, Path = ["/browsers/", aws_util:encode_uri(BrowserIdentifier), "/sessions/streams/update"], 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, QueryMapping = [ {<<"sessionId">>, <<"sessionId">>} ], {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). %%==================================================================== %% Internal functions %%==================================================================== -spec proplists_take(any(), proplists:proplist(), any()) -> {any(), proplists:proplist()}. proplists_take(Key, Proplist, Default) -> Value = proplists:get_value(Key, Proplist, Default), {Value, proplists:delete(Key, Proplist)}. -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 => <<"bedrock-agentcore">>}, DefaultHost = build_host(<<"bedrock-agentcore">>, Client1), URL0 = build_url(DefaultHost, Path, Client1), PathBin = erlang:iolist_to_binary(Path), {URL1, Host} = aws_util:apply_endpoint_url_override(URL0, DefaultHost, PathBin, <<"AWS_ENDPOINT_URL_AWS_BEDROCK_AGENTCORE">>), URL = aws_request:add_query(URL1, 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, [{uri_encode_path, true}]), 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).