aws-sdk-bedrockagentcore 1.28.0 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-bedrockagentcore/client.rb +1585 -72
- data/lib/aws-sdk-bedrockagentcore/client_api.rb +1287 -0
- data/lib/aws-sdk-bedrockagentcore/event_streams.rb +74 -0
- data/lib/aws-sdk-bedrockagentcore/types.rb +3531 -156
- data/lib/aws-sdk-bedrockagentcore.rb +1 -1
- data/sig/client.rbs +553 -0
- data/sig/types.rbs +1115 -25
- metadata +1 -1
|
@@ -692,6 +692,116 @@ module Aws::BedrockAgentCore
|
|
|
692
692
|
req.send_request(options)
|
|
693
693
|
end
|
|
694
694
|
|
|
695
|
+
# Creates an A/B test for comparing agent configurations. A/B tests
|
|
696
|
+
# split traffic between a control variant and a treatment variant
|
|
697
|
+
# through a gateway, then evaluate performance using online evaluation
|
|
698
|
+
# configurations to determine which variant performs better.
|
|
699
|
+
#
|
|
700
|
+
# @option params [required, String] :name
|
|
701
|
+
# The name of the A/B test. Must be unique within your account.
|
|
702
|
+
#
|
|
703
|
+
# @option params [String] :description
|
|
704
|
+
# The description of the A/B test.
|
|
705
|
+
#
|
|
706
|
+
# @option params [required, String] :gateway_arn
|
|
707
|
+
# The Amazon Resource Name (ARN) of the gateway to use for traffic
|
|
708
|
+
# splitting.
|
|
709
|
+
#
|
|
710
|
+
# @option params [required, Array<Types::Variant>] :variants
|
|
711
|
+
# The list of variants for the A/B test. Must contain exactly two
|
|
712
|
+
# variants: a control (C) and a treatment (T1), each with a
|
|
713
|
+
# configuration bundle or target reference and a traffic weight.
|
|
714
|
+
#
|
|
715
|
+
# @option params [Types::GatewayFilter] :gateway_filter
|
|
716
|
+
# Optional filter to restrict which gateway target paths are included in
|
|
717
|
+
# the A/B test.
|
|
718
|
+
#
|
|
719
|
+
# @option params [required, Types::ABTestEvaluationConfig] :evaluation_config
|
|
720
|
+
# The evaluation configuration specifying which online evaluation
|
|
721
|
+
# configurations to use for measuring variant performance.
|
|
722
|
+
#
|
|
723
|
+
# @option params [required, String] :role_arn
|
|
724
|
+
# The IAM role ARN that grants permissions for the A/B test to access
|
|
725
|
+
# gateway and evaluation resources.
|
|
726
|
+
#
|
|
727
|
+
# @option params [Boolean] :enable_on_create
|
|
728
|
+
# Whether to enable the A/B test immediately upon creation. If true,
|
|
729
|
+
# traffic splitting begins automatically.
|
|
730
|
+
#
|
|
731
|
+
# @option params [String] :client_token
|
|
732
|
+
# A unique, case-sensitive identifier to ensure that the API request
|
|
733
|
+
# completes no more than one time. If this token matches a previous
|
|
734
|
+
# request, the service ignores the request, but does not return an
|
|
735
|
+
# error.
|
|
736
|
+
#
|
|
737
|
+
# **A suitable default value is auto-generated.** You should normally
|
|
738
|
+
# not need to pass this option.**
|
|
739
|
+
#
|
|
740
|
+
# @return [Types::CreateABTestResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
741
|
+
#
|
|
742
|
+
# * {Types::CreateABTestResponse#ab_test_id #ab_test_id} => String
|
|
743
|
+
# * {Types::CreateABTestResponse#ab_test_arn #ab_test_arn} => String
|
|
744
|
+
# * {Types::CreateABTestResponse#name #name} => String
|
|
745
|
+
# * {Types::CreateABTestResponse#status #status} => String
|
|
746
|
+
# * {Types::CreateABTestResponse#execution_status #execution_status} => String
|
|
747
|
+
# * {Types::CreateABTestResponse#created_at #created_at} => Time
|
|
748
|
+
#
|
|
749
|
+
# @example Request syntax with placeholder values
|
|
750
|
+
#
|
|
751
|
+
# resp = client.create_ab_test({
|
|
752
|
+
# name: "ABTestName", # required
|
|
753
|
+
# description: "ABTestDescription",
|
|
754
|
+
# gateway_arn: "GatewayArn", # required
|
|
755
|
+
# variants: [ # required
|
|
756
|
+
# {
|
|
757
|
+
# name: "VariantName", # required
|
|
758
|
+
# weight: 1, # required
|
|
759
|
+
# variant_configuration: { # required
|
|
760
|
+
# configuration_bundle: {
|
|
761
|
+
# bundle_arn: "ConfigurationBundleArn", # required
|
|
762
|
+
# bundle_version: "ConfigurationBundleVersion", # required
|
|
763
|
+
# },
|
|
764
|
+
# target: {
|
|
765
|
+
# name: "TargetName", # required
|
|
766
|
+
# },
|
|
767
|
+
# },
|
|
768
|
+
# },
|
|
769
|
+
# ],
|
|
770
|
+
# gateway_filter: {
|
|
771
|
+
# target_paths: ["PathPattern"],
|
|
772
|
+
# },
|
|
773
|
+
# evaluation_config: { # required
|
|
774
|
+
# online_evaluation_config_arn: "OnlineEvaluationConfigArn",
|
|
775
|
+
# per_variant_online_evaluation_config: [
|
|
776
|
+
# {
|
|
777
|
+
# name: "VariantName", # required
|
|
778
|
+
# online_evaluation_config_arn: "OnlineEvaluationConfigArn", # required
|
|
779
|
+
# },
|
|
780
|
+
# ],
|
|
781
|
+
# },
|
|
782
|
+
# role_arn: "RoleArn", # required
|
|
783
|
+
# enable_on_create: false,
|
|
784
|
+
# client_token: "ClientToken",
|
|
785
|
+
# })
|
|
786
|
+
#
|
|
787
|
+
# @example Response structure
|
|
788
|
+
#
|
|
789
|
+
# resp.ab_test_id #=> String
|
|
790
|
+
# resp.ab_test_arn #=> String
|
|
791
|
+
# resp.name #=> String
|
|
792
|
+
# resp.status #=> String, one of "CREATING", "ACTIVE", "CREATE_FAILED", "UPDATING", "UPDATE_FAILED", "DELETING", "DELETE_FAILED", "FAILED"
|
|
793
|
+
# resp.execution_status #=> String, one of "PAUSED", "RUNNING", "STOPPED", "NOT_STARTED"
|
|
794
|
+
# resp.created_at #=> Time
|
|
795
|
+
#
|
|
796
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/CreateABTest AWS API Documentation
|
|
797
|
+
#
|
|
798
|
+
# @overload create_ab_test(params = {})
|
|
799
|
+
# @param [Hash] params ({})
|
|
800
|
+
def create_ab_test(params = {}, options = {})
|
|
801
|
+
req = build_request(:create_ab_test, params)
|
|
802
|
+
req.send_request(options)
|
|
803
|
+
end
|
|
804
|
+
|
|
695
805
|
# Creates an event in an AgentCore Memory resource. Events represent
|
|
696
806
|
# interactions or activities that occur within a session and are
|
|
697
807
|
# associated with specific actors.
|
|
@@ -796,6 +906,70 @@ module Aws::BedrockAgentCore
|
|
|
796
906
|
req.send_request(options)
|
|
797
907
|
end
|
|
798
908
|
|
|
909
|
+
# Deletes an A/B test and its associated gateway rules.
|
|
910
|
+
#
|
|
911
|
+
# @option params [required, String] :ab_test_id
|
|
912
|
+
# The unique identifier of the A/B test to delete.
|
|
913
|
+
#
|
|
914
|
+
# @return [Types::DeleteABTestResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
915
|
+
#
|
|
916
|
+
# * {Types::DeleteABTestResponse#ab_test_id #ab_test_id} => String
|
|
917
|
+
# * {Types::DeleteABTestResponse#ab_test_arn #ab_test_arn} => String
|
|
918
|
+
# * {Types::DeleteABTestResponse#status #status} => String
|
|
919
|
+
#
|
|
920
|
+
# @example Request syntax with placeholder values
|
|
921
|
+
#
|
|
922
|
+
# resp = client.delete_ab_test({
|
|
923
|
+
# ab_test_id: "ABTestId", # required
|
|
924
|
+
# })
|
|
925
|
+
#
|
|
926
|
+
# @example Response structure
|
|
927
|
+
#
|
|
928
|
+
# resp.ab_test_id #=> String
|
|
929
|
+
# resp.ab_test_arn #=> String
|
|
930
|
+
# resp.status #=> String, one of "CREATING", "ACTIVE", "CREATE_FAILED", "UPDATING", "UPDATE_FAILED", "DELETING", "DELETE_FAILED", "FAILED"
|
|
931
|
+
#
|
|
932
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/DeleteABTest AWS API Documentation
|
|
933
|
+
#
|
|
934
|
+
# @overload delete_ab_test(params = {})
|
|
935
|
+
# @param [Hash] params ({})
|
|
936
|
+
def delete_ab_test(params = {}, options = {})
|
|
937
|
+
req = build_request(:delete_ab_test, params)
|
|
938
|
+
req.send_request(options)
|
|
939
|
+
end
|
|
940
|
+
|
|
941
|
+
# Deletes a batch evaluation and its associated results.
|
|
942
|
+
#
|
|
943
|
+
# @option params [required, String] :batch_evaluation_id
|
|
944
|
+
# The unique identifier of the batch evaluation to delete.
|
|
945
|
+
#
|
|
946
|
+
# @return [Types::DeleteBatchEvaluationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
947
|
+
#
|
|
948
|
+
# * {Types::DeleteBatchEvaluationResponse#batch_evaluation_id #batch_evaluation_id} => String
|
|
949
|
+
# * {Types::DeleteBatchEvaluationResponse#batch_evaluation_arn #batch_evaluation_arn} => String
|
|
950
|
+
# * {Types::DeleteBatchEvaluationResponse#status #status} => String
|
|
951
|
+
#
|
|
952
|
+
# @example Request syntax with placeholder values
|
|
953
|
+
#
|
|
954
|
+
# resp = client.delete_batch_evaluation({
|
|
955
|
+
# batch_evaluation_id: "BatchEvaluationId", # required
|
|
956
|
+
# })
|
|
957
|
+
#
|
|
958
|
+
# @example Response structure
|
|
959
|
+
#
|
|
960
|
+
# resp.batch_evaluation_id #=> String
|
|
961
|
+
# resp.batch_evaluation_arn #=> String
|
|
962
|
+
# resp.status #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "COMPLETED_WITH_ERRORS", "FAILED", "STOPPING", "STOPPED", "DELETING"
|
|
963
|
+
#
|
|
964
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/DeleteBatchEvaluation AWS API Documentation
|
|
965
|
+
#
|
|
966
|
+
# @overload delete_batch_evaluation(params = {})
|
|
967
|
+
# @param [Hash] params ({})
|
|
968
|
+
def delete_batch_evaluation(params = {}, options = {})
|
|
969
|
+
req = build_request(:delete_batch_evaluation, params)
|
|
970
|
+
req.send_request(options)
|
|
971
|
+
end
|
|
972
|
+
|
|
799
973
|
# Deletes an event from an AgentCore Memory resource. When you delete an
|
|
800
974
|
# event, it is permanently removed.
|
|
801
975
|
#
|
|
@@ -878,6 +1052,36 @@ module Aws::BedrockAgentCore
|
|
|
878
1052
|
req.send_request(options)
|
|
879
1053
|
end
|
|
880
1054
|
|
|
1055
|
+
# Deletes a recommendation and its associated results.
|
|
1056
|
+
#
|
|
1057
|
+
# @option params [required, String] :recommendation_id
|
|
1058
|
+
# The unique identifier of the recommendation to delete.
|
|
1059
|
+
#
|
|
1060
|
+
# @return [Types::DeleteRecommendationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
1061
|
+
#
|
|
1062
|
+
# * {Types::DeleteRecommendationResponse#recommendation_id #recommendation_id} => String
|
|
1063
|
+
# * {Types::DeleteRecommendationResponse#status #status} => String
|
|
1064
|
+
#
|
|
1065
|
+
# @example Request syntax with placeholder values
|
|
1066
|
+
#
|
|
1067
|
+
# resp = client.delete_recommendation({
|
|
1068
|
+
# recommendation_id: "RecommendationId", # required
|
|
1069
|
+
# })
|
|
1070
|
+
#
|
|
1071
|
+
# @example Response structure
|
|
1072
|
+
#
|
|
1073
|
+
# resp.recommendation_id #=> String
|
|
1074
|
+
# resp.status #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "FAILED", "DELETING"
|
|
1075
|
+
#
|
|
1076
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/DeleteRecommendation AWS API Documentation
|
|
1077
|
+
#
|
|
1078
|
+
# @overload delete_recommendation(params = {})
|
|
1079
|
+
# @param [Hash] params ({})
|
|
1080
|
+
def delete_recommendation(params = {}, options = {})
|
|
1081
|
+
req = build_request(:delete_recommendation, params)
|
|
1082
|
+
req.send_request(options)
|
|
1083
|
+
end
|
|
1084
|
+
|
|
881
1085
|
# Performs on-demand evaluation of agent traces using a specified
|
|
882
1086
|
# evaluator. This synchronous API accepts traces in OpenTelemetry format
|
|
883
1087
|
# and returns immediate scoring results with detailed explanations.
|
|
@@ -979,6 +1183,96 @@ module Aws::BedrockAgentCore
|
|
|
979
1183
|
req.send_request(options)
|
|
980
1184
|
end
|
|
981
1185
|
|
|
1186
|
+
# Retrieves detailed information about an A/B test, including its
|
|
1187
|
+
# configuration, status, and statistical results.
|
|
1188
|
+
#
|
|
1189
|
+
# @option params [required, String] :ab_test_id
|
|
1190
|
+
# The unique identifier of the A/B test to retrieve.
|
|
1191
|
+
#
|
|
1192
|
+
# @return [Types::GetABTestResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
1193
|
+
#
|
|
1194
|
+
# * {Types::GetABTestResponse#ab_test_id #ab_test_id} => String
|
|
1195
|
+
# * {Types::GetABTestResponse#ab_test_arn #ab_test_arn} => String
|
|
1196
|
+
# * {Types::GetABTestResponse#name #name} => String
|
|
1197
|
+
# * {Types::GetABTestResponse#description #description} => String
|
|
1198
|
+
# * {Types::GetABTestResponse#status #status} => String
|
|
1199
|
+
# * {Types::GetABTestResponse#execution_status #execution_status} => String
|
|
1200
|
+
# * {Types::GetABTestResponse#gateway_arn #gateway_arn} => String
|
|
1201
|
+
# * {Types::GetABTestResponse#variants #variants} => Array<Types::Variant>
|
|
1202
|
+
# * {Types::GetABTestResponse#gateway_filter #gateway_filter} => Types::GatewayFilter
|
|
1203
|
+
# * {Types::GetABTestResponse#evaluation_config #evaluation_config} => Types::ABTestEvaluationConfig
|
|
1204
|
+
# * {Types::GetABTestResponse#role_arn #role_arn} => String
|
|
1205
|
+
# * {Types::GetABTestResponse#current_run_id #current_run_id} => String
|
|
1206
|
+
# * {Types::GetABTestResponse#error_details #error_details} => Array<String>
|
|
1207
|
+
# * {Types::GetABTestResponse#started_at #started_at} => Time
|
|
1208
|
+
# * {Types::GetABTestResponse#stopped_at #stopped_at} => Time
|
|
1209
|
+
# * {Types::GetABTestResponse#max_duration_expires_at #max_duration_expires_at} => Time
|
|
1210
|
+
# * {Types::GetABTestResponse#created_at #created_at} => Time
|
|
1211
|
+
# * {Types::GetABTestResponse#updated_at #updated_at} => Time
|
|
1212
|
+
# * {Types::GetABTestResponse#results #results} => Types::ABTestResults
|
|
1213
|
+
#
|
|
1214
|
+
# @example Request syntax with placeholder values
|
|
1215
|
+
#
|
|
1216
|
+
# resp = client.get_ab_test({
|
|
1217
|
+
# ab_test_id: "ABTestId", # required
|
|
1218
|
+
# })
|
|
1219
|
+
#
|
|
1220
|
+
# @example Response structure
|
|
1221
|
+
#
|
|
1222
|
+
# resp.ab_test_id #=> String
|
|
1223
|
+
# resp.ab_test_arn #=> String
|
|
1224
|
+
# resp.name #=> String
|
|
1225
|
+
# resp.description #=> String
|
|
1226
|
+
# resp.status #=> String, one of "CREATING", "ACTIVE", "CREATE_FAILED", "UPDATING", "UPDATE_FAILED", "DELETING", "DELETE_FAILED", "FAILED"
|
|
1227
|
+
# resp.execution_status #=> String, one of "PAUSED", "RUNNING", "STOPPED", "NOT_STARTED"
|
|
1228
|
+
# resp.gateway_arn #=> String
|
|
1229
|
+
# resp.variants #=> Array
|
|
1230
|
+
# resp.variants[0].name #=> String
|
|
1231
|
+
# resp.variants[0].weight #=> Integer
|
|
1232
|
+
# resp.variants[0].variant_configuration.configuration_bundle.bundle_arn #=> String
|
|
1233
|
+
# resp.variants[0].variant_configuration.configuration_bundle.bundle_version #=> String
|
|
1234
|
+
# resp.variants[0].variant_configuration.target.name #=> String
|
|
1235
|
+
# resp.gateway_filter.target_paths #=> Array
|
|
1236
|
+
# resp.gateway_filter.target_paths[0] #=> String
|
|
1237
|
+
# resp.evaluation_config.online_evaluation_config_arn #=> String
|
|
1238
|
+
# resp.evaluation_config.per_variant_online_evaluation_config #=> Array
|
|
1239
|
+
# resp.evaluation_config.per_variant_online_evaluation_config[0].name #=> String
|
|
1240
|
+
# resp.evaluation_config.per_variant_online_evaluation_config[0].online_evaluation_config_arn #=> String
|
|
1241
|
+
# resp.role_arn #=> String
|
|
1242
|
+
# resp.current_run_id #=> String
|
|
1243
|
+
# resp.error_details #=> Array
|
|
1244
|
+
# resp.error_details[0] #=> String
|
|
1245
|
+
# resp.started_at #=> Time
|
|
1246
|
+
# resp.stopped_at #=> Time
|
|
1247
|
+
# resp.max_duration_expires_at #=> Time
|
|
1248
|
+
# resp.created_at #=> Time
|
|
1249
|
+
# resp.updated_at #=> Time
|
|
1250
|
+
# resp.results.analysis_timestamp #=> Time
|
|
1251
|
+
# resp.results.evaluator_metrics #=> Array
|
|
1252
|
+
# resp.results.evaluator_metrics[0].evaluator_arn #=> String
|
|
1253
|
+
# resp.results.evaluator_metrics[0].control_stats.variant_name #=> String
|
|
1254
|
+
# resp.results.evaluator_metrics[0].control_stats.sample_size #=> Integer
|
|
1255
|
+
# resp.results.evaluator_metrics[0].control_stats.mean #=> Float
|
|
1256
|
+
# resp.results.evaluator_metrics[0].variant_results #=> Array
|
|
1257
|
+
# resp.results.evaluator_metrics[0].variant_results[0].variant_name #=> String
|
|
1258
|
+
# resp.results.evaluator_metrics[0].variant_results[0].sample_size #=> Integer
|
|
1259
|
+
# resp.results.evaluator_metrics[0].variant_results[0].mean #=> Float
|
|
1260
|
+
# resp.results.evaluator_metrics[0].variant_results[0].absolute_change #=> Float
|
|
1261
|
+
# resp.results.evaluator_metrics[0].variant_results[0].percent_change #=> Float
|
|
1262
|
+
# resp.results.evaluator_metrics[0].variant_results[0].p_value #=> Float
|
|
1263
|
+
# resp.results.evaluator_metrics[0].variant_results[0].confidence_interval.lower #=> Float
|
|
1264
|
+
# resp.results.evaluator_metrics[0].variant_results[0].confidence_interval.upper #=> Float
|
|
1265
|
+
# resp.results.evaluator_metrics[0].variant_results[0].is_significant #=> Boolean
|
|
1266
|
+
#
|
|
1267
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetABTest AWS API Documentation
|
|
1268
|
+
#
|
|
1269
|
+
# @overload get_ab_test(params = {})
|
|
1270
|
+
# @param [Hash] params ({})
|
|
1271
|
+
def get_ab_test(params = {}, options = {})
|
|
1272
|
+
req = build_request(:get_ab_test, params)
|
|
1273
|
+
req.send_request(options)
|
|
1274
|
+
end
|
|
1275
|
+
|
|
982
1276
|
# Retrieves the A2A agent card associated with an AgentCore Runtime
|
|
983
1277
|
# agent.
|
|
984
1278
|
#
|
|
@@ -1024,6 +1318,76 @@ module Aws::BedrockAgentCore
|
|
|
1024
1318
|
req.send_request(options)
|
|
1025
1319
|
end
|
|
1026
1320
|
|
|
1321
|
+
# Retrieves detailed information about a batch evaluation, including its
|
|
1322
|
+
# status, configuration, results, and any error details.
|
|
1323
|
+
#
|
|
1324
|
+
# @option params [required, String] :batch_evaluation_id
|
|
1325
|
+
# The unique identifier of the batch evaluation to retrieve.
|
|
1326
|
+
#
|
|
1327
|
+
# @return [Types::GetBatchEvaluationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
1328
|
+
#
|
|
1329
|
+
# * {Types::GetBatchEvaluationResponse#batch_evaluation_id #batch_evaluation_id} => String
|
|
1330
|
+
# * {Types::GetBatchEvaluationResponse#batch_evaluation_arn #batch_evaluation_arn} => String
|
|
1331
|
+
# * {Types::GetBatchEvaluationResponse#batch_evaluation_name #batch_evaluation_name} => String
|
|
1332
|
+
# * {Types::GetBatchEvaluationResponse#status #status} => String
|
|
1333
|
+
# * {Types::GetBatchEvaluationResponse#created_at #created_at} => Time
|
|
1334
|
+
# * {Types::GetBatchEvaluationResponse#evaluators #evaluators} => Array<Types::Evaluator>
|
|
1335
|
+
# * {Types::GetBatchEvaluationResponse#data_source_config #data_source_config} => Types::DataSourceConfig
|
|
1336
|
+
# * {Types::GetBatchEvaluationResponse#output_config #output_config} => Types::OutputConfig
|
|
1337
|
+
# * {Types::GetBatchEvaluationResponse#evaluation_results #evaluation_results} => Types::EvaluationJobResults
|
|
1338
|
+
# * {Types::GetBatchEvaluationResponse#error_details #error_details} => Array<String>
|
|
1339
|
+
# * {Types::GetBatchEvaluationResponse#description #description} => String
|
|
1340
|
+
# * {Types::GetBatchEvaluationResponse#updated_at #updated_at} => Time
|
|
1341
|
+
#
|
|
1342
|
+
# @example Request syntax with placeholder values
|
|
1343
|
+
#
|
|
1344
|
+
# resp = client.get_batch_evaluation({
|
|
1345
|
+
# batch_evaluation_id: "BatchEvaluationId", # required
|
|
1346
|
+
# })
|
|
1347
|
+
#
|
|
1348
|
+
# @example Response structure
|
|
1349
|
+
#
|
|
1350
|
+
# resp.batch_evaluation_id #=> String
|
|
1351
|
+
# resp.batch_evaluation_arn #=> String
|
|
1352
|
+
# resp.batch_evaluation_name #=> String
|
|
1353
|
+
# resp.status #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "COMPLETED_WITH_ERRORS", "FAILED", "STOPPING", "STOPPED", "DELETING"
|
|
1354
|
+
# resp.created_at #=> Time
|
|
1355
|
+
# resp.evaluators #=> Array
|
|
1356
|
+
# resp.evaluators[0].evaluator_id #=> String
|
|
1357
|
+
# resp.data_source_config.cloud_watch_logs.service_names #=> Array
|
|
1358
|
+
# resp.data_source_config.cloud_watch_logs.service_names[0] #=> String
|
|
1359
|
+
# resp.data_source_config.cloud_watch_logs.log_group_names #=> Array
|
|
1360
|
+
# resp.data_source_config.cloud_watch_logs.log_group_names[0] #=> String
|
|
1361
|
+
# resp.data_source_config.cloud_watch_logs.filter_config.session_ids #=> Array
|
|
1362
|
+
# resp.data_source_config.cloud_watch_logs.filter_config.session_ids[0] #=> String
|
|
1363
|
+
# resp.data_source_config.cloud_watch_logs.filter_config.time_range.start_time #=> Time
|
|
1364
|
+
# resp.data_source_config.cloud_watch_logs.filter_config.time_range.end_time #=> Time
|
|
1365
|
+
# resp.output_config.cloud_watch_config.log_group_name #=> String
|
|
1366
|
+
# resp.output_config.cloud_watch_config.log_stream_name #=> String
|
|
1367
|
+
# resp.evaluation_results.number_of_sessions_completed #=> Integer
|
|
1368
|
+
# resp.evaluation_results.number_of_sessions_in_progress #=> Integer
|
|
1369
|
+
# resp.evaluation_results.number_of_sessions_failed #=> Integer
|
|
1370
|
+
# resp.evaluation_results.total_number_of_sessions #=> Integer
|
|
1371
|
+
# resp.evaluation_results.number_of_sessions_ignored #=> Integer
|
|
1372
|
+
# resp.evaluation_results.evaluator_summaries #=> Array
|
|
1373
|
+
# resp.evaluation_results.evaluator_summaries[0].evaluator_id #=> String
|
|
1374
|
+
# resp.evaluation_results.evaluator_summaries[0].statistics.average_score #=> Float
|
|
1375
|
+
# resp.evaluation_results.evaluator_summaries[0].total_evaluated #=> Integer
|
|
1376
|
+
# resp.evaluation_results.evaluator_summaries[0].total_failed #=> Integer
|
|
1377
|
+
# resp.error_details #=> Array
|
|
1378
|
+
# resp.error_details[0] #=> String
|
|
1379
|
+
# resp.description #=> String
|
|
1380
|
+
# resp.updated_at #=> Time
|
|
1381
|
+
#
|
|
1382
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetBatchEvaluation AWS API Documentation
|
|
1383
|
+
#
|
|
1384
|
+
# @overload get_batch_evaluation(params = {})
|
|
1385
|
+
# @param [Hash] params ({})
|
|
1386
|
+
def get_batch_evaluation(params = {}, options = {})
|
|
1387
|
+
req = build_request(:get_batch_evaluation, params)
|
|
1388
|
+
req.send_request(options)
|
|
1389
|
+
end
|
|
1390
|
+
|
|
1027
1391
|
# Retrieves detailed information about a specific browser session in
|
|
1028
1392
|
# Amazon Bedrock AgentCore. This operation returns the session's
|
|
1029
1393
|
# configuration, current status, associated streams, and metadata.
|
|
@@ -1287,6 +1651,103 @@ module Aws::BedrockAgentCore
|
|
|
1287
1651
|
req.send_request(options)
|
|
1288
1652
|
end
|
|
1289
1653
|
|
|
1654
|
+
# Retrieves detailed information about a recommendation, including its
|
|
1655
|
+
# configuration, status, and results.
|
|
1656
|
+
#
|
|
1657
|
+
# @option params [required, String] :recommendation_id
|
|
1658
|
+
# The unique identifier of the recommendation to retrieve.
|
|
1659
|
+
#
|
|
1660
|
+
# @return [Types::GetRecommendationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
1661
|
+
#
|
|
1662
|
+
# * {Types::GetRecommendationResponse#recommendation_id #recommendation_id} => String
|
|
1663
|
+
# * {Types::GetRecommendationResponse#recommendation_arn #recommendation_arn} => String
|
|
1664
|
+
# * {Types::GetRecommendationResponse#name #name} => String
|
|
1665
|
+
# * {Types::GetRecommendationResponse#description #description} => String
|
|
1666
|
+
# * {Types::GetRecommendationResponse#type #type} => String
|
|
1667
|
+
# * {Types::GetRecommendationResponse#recommendation_config #recommendation_config} => Types::RecommendationConfig
|
|
1668
|
+
# * {Types::GetRecommendationResponse#status #status} => String
|
|
1669
|
+
# * {Types::GetRecommendationResponse#created_at #created_at} => Time
|
|
1670
|
+
# * {Types::GetRecommendationResponse#updated_at #updated_at} => Time
|
|
1671
|
+
# * {Types::GetRecommendationResponse#recommendation_result #recommendation_result} => Types::RecommendationResult
|
|
1672
|
+
#
|
|
1673
|
+
# @example Request syntax with placeholder values
|
|
1674
|
+
#
|
|
1675
|
+
# resp = client.get_recommendation({
|
|
1676
|
+
# recommendation_id: "RecommendationId", # required
|
|
1677
|
+
# })
|
|
1678
|
+
#
|
|
1679
|
+
# @example Response structure
|
|
1680
|
+
#
|
|
1681
|
+
# resp.recommendation_id #=> String
|
|
1682
|
+
# resp.recommendation_arn #=> String
|
|
1683
|
+
# resp.name #=> String
|
|
1684
|
+
# resp.description #=> String
|
|
1685
|
+
# resp.type #=> String, one of "SYSTEM_PROMPT_RECOMMENDATION", "TOOL_DESCRIPTION_RECOMMENDATION"
|
|
1686
|
+
# resp.recommendation_config.system_prompt_recommendation_config.system_prompt.text #=> String
|
|
1687
|
+
# resp.recommendation_config.system_prompt_recommendation_config.system_prompt.configuration_bundle.bundle_arn #=> String
|
|
1688
|
+
# resp.recommendation_config.system_prompt_recommendation_config.system_prompt.configuration_bundle.version_id #=> String
|
|
1689
|
+
# resp.recommendation_config.system_prompt_recommendation_config.system_prompt.configuration_bundle.system_prompt_json_path #=> String
|
|
1690
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.session_spans #=> Array
|
|
1691
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.log_group_arns #=> Array
|
|
1692
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.log_group_arns[0] #=> String
|
|
1693
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.service_names #=> Array
|
|
1694
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.service_names[0] #=> String
|
|
1695
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.start_time #=> Time
|
|
1696
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.end_time #=> Time
|
|
1697
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.rule.filters #=> Array
|
|
1698
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].key #=> String
|
|
1699
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].operator #=> String, one of "Equals", "NotEquals", "GreaterThan", "LessThan", "GreaterThanOrEqual", "LessThanOrEqual", "Contains", "NotContains"
|
|
1700
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].value.string_value #=> String
|
|
1701
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].value.double_value #=> Float
|
|
1702
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].value.boolean_value #=> Boolean
|
|
1703
|
+
# resp.recommendation_config.system_prompt_recommendation_config.evaluation_config.evaluators #=> Array
|
|
1704
|
+
# resp.recommendation_config.system_prompt_recommendation_config.evaluation_config.evaluators[0].evaluator_arn #=> String
|
|
1705
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.tool_description_text.tools #=> Array
|
|
1706
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.tool_description_text.tools[0].tool_name #=> String
|
|
1707
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.tool_description_text.tools[0].tool_description.text #=> String
|
|
1708
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.configuration_bundle.bundle_arn #=> String
|
|
1709
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.configuration_bundle.version_id #=> String
|
|
1710
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.configuration_bundle.tools #=> Array
|
|
1711
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.configuration_bundle.tools[0].tool_name #=> String
|
|
1712
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.configuration_bundle.tools[0].tool_description_json_path #=> String
|
|
1713
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.session_spans #=> Array
|
|
1714
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.log_group_arns #=> Array
|
|
1715
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.log_group_arns[0] #=> String
|
|
1716
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.service_names #=> Array
|
|
1717
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.service_names[0] #=> String
|
|
1718
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.start_time #=> Time
|
|
1719
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.end_time #=> Time
|
|
1720
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.rule.filters #=> Array
|
|
1721
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].key #=> String
|
|
1722
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].operator #=> String, one of "Equals", "NotEquals", "GreaterThan", "LessThan", "GreaterThanOrEqual", "LessThanOrEqual", "Contains", "NotContains"
|
|
1723
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].value.string_value #=> String
|
|
1724
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].value.double_value #=> Float
|
|
1725
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].value.boolean_value #=> Boolean
|
|
1726
|
+
# resp.status #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "FAILED", "DELETING"
|
|
1727
|
+
# resp.created_at #=> Time
|
|
1728
|
+
# resp.updated_at #=> Time
|
|
1729
|
+
# resp.recommendation_result.system_prompt_recommendation_result.recommended_system_prompt #=> String
|
|
1730
|
+
# resp.recommendation_result.system_prompt_recommendation_result.configuration_bundle.bundle_arn #=> String
|
|
1731
|
+
# resp.recommendation_result.system_prompt_recommendation_result.configuration_bundle.version_id #=> String
|
|
1732
|
+
# resp.recommendation_result.system_prompt_recommendation_result.error_code #=> String
|
|
1733
|
+
# resp.recommendation_result.system_prompt_recommendation_result.error_message #=> String
|
|
1734
|
+
# resp.recommendation_result.tool_description_recommendation_result.tools #=> Array
|
|
1735
|
+
# resp.recommendation_result.tool_description_recommendation_result.tools[0].tool_name #=> String
|
|
1736
|
+
# resp.recommendation_result.tool_description_recommendation_result.tools[0].recommended_tool_description #=> String
|
|
1737
|
+
# resp.recommendation_result.tool_description_recommendation_result.configuration_bundle.bundle_arn #=> String
|
|
1738
|
+
# resp.recommendation_result.tool_description_recommendation_result.configuration_bundle.version_id #=> String
|
|
1739
|
+
# resp.recommendation_result.tool_description_recommendation_result.error_code #=> String
|
|
1740
|
+
# resp.recommendation_result.tool_description_recommendation_result.error_message #=> String
|
|
1741
|
+
#
|
|
1742
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetRecommendation AWS API Documentation
|
|
1743
|
+
#
|
|
1744
|
+
# @overload get_recommendation(params = {})
|
|
1745
|
+
# @param [Hash] params ({})
|
|
1746
|
+
def get_recommendation(params = {}, options = {})
|
|
1747
|
+
req = build_request(:get_recommendation, params)
|
|
1748
|
+
req.send_request(options)
|
|
1749
|
+
end
|
|
1750
|
+
|
|
1290
1751
|
# Retrieves the API key associated with an API key credential provider.
|
|
1291
1752
|
#
|
|
1292
1753
|
# @option params [required, String] :workload_identity_token
|
|
@@ -2394,102 +2855,637 @@ module Aws::BedrockAgentCore
|
|
|
2394
2855
|
req.send_request(options, &block)
|
|
2395
2856
|
end
|
|
2396
2857
|
|
|
2397
|
-
#
|
|
2398
|
-
# pagination to ensure that the operation returns quickly and
|
|
2399
|
-
# successfully.
|
|
2400
|
-
#
|
|
2401
|
-
# To use this operation, you must have the
|
|
2402
|
-
# `bedrock-agentcore:ListActors` permission.
|
|
2858
|
+
# Operation to invoke a Harness.
|
|
2403
2859
|
#
|
|
2404
|
-
# @option params [required, String] :
|
|
2405
|
-
# The
|
|
2406
|
-
# actors.
|
|
2860
|
+
# @option params [required, String] :harness_arn
|
|
2861
|
+
# The ARN of the harness to invoke.
|
|
2407
2862
|
#
|
|
2408
|
-
# @option params [
|
|
2409
|
-
# The
|
|
2410
|
-
#
|
|
2863
|
+
# @option params [required, String] :runtime_session_id
|
|
2864
|
+
# The session ID for the invocation. Use the same session ID across
|
|
2865
|
+
# requests to continue a conversation.
|
|
2411
2866
|
#
|
|
2412
|
-
# @option params [
|
|
2413
|
-
# The
|
|
2414
|
-
# previous response in the next request to retrieve the next set of
|
|
2415
|
-
# results.
|
|
2867
|
+
# @option params [required, Array<Types::HarnessMessage>] :messages
|
|
2868
|
+
# The messages to send to the agent.
|
|
2416
2869
|
#
|
|
2417
|
-
# @
|
|
2870
|
+
# @option params [Types::HarnessModelConfiguration] :model
|
|
2871
|
+
# The model configuration to use for this invocation. If specified,
|
|
2872
|
+
# overrides the harness default.
|
|
2418
2873
|
#
|
|
2419
|
-
#
|
|
2420
|
-
#
|
|
2874
|
+
# @option params [Array<Types::HarnessSystemContentBlock>] :system_prompt
|
|
2875
|
+
# The system prompt to use for this invocation. If specified, overrides
|
|
2876
|
+
# the harness default.
|
|
2421
2877
|
#
|
|
2422
|
-
#
|
|
2878
|
+
# @option params [Array<Types::HarnessTool>] :tools
|
|
2879
|
+
# The tools available to the agent for this invocation. If specified,
|
|
2880
|
+
# overrides the harness default.
|
|
2423
2881
|
#
|
|
2424
|
-
# @
|
|
2882
|
+
# @option params [Array<Types::HarnessSkill>] :skills
|
|
2883
|
+
# The skills available to the agent for this invocation. If specified,
|
|
2884
|
+
# overrides the harness default.
|
|
2425
2885
|
#
|
|
2426
|
-
#
|
|
2427
|
-
#
|
|
2428
|
-
#
|
|
2429
|
-
# next_token: "PaginationToken",
|
|
2430
|
-
# })
|
|
2886
|
+
# @option params [Array<String>] :allowed_tools
|
|
2887
|
+
# The tools that the agent is allowed to use for this invocation. If
|
|
2888
|
+
# specified, overrides the harness default.
|
|
2431
2889
|
#
|
|
2432
|
-
# @
|
|
2890
|
+
# @option params [Integer] :max_iterations
|
|
2891
|
+
# The maximum number of iterations the agent loop can execute. If
|
|
2892
|
+
# specified, overrides the harness default.
|
|
2433
2893
|
#
|
|
2434
|
-
#
|
|
2435
|
-
#
|
|
2436
|
-
#
|
|
2894
|
+
# @option params [Integer] :max_tokens
|
|
2895
|
+
# The maximum number of tokens the agent can generate per iteration. If
|
|
2896
|
+
# specified, overrides the harness default.
|
|
2437
2897
|
#
|
|
2438
|
-
# @
|
|
2898
|
+
# @option params [Integer] :timeout_seconds
|
|
2899
|
+
# The maximum duration in seconds for the agent loop execution. If
|
|
2900
|
+
# specified, overrides the harness default.
|
|
2439
2901
|
#
|
|
2440
|
-
# @
|
|
2441
|
-
#
|
|
2442
|
-
|
|
2443
|
-
req = build_request(:list_actors, params)
|
|
2444
|
-
req.send_request(options)
|
|
2445
|
-
end
|
|
2446
|
-
|
|
2447
|
-
# Retrieves a list of browser sessions in Amazon Bedrock AgentCore that
|
|
2448
|
-
# match the specified criteria. This operation returns summary
|
|
2449
|
-
# information about each session, including identifiers, status, and
|
|
2450
|
-
# timestamps.
|
|
2902
|
+
# @option params [String] :actor_id
|
|
2903
|
+
# The actor ID for memory operations. Overrides the actor ID configured
|
|
2904
|
+
# on the harness.
|
|
2451
2905
|
#
|
|
2452
|
-
#
|
|
2453
|
-
# The operation supports pagination to handle large result sets
|
|
2454
|
-
# efficiently.
|
|
2906
|
+
# @return [Types::InvokeHarnessResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
2455
2907
|
#
|
|
2456
|
-
#
|
|
2457
|
-
# quickly and successfully when retrieving large numbers of sessions.
|
|
2908
|
+
# * {Types::InvokeHarnessResponse#stream #stream} => Types::InvokeHarnessStreamOutput
|
|
2458
2909
|
#
|
|
2459
|
-
#
|
|
2910
|
+
# @example EventStream Operation Example
|
|
2460
2911
|
#
|
|
2461
|
-
#
|
|
2912
|
+
# # You can process the event once it arrives immediately, or wait until the
|
|
2913
|
+
# # full response is complete and iterate through the eventstream enumerator.
|
|
2462
2914
|
#
|
|
2463
|
-
#
|
|
2915
|
+
# # To interact with event immediately, you need to register invoke_harness
|
|
2916
|
+
# # with callbacks. Callbacks can be registered for specific events or for all
|
|
2917
|
+
# # events, including error events.
|
|
2464
2918
|
#
|
|
2919
|
+
# # Callbacks can be passed into the `:event_stream_handler` option or within a
|
|
2920
|
+
# # block statement attached to the #invoke_harness call directly. Hybrid
|
|
2921
|
+
# # pattern of both is also supported.
|
|
2465
2922
|
#
|
|
2923
|
+
# # `:event_stream_handler` option takes in either a Proc object or
|
|
2924
|
+
# # Aws::BedrockAgentCore::EventStreams::InvokeHarnessStreamOutput object.
|
|
2466
2925
|
#
|
|
2467
|
-
#
|
|
2468
|
-
#
|
|
2926
|
+
# # Usage pattern a): Callbacks with a block attached to #invoke_harness
|
|
2927
|
+
# # Example for registering callbacks for all event types and an error event
|
|
2928
|
+
# client.invoke_harness(
|
|
2929
|
+
# # params input
|
|
2930
|
+
# ) do |stream|
|
|
2931
|
+
# stream.on_error_event do |event|
|
|
2932
|
+
# # catch unmodeled error event in the stream
|
|
2933
|
+
# raise event
|
|
2934
|
+
# # => Aws::Errors::EventError
|
|
2935
|
+
# # event.event_type => :error
|
|
2936
|
+
# # event.error_code => String
|
|
2937
|
+
# # event.error_message => String
|
|
2938
|
+
# end
|
|
2469
2939
|
#
|
|
2470
|
-
#
|
|
2471
|
-
#
|
|
2472
|
-
#
|
|
2473
|
-
#
|
|
2940
|
+
# stream.on_event do |event|
|
|
2941
|
+
# # process all events arrive
|
|
2942
|
+
# puts event.event_type
|
|
2943
|
+
# # ...
|
|
2944
|
+
# end
|
|
2945
|
+
# end
|
|
2474
2946
|
#
|
|
2475
|
-
#
|
|
2476
|
-
#
|
|
2477
|
-
#
|
|
2478
|
-
# remaining results, make another call with the returned `nextToken`
|
|
2479
|
-
# value.
|
|
2947
|
+
# # Usage pattern b): Pass in `:event_stream_handler` for #invoke_harness
|
|
2948
|
+
# # 1) Create a Aws::BedrockAgentCore::EventStreams::InvokeHarnessStreamOutput object
|
|
2949
|
+
# # Example for registering callbacks with specific events
|
|
2480
2950
|
#
|
|
2481
|
-
#
|
|
2482
|
-
#
|
|
2483
|
-
#
|
|
2484
|
-
#
|
|
2485
|
-
#
|
|
2951
|
+
# handler = Aws::BedrockAgentCore::EventStreams::InvokeHarnessStreamOutput.new
|
|
2952
|
+
# handler.on_message_start_event do |event|
|
|
2953
|
+
# event # => Aws::BedrockAgentCore::Types::messageStart
|
|
2954
|
+
# end
|
|
2955
|
+
# handler.on_content_block_start_event do |event|
|
|
2956
|
+
# event # => Aws::BedrockAgentCore::Types::contentBlockStart
|
|
2957
|
+
# end
|
|
2958
|
+
# handler.on_content_block_delta_event do |event|
|
|
2959
|
+
# event # => Aws::BedrockAgentCore::Types::contentBlockDelta
|
|
2960
|
+
# end
|
|
2961
|
+
# handler.on_content_block_stop_event do |event|
|
|
2962
|
+
# event # => Aws::BedrockAgentCore::Types::contentBlockStop
|
|
2963
|
+
# end
|
|
2964
|
+
# handler.on_message_stop_event do |event|
|
|
2965
|
+
# event # => Aws::BedrockAgentCore::Types::messageStop
|
|
2966
|
+
# end
|
|
2967
|
+
# handler.on_metadata_event do |event|
|
|
2968
|
+
# event # => Aws::BedrockAgentCore::Types::metadata
|
|
2969
|
+
# end
|
|
2970
|
+
# handler.on_internal_server_exception_event do |event|
|
|
2971
|
+
# event # => Aws::BedrockAgentCore::Types::internalServerException
|
|
2972
|
+
# end
|
|
2973
|
+
# handler.on_validation_exception_event do |event|
|
|
2974
|
+
# event # => Aws::BedrockAgentCore::Types::validationException
|
|
2975
|
+
# end
|
|
2976
|
+
# handler.on_runtime_client_error_event do |event|
|
|
2977
|
+
# event # => Aws::BedrockAgentCore::Types::runtimeClientError
|
|
2978
|
+
# end
|
|
2486
2979
|
#
|
|
2487
|
-
#
|
|
2488
|
-
#
|
|
2489
|
-
#
|
|
2490
|
-
#
|
|
2980
|
+
# client.invoke_harness(
|
|
2981
|
+
# # params inputs
|
|
2982
|
+
# event_stream_handler: handler
|
|
2983
|
+
# )
|
|
2491
2984
|
#
|
|
2492
|
-
#
|
|
2985
|
+
# # 2) Use a Ruby Proc object
|
|
2986
|
+
# # Example for registering callbacks with specific events
|
|
2987
|
+
# handler = Proc.new do |stream|
|
|
2988
|
+
# stream.on_message_start_event do |event|
|
|
2989
|
+
# event # => Aws::BedrockAgentCore::Types::messageStart
|
|
2990
|
+
# end
|
|
2991
|
+
# stream.on_content_block_start_event do |event|
|
|
2992
|
+
# event # => Aws::BedrockAgentCore::Types::contentBlockStart
|
|
2993
|
+
# end
|
|
2994
|
+
# stream.on_content_block_delta_event do |event|
|
|
2995
|
+
# event # => Aws::BedrockAgentCore::Types::contentBlockDelta
|
|
2996
|
+
# end
|
|
2997
|
+
# stream.on_content_block_stop_event do |event|
|
|
2998
|
+
# event # => Aws::BedrockAgentCore::Types::contentBlockStop
|
|
2999
|
+
# end
|
|
3000
|
+
# stream.on_message_stop_event do |event|
|
|
3001
|
+
# event # => Aws::BedrockAgentCore::Types::messageStop
|
|
3002
|
+
# end
|
|
3003
|
+
# stream.on_metadata_event do |event|
|
|
3004
|
+
# event # => Aws::BedrockAgentCore::Types::metadata
|
|
3005
|
+
# end
|
|
3006
|
+
# stream.on_internal_server_exception_event do |event|
|
|
3007
|
+
# event # => Aws::BedrockAgentCore::Types::internalServerException
|
|
3008
|
+
# end
|
|
3009
|
+
# stream.on_validation_exception_event do |event|
|
|
3010
|
+
# event # => Aws::BedrockAgentCore::Types::validationException
|
|
3011
|
+
# end
|
|
3012
|
+
# stream.on_runtime_client_error_event do |event|
|
|
3013
|
+
# event # => Aws::BedrockAgentCore::Types::runtimeClientError
|
|
3014
|
+
# end
|
|
3015
|
+
# end
|
|
3016
|
+
#
|
|
3017
|
+
# client.invoke_harness(
|
|
3018
|
+
# # params inputs
|
|
3019
|
+
# event_stream_handler: handler
|
|
3020
|
+
# )
|
|
3021
|
+
#
|
|
3022
|
+
# # Usage pattern c): Hybrid pattern of a) and b)
|
|
3023
|
+
# handler = Aws::BedrockAgentCore::EventStreams::InvokeHarnessStreamOutput.new
|
|
3024
|
+
# handler.on_message_start_event do |event|
|
|
3025
|
+
# event # => Aws::BedrockAgentCore::Types::messageStart
|
|
3026
|
+
# end
|
|
3027
|
+
# handler.on_content_block_start_event do |event|
|
|
3028
|
+
# event # => Aws::BedrockAgentCore::Types::contentBlockStart
|
|
3029
|
+
# end
|
|
3030
|
+
# handler.on_content_block_delta_event do |event|
|
|
3031
|
+
# event # => Aws::BedrockAgentCore::Types::contentBlockDelta
|
|
3032
|
+
# end
|
|
3033
|
+
# handler.on_content_block_stop_event do |event|
|
|
3034
|
+
# event # => Aws::BedrockAgentCore::Types::contentBlockStop
|
|
3035
|
+
# end
|
|
3036
|
+
# handler.on_message_stop_event do |event|
|
|
3037
|
+
# event # => Aws::BedrockAgentCore::Types::messageStop
|
|
3038
|
+
# end
|
|
3039
|
+
# handler.on_metadata_event do |event|
|
|
3040
|
+
# event # => Aws::BedrockAgentCore::Types::metadata
|
|
3041
|
+
# end
|
|
3042
|
+
# handler.on_internal_server_exception_event do |event|
|
|
3043
|
+
# event # => Aws::BedrockAgentCore::Types::internalServerException
|
|
3044
|
+
# end
|
|
3045
|
+
# handler.on_validation_exception_event do |event|
|
|
3046
|
+
# event # => Aws::BedrockAgentCore::Types::validationException
|
|
3047
|
+
# end
|
|
3048
|
+
# handler.on_runtime_client_error_event do |event|
|
|
3049
|
+
# event # => Aws::BedrockAgentCore::Types::runtimeClientError
|
|
3050
|
+
# end
|
|
3051
|
+
#
|
|
3052
|
+
# client.invoke_harness(
|
|
3053
|
+
# # params input
|
|
3054
|
+
# event_stream_handler: handler
|
|
3055
|
+
# ) do |stream|
|
|
3056
|
+
# stream.on_error_event do |event|
|
|
3057
|
+
# # catch unmodeled error event in the stream
|
|
3058
|
+
# raise event
|
|
3059
|
+
# # => Aws::Errors::EventError
|
|
3060
|
+
# # event.event_type => :error
|
|
3061
|
+
# # event.error_code => String
|
|
3062
|
+
# # event.error_message => String
|
|
3063
|
+
# end
|
|
3064
|
+
# end
|
|
3065
|
+
#
|
|
3066
|
+
# # You can also iterate through events after the response complete.
|
|
3067
|
+
# # Events are available at
|
|
3068
|
+
# resp.stream # => Enumerator
|
|
3069
|
+
# # For parameter input example, please refer to following request syntax.
|
|
3070
|
+
#
|
|
3071
|
+
# @example Request syntax with placeholder values
|
|
3072
|
+
#
|
|
3073
|
+
# resp = client.invoke_harness({
|
|
3074
|
+
# harness_arn: "HarnessArn", # required
|
|
3075
|
+
# runtime_session_id: "SessionId", # required
|
|
3076
|
+
# messages: [ # required
|
|
3077
|
+
# {
|
|
3078
|
+
# role: "user", # required, accepts user, assistant
|
|
3079
|
+
# content: [ # required
|
|
3080
|
+
# {
|
|
3081
|
+
# text: "SensitiveText",
|
|
3082
|
+
# tool_use: {
|
|
3083
|
+
# name: "HarnessToolName", # required
|
|
3084
|
+
# tool_use_id: "HarnessToolUseId", # required
|
|
3085
|
+
# input: { # required
|
|
3086
|
+
# },
|
|
3087
|
+
# type: "tool_use", # accepts tool_use, server_tool_use, mcp_tool_use
|
|
3088
|
+
# server_name: "String",
|
|
3089
|
+
# },
|
|
3090
|
+
# tool_result: {
|
|
3091
|
+
# tool_use_id: "HarnessToolUseId", # required
|
|
3092
|
+
# content: [ # required
|
|
3093
|
+
# {
|
|
3094
|
+
# text: "SensitiveText",
|
|
3095
|
+
# json: {
|
|
3096
|
+
# },
|
|
3097
|
+
# },
|
|
3098
|
+
# ],
|
|
3099
|
+
# status: "success", # accepts success, error
|
|
3100
|
+
# type: "tool_use", # accepts tool_use, server_tool_use, mcp_tool_use
|
|
3101
|
+
# },
|
|
3102
|
+
# reasoning_content: {
|
|
3103
|
+
# reasoning_text: {
|
|
3104
|
+
# text: "String", # required
|
|
3105
|
+
# signature: "String",
|
|
3106
|
+
# },
|
|
3107
|
+
# redacted_content: "data",
|
|
3108
|
+
# },
|
|
3109
|
+
# },
|
|
3110
|
+
# ],
|
|
3111
|
+
# },
|
|
3112
|
+
# ],
|
|
3113
|
+
# model: {
|
|
3114
|
+
# bedrock_model_config: {
|
|
3115
|
+
# model_id: "ModelId", # required
|
|
3116
|
+
# max_tokens: 1,
|
|
3117
|
+
# temperature: 1.0,
|
|
3118
|
+
# top_p: 1.0,
|
|
3119
|
+
# },
|
|
3120
|
+
# open_ai_model_config: {
|
|
3121
|
+
# model_id: "ModelId", # required
|
|
3122
|
+
# api_key_arn: "ApiKeyArn", # required
|
|
3123
|
+
# max_tokens: 1,
|
|
3124
|
+
# temperature: 1.0,
|
|
3125
|
+
# top_p: 1.0,
|
|
3126
|
+
# },
|
|
3127
|
+
# gemini_model_config: {
|
|
3128
|
+
# model_id: "ModelId", # required
|
|
3129
|
+
# api_key_arn: "ApiKeyArn", # required
|
|
3130
|
+
# max_tokens: 1,
|
|
3131
|
+
# temperature: 1.0,
|
|
3132
|
+
# top_p: 1.0,
|
|
3133
|
+
# top_k: 1,
|
|
3134
|
+
# },
|
|
3135
|
+
# },
|
|
3136
|
+
# system_prompt: [
|
|
3137
|
+
# {
|
|
3138
|
+
# text: "SensitiveText",
|
|
3139
|
+
# },
|
|
3140
|
+
# ],
|
|
3141
|
+
# tools: [
|
|
3142
|
+
# {
|
|
3143
|
+
# type: "remote_mcp", # required, accepts remote_mcp, agentcore_browser, agentcore_gateway, inline_function, agentcore_code_interpreter
|
|
3144
|
+
# name: "HarnessToolName",
|
|
3145
|
+
# config: {
|
|
3146
|
+
# remote_mcp: {
|
|
3147
|
+
# url: "HarnessRemoteMcpUrl", # required
|
|
3148
|
+
# headers: {
|
|
3149
|
+
# "HttpHeaderKey" => "HttpHeaderValue",
|
|
3150
|
+
# },
|
|
3151
|
+
# },
|
|
3152
|
+
# agent_core_browser: {
|
|
3153
|
+
# browser_arn: "BrowserArn",
|
|
3154
|
+
# },
|
|
3155
|
+
# agent_core_gateway: {
|
|
3156
|
+
# gateway_arn: "GatewayArn", # required
|
|
3157
|
+
# outbound_auth: {
|
|
3158
|
+
# aws_iam: {
|
|
3159
|
+
# },
|
|
3160
|
+
# none: {
|
|
3161
|
+
# },
|
|
3162
|
+
# oauth: {
|
|
3163
|
+
# provider_arn: "OAuthCredentialProviderArn", # required
|
|
3164
|
+
# scopes: ["OAuthScope"], # required
|
|
3165
|
+
# custom_parameters: {
|
|
3166
|
+
# "OAuthCustomParametersKey" => "OAuthCustomParametersValue",
|
|
3167
|
+
# },
|
|
3168
|
+
# grant_type: "CLIENT_CREDENTIALS", # accepts CLIENT_CREDENTIALS, AUTHORIZATION_CODE
|
|
3169
|
+
# default_return_url: "OAuthDefaultReturnUrl",
|
|
3170
|
+
# },
|
|
3171
|
+
# },
|
|
3172
|
+
# },
|
|
3173
|
+
# inline_function: {
|
|
3174
|
+
# description: "HarnessInlineFunctionDescription", # required
|
|
3175
|
+
# input_schema: { # required
|
|
3176
|
+
# },
|
|
3177
|
+
# },
|
|
3178
|
+
# agent_core_code_interpreter: {
|
|
3179
|
+
# code_interpreter_arn: "CodeInterpreterArn",
|
|
3180
|
+
# },
|
|
3181
|
+
# },
|
|
3182
|
+
# },
|
|
3183
|
+
# ],
|
|
3184
|
+
# skills: [
|
|
3185
|
+
# {
|
|
3186
|
+
# path: "HarnessSkillPath",
|
|
3187
|
+
# },
|
|
3188
|
+
# ],
|
|
3189
|
+
# allowed_tools: ["HarnessAllowedTool"],
|
|
3190
|
+
# max_iterations: 1,
|
|
3191
|
+
# max_tokens: 1,
|
|
3192
|
+
# timeout_seconds: 1,
|
|
3193
|
+
# actor_id: "String",
|
|
3194
|
+
# })
|
|
3195
|
+
#
|
|
3196
|
+
# @example Response structure
|
|
3197
|
+
#
|
|
3198
|
+
# # All events are available at resp.stream:
|
|
3199
|
+
# resp.stream #=> Enumerator
|
|
3200
|
+
# resp.stream.event_types #=> [:message_start, :content_block_start, :content_block_delta, :content_block_stop, :message_stop, :metadata, :internal_server_exception, :validation_exception, :runtime_client_error]
|
|
3201
|
+
#
|
|
3202
|
+
# # For :message_start event available at #on_message_start_event callback and response eventstream enumerator:
|
|
3203
|
+
# event.role #=> String, one of "user", "assistant"
|
|
3204
|
+
#
|
|
3205
|
+
# # For :content_block_start event available at #on_content_block_start_event callback and response eventstream enumerator:
|
|
3206
|
+
# event.content_block_index #=> Integer
|
|
3207
|
+
# event.start.tool_use.tool_use_id #=> String
|
|
3208
|
+
# event.start.tool_use.name #=> String
|
|
3209
|
+
# event.start.tool_use.type #=> String, one of "tool_use", "server_tool_use", "mcp_tool_use"
|
|
3210
|
+
# event.start.tool_use.server_name #=> String
|
|
3211
|
+
# event.start.tool_result.tool_use_id #=> String
|
|
3212
|
+
# event.start.tool_result.status #=> String, one of "success", "error"
|
|
3213
|
+
#
|
|
3214
|
+
# # For :content_block_delta event available at #on_content_block_delta_event callback and response eventstream enumerator:
|
|
3215
|
+
# event.content_block_index #=> Integer
|
|
3216
|
+
# event.delta.text #=> String
|
|
3217
|
+
# event.delta.tool_use.input #=> String
|
|
3218
|
+
# event.delta.tool_result #=> Array
|
|
3219
|
+
# event.delta.tool_result[0].text #=> String
|
|
3220
|
+
# event.delta.reasoning_content.text #=> String
|
|
3221
|
+
# event.delta.reasoning_content.redacted_content #=> String
|
|
3222
|
+
# event.delta.reasoning_content.signature #=> String
|
|
3223
|
+
#
|
|
3224
|
+
# # For :content_block_stop event available at #on_content_block_stop_event callback and response eventstream enumerator:
|
|
3225
|
+
# event.content_block_index #=> Integer
|
|
3226
|
+
#
|
|
3227
|
+
# # For :message_stop event available at #on_message_stop_event callback and response eventstream enumerator:
|
|
3228
|
+
# event.stop_reason #=> String, one of "end_turn", "tool_use", "tool_result", "max_tokens", "stop_sequence", "content_filtered", "malformed_model_output", "malformed_tool_use", "interrupted", "partial_turn", "model_context_window_exceeded", "max_iterations_exceeded", "max_output_tokens_exceeded", "timeout_exceeded"
|
|
3229
|
+
#
|
|
3230
|
+
# # For :metadata event available at #on_metadata_event callback and response eventstream enumerator:
|
|
3231
|
+
# event.usage.input_tokens #=> Integer
|
|
3232
|
+
# event.usage.output_tokens #=> Integer
|
|
3233
|
+
# event.usage.total_tokens #=> Integer
|
|
3234
|
+
# event.usage.cache_read_input_tokens #=> Integer
|
|
3235
|
+
# event.usage.cache_write_input_tokens #=> Integer
|
|
3236
|
+
# event.metrics.latency_ms #=> Integer
|
|
3237
|
+
#
|
|
3238
|
+
# # For :internal_server_exception event available at #on_internal_server_exception_event callback and response eventstream enumerator:
|
|
3239
|
+
# event.message #=> String
|
|
3240
|
+
#
|
|
3241
|
+
# # For :validation_exception event available at #on_validation_exception_event callback and response eventstream enumerator:
|
|
3242
|
+
# event.message #=> String
|
|
3243
|
+
# event.reason #=> String, one of "CannotParse", "FieldValidationFailed", "IdempotentParameterMismatchException", "EventInOtherSession", "ResourceConflict"
|
|
3244
|
+
# event.field_list #=> Array
|
|
3245
|
+
# event.field_list[0].name #=> String
|
|
3246
|
+
# event.field_list[0].message #=> String
|
|
3247
|
+
#
|
|
3248
|
+
# # For :runtime_client_error event available at #on_runtime_client_error_event callback and response eventstream enumerator:
|
|
3249
|
+
# event.message #=> String
|
|
3250
|
+
#
|
|
3251
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/InvokeHarness AWS API Documentation
|
|
3252
|
+
#
|
|
3253
|
+
# @overload invoke_harness(params = {})
|
|
3254
|
+
# @param [Hash] params ({})
|
|
3255
|
+
def invoke_harness(params = {}, options = {}, &block)
|
|
3256
|
+
params = params.dup
|
|
3257
|
+
event_stream_handler = case handler = params.delete(:event_stream_handler)
|
|
3258
|
+
when EventStreams::InvokeHarnessStreamOutput then handler
|
|
3259
|
+
when Proc then EventStreams::InvokeHarnessStreamOutput.new.tap(&handler)
|
|
3260
|
+
when nil then EventStreams::InvokeHarnessStreamOutput.new
|
|
3261
|
+
else
|
|
3262
|
+
msg = "expected :event_stream_handler to be a block or "\
|
|
3263
|
+
"instance of Aws::BedrockAgentCore::EventStreams::InvokeHarnessStreamOutput"\
|
|
3264
|
+
", got `#{handler.inspect}` instead"
|
|
3265
|
+
raise ArgumentError, msg
|
|
3266
|
+
end
|
|
3267
|
+
|
|
3268
|
+
yield(event_stream_handler) if block_given?
|
|
3269
|
+
|
|
3270
|
+
req = build_request(:invoke_harness, params)
|
|
3271
|
+
|
|
3272
|
+
req.context[:event_stream_handler] = event_stream_handler
|
|
3273
|
+
req.handlers.add(Aws::Binary::DecodeHandler, priority: 95)
|
|
3274
|
+
|
|
3275
|
+
req.send_request(options, &block)
|
|
3276
|
+
end
|
|
3277
|
+
|
|
3278
|
+
# Lists all A/B tests in the account.
|
|
3279
|
+
#
|
|
3280
|
+
# @option params [Integer] :max_results
|
|
3281
|
+
# The maximum number of results to return in the response. If the total
|
|
3282
|
+
# number of results is greater than this value, use the token returned
|
|
3283
|
+
# in the response in the `nextToken` field when making another request
|
|
3284
|
+
# to return the next batch of results.
|
|
3285
|
+
#
|
|
3286
|
+
# @option params [String] :next_token
|
|
3287
|
+
# If the total number of results is greater than the `maxResults` value
|
|
3288
|
+
# provided in the request, enter the token returned in the `nextToken`
|
|
3289
|
+
# field in the response in this field to return the next batch of
|
|
3290
|
+
# results.
|
|
3291
|
+
#
|
|
3292
|
+
# @return [Types::ListABTestsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
3293
|
+
#
|
|
3294
|
+
# * {Types::ListABTestsResponse#ab_tests #ab_tests} => Array<Types::ABTestSummary>
|
|
3295
|
+
# * {Types::ListABTestsResponse#next_token #next_token} => String
|
|
3296
|
+
#
|
|
3297
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
|
3298
|
+
#
|
|
3299
|
+
# @example Request syntax with placeholder values
|
|
3300
|
+
#
|
|
3301
|
+
# resp = client.list_ab_tests({
|
|
3302
|
+
# max_results: 1,
|
|
3303
|
+
# next_token: "String",
|
|
3304
|
+
# })
|
|
3305
|
+
#
|
|
3306
|
+
# @example Response structure
|
|
3307
|
+
#
|
|
3308
|
+
# resp.ab_tests #=> Array
|
|
3309
|
+
# resp.ab_tests[0].ab_test_id #=> String
|
|
3310
|
+
# resp.ab_tests[0].ab_test_arn #=> String
|
|
3311
|
+
# resp.ab_tests[0].name #=> String
|
|
3312
|
+
# resp.ab_tests[0].status #=> String, one of "CREATING", "ACTIVE", "CREATE_FAILED", "UPDATING", "UPDATE_FAILED", "DELETING", "DELETE_FAILED", "FAILED"
|
|
3313
|
+
# resp.ab_tests[0].execution_status #=> String, one of "PAUSED", "RUNNING", "STOPPED", "NOT_STARTED"
|
|
3314
|
+
# resp.ab_tests[0].description #=> String
|
|
3315
|
+
# resp.ab_tests[0].gateway_arn #=> String
|
|
3316
|
+
# resp.ab_tests[0].created_at #=> Time
|
|
3317
|
+
# resp.ab_tests[0].updated_at #=> Time
|
|
3318
|
+
# resp.next_token #=> String
|
|
3319
|
+
#
|
|
3320
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/ListABTests AWS API Documentation
|
|
3321
|
+
#
|
|
3322
|
+
# @overload list_ab_tests(params = {})
|
|
3323
|
+
# @param [Hash] params ({})
|
|
3324
|
+
def list_ab_tests(params = {}, options = {})
|
|
3325
|
+
req = build_request(:list_ab_tests, params)
|
|
3326
|
+
req.send_request(options)
|
|
3327
|
+
end
|
|
3328
|
+
|
|
3329
|
+
# Lists all actors in an AgentCore Memory resource. We recommend using
|
|
3330
|
+
# pagination to ensure that the operation returns quickly and
|
|
3331
|
+
# successfully.
|
|
3332
|
+
#
|
|
3333
|
+
# To use this operation, you must have the
|
|
3334
|
+
# `bedrock-agentcore:ListActors` permission.
|
|
3335
|
+
#
|
|
3336
|
+
# @option params [required, String] :memory_id
|
|
3337
|
+
# The identifier of the AgentCore Memory resource for which to list
|
|
3338
|
+
# actors.
|
|
3339
|
+
#
|
|
3340
|
+
# @option params [Integer] :max_results
|
|
3341
|
+
# The maximum number of results to return in a single call. The default
|
|
3342
|
+
# value is 20.
|
|
3343
|
+
#
|
|
3344
|
+
# @option params [String] :next_token
|
|
3345
|
+
# The token for the next set of results. Use the value returned in the
|
|
3346
|
+
# previous response in the next request to retrieve the next set of
|
|
3347
|
+
# results.
|
|
3348
|
+
#
|
|
3349
|
+
# @return [Types::ListActorsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
3350
|
+
#
|
|
3351
|
+
# * {Types::ListActorsOutput#actor_summaries #actor_summaries} => Array<Types::ActorSummary>
|
|
3352
|
+
# * {Types::ListActorsOutput#next_token #next_token} => String
|
|
3353
|
+
#
|
|
3354
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
|
3355
|
+
#
|
|
3356
|
+
# @example Request syntax with placeholder values
|
|
3357
|
+
#
|
|
3358
|
+
# resp = client.list_actors({
|
|
3359
|
+
# memory_id: "MemoryId", # required
|
|
3360
|
+
# max_results: 1,
|
|
3361
|
+
# next_token: "PaginationToken",
|
|
3362
|
+
# })
|
|
3363
|
+
#
|
|
3364
|
+
# @example Response structure
|
|
3365
|
+
#
|
|
3366
|
+
# resp.actor_summaries #=> Array
|
|
3367
|
+
# resp.actor_summaries[0].actor_id #=> String
|
|
3368
|
+
# resp.next_token #=> String
|
|
3369
|
+
#
|
|
3370
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/ListActors AWS API Documentation
|
|
3371
|
+
#
|
|
3372
|
+
# @overload list_actors(params = {})
|
|
3373
|
+
# @param [Hash] params ({})
|
|
3374
|
+
def list_actors(params = {}, options = {})
|
|
3375
|
+
req = build_request(:list_actors, params)
|
|
3376
|
+
req.send_request(options)
|
|
3377
|
+
end
|
|
3378
|
+
|
|
3379
|
+
# Lists all batch evaluations in the account, providing summary
|
|
3380
|
+
# information about each evaluation's status and configuration.
|
|
3381
|
+
#
|
|
3382
|
+
# @option params [Integer] :max_results
|
|
3383
|
+
# The maximum number of results to return in the response. If the total
|
|
3384
|
+
# number of results is greater than this value, use the token returned
|
|
3385
|
+
# in the response in the `nextToken` field when making another request
|
|
3386
|
+
# to return the next batch of results.
|
|
3387
|
+
#
|
|
3388
|
+
# @option params [String] :next_token
|
|
3389
|
+
# If the total number of results is greater than the `maxResults` value
|
|
3390
|
+
# provided in the request, enter the token returned in the `nextToken`
|
|
3391
|
+
# field in the response in this field to return the next batch of
|
|
3392
|
+
# results.
|
|
3393
|
+
#
|
|
3394
|
+
# @return [Types::ListBatchEvaluationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
3395
|
+
#
|
|
3396
|
+
# * {Types::ListBatchEvaluationsResponse#batch_evaluations #batch_evaluations} => Array<Types::BatchEvaluationSummary>
|
|
3397
|
+
# * {Types::ListBatchEvaluationsResponse#next_token #next_token} => String
|
|
3398
|
+
#
|
|
3399
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
|
3400
|
+
#
|
|
3401
|
+
# @example Request syntax with placeholder values
|
|
3402
|
+
#
|
|
3403
|
+
# resp = client.list_batch_evaluations({
|
|
3404
|
+
# max_results: 1,
|
|
3405
|
+
# next_token: "String",
|
|
3406
|
+
# })
|
|
3407
|
+
#
|
|
3408
|
+
# @example Response structure
|
|
3409
|
+
#
|
|
3410
|
+
# resp.batch_evaluations #=> Array
|
|
3411
|
+
# resp.batch_evaluations[0].batch_evaluation_id #=> String
|
|
3412
|
+
# resp.batch_evaluations[0].batch_evaluation_arn #=> String
|
|
3413
|
+
# resp.batch_evaluations[0].batch_evaluation_name #=> String
|
|
3414
|
+
# resp.batch_evaluations[0].status #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "COMPLETED_WITH_ERRORS", "FAILED", "STOPPING", "STOPPED", "DELETING"
|
|
3415
|
+
# resp.batch_evaluations[0].created_at #=> Time
|
|
3416
|
+
# resp.batch_evaluations[0].description #=> String
|
|
3417
|
+
# resp.batch_evaluations[0].evaluators #=> Array
|
|
3418
|
+
# resp.batch_evaluations[0].evaluators[0].evaluator_id #=> String
|
|
3419
|
+
# resp.batch_evaluations[0].evaluation_results.number_of_sessions_completed #=> Integer
|
|
3420
|
+
# resp.batch_evaluations[0].evaluation_results.number_of_sessions_in_progress #=> Integer
|
|
3421
|
+
# resp.batch_evaluations[0].evaluation_results.number_of_sessions_failed #=> Integer
|
|
3422
|
+
# resp.batch_evaluations[0].evaluation_results.total_number_of_sessions #=> Integer
|
|
3423
|
+
# resp.batch_evaluations[0].evaluation_results.number_of_sessions_ignored #=> Integer
|
|
3424
|
+
# resp.batch_evaluations[0].evaluation_results.evaluator_summaries #=> Array
|
|
3425
|
+
# resp.batch_evaluations[0].evaluation_results.evaluator_summaries[0].evaluator_id #=> String
|
|
3426
|
+
# resp.batch_evaluations[0].evaluation_results.evaluator_summaries[0].statistics.average_score #=> Float
|
|
3427
|
+
# resp.batch_evaluations[0].evaluation_results.evaluator_summaries[0].total_evaluated #=> Integer
|
|
3428
|
+
# resp.batch_evaluations[0].evaluation_results.evaluator_summaries[0].total_failed #=> Integer
|
|
3429
|
+
# resp.batch_evaluations[0].error_details #=> Array
|
|
3430
|
+
# resp.batch_evaluations[0].error_details[0] #=> String
|
|
3431
|
+
# resp.batch_evaluations[0].updated_at #=> Time
|
|
3432
|
+
# resp.next_token #=> String
|
|
3433
|
+
#
|
|
3434
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/ListBatchEvaluations AWS API Documentation
|
|
3435
|
+
#
|
|
3436
|
+
# @overload list_batch_evaluations(params = {})
|
|
3437
|
+
# @param [Hash] params ({})
|
|
3438
|
+
def list_batch_evaluations(params = {}, options = {})
|
|
3439
|
+
req = build_request(:list_batch_evaluations, params)
|
|
3440
|
+
req.send_request(options)
|
|
3441
|
+
end
|
|
3442
|
+
|
|
3443
|
+
# Retrieves a list of browser sessions in Amazon Bedrock AgentCore that
|
|
3444
|
+
# match the specified criteria. This operation returns summary
|
|
3445
|
+
# information about each session, including identifiers, status, and
|
|
3446
|
+
# timestamps.
|
|
3447
|
+
#
|
|
3448
|
+
# You can filter the results by browser identifier and session status.
|
|
3449
|
+
# The operation supports pagination to handle large result sets
|
|
3450
|
+
# efficiently.
|
|
3451
|
+
#
|
|
3452
|
+
# We recommend using pagination to ensure that the operation returns
|
|
3453
|
+
# quickly and successfully when retrieving large numbers of sessions.
|
|
3454
|
+
#
|
|
3455
|
+
# The following operations are related to `ListBrowserSessions`:
|
|
3456
|
+
#
|
|
3457
|
+
# * [StartBrowserSession][1]
|
|
3458
|
+
#
|
|
3459
|
+
# * [GetBrowserSession][2]
|
|
3460
|
+
#
|
|
3461
|
+
#
|
|
3462
|
+
#
|
|
3463
|
+
# [1]: https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StartBrowserSession.html
|
|
3464
|
+
# [2]: https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_GetBrowserSession.html
|
|
3465
|
+
#
|
|
3466
|
+
# @option params [required, String] :browser_identifier
|
|
3467
|
+
# The unique identifier of the browser to list sessions for. If
|
|
3468
|
+
# specified, only sessions for this browser are returned. If not
|
|
3469
|
+
# specified, sessions for all browsers are returned.
|
|
3470
|
+
#
|
|
3471
|
+
# @option params [Integer] :max_results
|
|
3472
|
+
# The maximum number of results to return in a single call. The default
|
|
3473
|
+
# value is 10. Valid values range from 1 to 100. To retrieve the
|
|
3474
|
+
# remaining results, make another call with the returned `nextToken`
|
|
3475
|
+
# value.
|
|
3476
|
+
#
|
|
3477
|
+
# @option params [String] :next_token
|
|
3478
|
+
# The token for the next set of results. Use the value returned in the
|
|
3479
|
+
# previous response in the next request to retrieve the next set of
|
|
3480
|
+
# results. If not specified, Amazon Bedrock AgentCore returns the first
|
|
3481
|
+
# page of results.
|
|
3482
|
+
#
|
|
3483
|
+
# @option params [String] :status
|
|
3484
|
+
# The status of the browser sessions to list. Valid values include
|
|
3485
|
+
# ACTIVE, STOPPING, and STOPPED. If not specified, sessions with any
|
|
3486
|
+
# status are returned.
|
|
3487
|
+
#
|
|
3488
|
+
# @return [Types::ListBrowserSessionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
2493
3489
|
#
|
|
2494
3490
|
# * {Types::ListBrowserSessionsResponse#items #items} => Array<Types::BrowserSessionSummary>
|
|
2495
3491
|
# * {Types::ListBrowserSessionsResponse#next_token #next_token} => String
|
|
@@ -2836,6 +3832,62 @@ module Aws::BedrockAgentCore
|
|
|
2836
3832
|
req.send_request(options)
|
|
2837
3833
|
end
|
|
2838
3834
|
|
|
3835
|
+
# Lists all recommendations in the account, with optional filtering by
|
|
3836
|
+
# status.
|
|
3837
|
+
#
|
|
3838
|
+
# @option params [Integer] :max_results
|
|
3839
|
+
# The maximum number of results to return in the response. If the total
|
|
3840
|
+
# number of results is greater than this value, use the token returned
|
|
3841
|
+
# in the response in the `nextToken` field when making another request
|
|
3842
|
+
# to return the next batch of results.
|
|
3843
|
+
#
|
|
3844
|
+
# @option params [String] :next_token
|
|
3845
|
+
# If the total number of results is greater than the `maxResults` value
|
|
3846
|
+
# provided in the request, enter the token returned in the `nextToken`
|
|
3847
|
+
# field in the response in this field to return the next batch of
|
|
3848
|
+
# results.
|
|
3849
|
+
#
|
|
3850
|
+
# @option params [String] :status_filter
|
|
3851
|
+
# Optional filter to return only recommendations with the specified
|
|
3852
|
+
# status.
|
|
3853
|
+
#
|
|
3854
|
+
# @return [Types::ListRecommendationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
3855
|
+
#
|
|
3856
|
+
# * {Types::ListRecommendationsResponse#recommendation_summaries #recommendation_summaries} => Array<Types::RecommendationSummary>
|
|
3857
|
+
# * {Types::ListRecommendationsResponse#next_token #next_token} => String
|
|
3858
|
+
#
|
|
3859
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
|
3860
|
+
#
|
|
3861
|
+
# @example Request syntax with placeholder values
|
|
3862
|
+
#
|
|
3863
|
+
# resp = client.list_recommendations({
|
|
3864
|
+
# max_results: 1,
|
|
3865
|
+
# next_token: "NextToken",
|
|
3866
|
+
# status_filter: "PENDING", # accepts PENDING, IN_PROGRESS, COMPLETED, FAILED, DELETING
|
|
3867
|
+
# })
|
|
3868
|
+
#
|
|
3869
|
+
# @example Response structure
|
|
3870
|
+
#
|
|
3871
|
+
# resp.recommendation_summaries #=> Array
|
|
3872
|
+
# resp.recommendation_summaries[0].recommendation_id #=> String
|
|
3873
|
+
# resp.recommendation_summaries[0].recommendation_arn #=> String
|
|
3874
|
+
# resp.recommendation_summaries[0].name #=> String
|
|
3875
|
+
# resp.recommendation_summaries[0].description #=> String
|
|
3876
|
+
# resp.recommendation_summaries[0].type #=> String, one of "SYSTEM_PROMPT_RECOMMENDATION", "TOOL_DESCRIPTION_RECOMMENDATION"
|
|
3877
|
+
# resp.recommendation_summaries[0].status #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "FAILED", "DELETING"
|
|
3878
|
+
# resp.recommendation_summaries[0].created_at #=> Time
|
|
3879
|
+
# resp.recommendation_summaries[0].updated_at #=> Time
|
|
3880
|
+
# resp.next_token #=> String
|
|
3881
|
+
#
|
|
3882
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/ListRecommendations AWS API Documentation
|
|
3883
|
+
#
|
|
3884
|
+
# @overload list_recommendations(params = {})
|
|
3885
|
+
# @param [Hash] params ({})
|
|
3886
|
+
def list_recommendations(params = {}, options = {})
|
|
3887
|
+
req = build_request(:list_recommendations, params)
|
|
3888
|
+
req.send_request(options)
|
|
3889
|
+
end
|
|
3890
|
+
|
|
2839
3891
|
# Lists sessions in an AgentCore Memory resource based on specified
|
|
2840
3892
|
# criteria. We recommend using pagination to ensure that the operation
|
|
2841
3893
|
# returns quickly and successfully.
|
|
@@ -3160,6 +4212,131 @@ module Aws::BedrockAgentCore
|
|
|
3160
4212
|
req.send_request(options)
|
|
3161
4213
|
end
|
|
3162
4214
|
|
|
4215
|
+
# Starts a batch evaluation job that evaluates agent performance across
|
|
4216
|
+
# multiple sessions. Batch evaluations pull agent traces from CloudWatch
|
|
4217
|
+
# Logs or an existing online evaluation configuration and run specified
|
|
4218
|
+
# evaluators and insights against them.
|
|
4219
|
+
#
|
|
4220
|
+
# @option params [required, String] :batch_evaluation_name
|
|
4221
|
+
# The name of the batch evaluation. Must be unique within your account.
|
|
4222
|
+
#
|
|
4223
|
+
# @option params [Array<Types::Evaluator>] :evaluators
|
|
4224
|
+
# The list of evaluators to apply during the batch evaluation. Can
|
|
4225
|
+
# include both built-in evaluators and custom evaluators. Maximum of 10
|
|
4226
|
+
# evaluators.
|
|
4227
|
+
#
|
|
4228
|
+
# @option params [required, Types::DataSourceConfig] :data_source_config
|
|
4229
|
+
# The data source configuration that specifies where to pull agent
|
|
4230
|
+
# session traces from for evaluation.
|
|
4231
|
+
#
|
|
4232
|
+
# @option params [String] :client_token
|
|
4233
|
+
# A unique, case-sensitive identifier to ensure that the API request
|
|
4234
|
+
# completes no more than one time. If this token matches a previous
|
|
4235
|
+
# request, the service ignores the request, but does not return an
|
|
4236
|
+
# error.
|
|
4237
|
+
#
|
|
4238
|
+
# **A suitable default value is auto-generated.** You should normally
|
|
4239
|
+
# not need to pass this option.**
|
|
4240
|
+
#
|
|
4241
|
+
# @option params [Types::EvaluationMetadata] :evaluation_metadata
|
|
4242
|
+
# Optional metadata for the evaluation, including session-specific
|
|
4243
|
+
# ground truth data and test scenario identifiers.
|
|
4244
|
+
#
|
|
4245
|
+
# @option params [String] :description
|
|
4246
|
+
# The description of the batch evaluation.
|
|
4247
|
+
#
|
|
4248
|
+
# @return [Types::StartBatchEvaluationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
4249
|
+
#
|
|
4250
|
+
# * {Types::StartBatchEvaluationResponse#batch_evaluation_id #batch_evaluation_id} => String
|
|
4251
|
+
# * {Types::StartBatchEvaluationResponse#batch_evaluation_arn #batch_evaluation_arn} => String
|
|
4252
|
+
# * {Types::StartBatchEvaluationResponse#batch_evaluation_name #batch_evaluation_name} => String
|
|
4253
|
+
# * {Types::StartBatchEvaluationResponse#evaluators #evaluators} => Array<Types::Evaluator>
|
|
4254
|
+
# * {Types::StartBatchEvaluationResponse#status #status} => String
|
|
4255
|
+
# * {Types::StartBatchEvaluationResponse#created_at #created_at} => Time
|
|
4256
|
+
# * {Types::StartBatchEvaluationResponse#output_config #output_config} => Types::OutputConfig
|
|
4257
|
+
# * {Types::StartBatchEvaluationResponse#description #description} => String
|
|
4258
|
+
#
|
|
4259
|
+
# @example Request syntax with placeholder values
|
|
4260
|
+
#
|
|
4261
|
+
# resp = client.start_batch_evaluation({
|
|
4262
|
+
# batch_evaluation_name: "BatchEvaluationName", # required
|
|
4263
|
+
# evaluators: [
|
|
4264
|
+
# {
|
|
4265
|
+
# evaluator_id: "EvaluatorId", # required
|
|
4266
|
+
# },
|
|
4267
|
+
# ],
|
|
4268
|
+
# data_source_config: { # required
|
|
4269
|
+
# cloud_watch_logs: {
|
|
4270
|
+
# service_names: ["String"], # required
|
|
4271
|
+
# log_group_names: ["String"], # required
|
|
4272
|
+
# filter_config: {
|
|
4273
|
+
# session_ids: ["String"],
|
|
4274
|
+
# time_range: {
|
|
4275
|
+
# start_time: Time.now,
|
|
4276
|
+
# end_time: Time.now,
|
|
4277
|
+
# },
|
|
4278
|
+
# },
|
|
4279
|
+
# },
|
|
4280
|
+
# },
|
|
4281
|
+
# client_token: "ClientToken",
|
|
4282
|
+
# evaluation_metadata: {
|
|
4283
|
+
# session_metadata: [
|
|
4284
|
+
# {
|
|
4285
|
+
# session_id: "String", # required
|
|
4286
|
+
# test_scenario_id: "String",
|
|
4287
|
+
# ground_truth: {
|
|
4288
|
+
# inline: {
|
|
4289
|
+
# assertions: [
|
|
4290
|
+
# {
|
|
4291
|
+
# text: "EvaluationContentTextString",
|
|
4292
|
+
# },
|
|
4293
|
+
# ],
|
|
4294
|
+
# expected_trajectory: {
|
|
4295
|
+
# tool_names: ["EvaluationToolName"],
|
|
4296
|
+
# },
|
|
4297
|
+
# turns: [
|
|
4298
|
+
# {
|
|
4299
|
+
# input: {
|
|
4300
|
+
# prompt: "GroundTruthTurnInputPromptString",
|
|
4301
|
+
# },
|
|
4302
|
+
# expected_response: {
|
|
4303
|
+
# text: "EvaluationContentTextString",
|
|
4304
|
+
# },
|
|
4305
|
+
# },
|
|
4306
|
+
# ],
|
|
4307
|
+
# },
|
|
4308
|
+
# },
|
|
4309
|
+
# metadata: {
|
|
4310
|
+
# "String" => "String",
|
|
4311
|
+
# },
|
|
4312
|
+
# },
|
|
4313
|
+
# ],
|
|
4314
|
+
# },
|
|
4315
|
+
# description: "BatchEvaluationDescription",
|
|
4316
|
+
# })
|
|
4317
|
+
#
|
|
4318
|
+
# @example Response structure
|
|
4319
|
+
#
|
|
4320
|
+
# resp.batch_evaluation_id #=> String
|
|
4321
|
+
# resp.batch_evaluation_arn #=> String
|
|
4322
|
+
# resp.batch_evaluation_name #=> String
|
|
4323
|
+
# resp.evaluators #=> Array
|
|
4324
|
+
# resp.evaluators[0].evaluator_id #=> String
|
|
4325
|
+
# resp.status #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "COMPLETED_WITH_ERRORS", "FAILED", "STOPPING", "STOPPED", "DELETING"
|
|
4326
|
+
# resp.created_at #=> Time
|
|
4327
|
+
# resp.output_config.cloud_watch_config.log_group_name #=> String
|
|
4328
|
+
# resp.output_config.cloud_watch_config.log_stream_name #=> String
|
|
4329
|
+
# resp.description #=> String
|
|
4330
|
+
#
|
|
4331
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/StartBatchEvaluation AWS API Documentation
|
|
4332
|
+
#
|
|
4333
|
+
# @overload start_batch_evaluation(params = {})
|
|
4334
|
+
# @param [Hash] params ({})
|
|
4335
|
+
def start_batch_evaluation(params = {}, options = {})
|
|
4336
|
+
req = build_request(:start_batch_evaluation, params)
|
|
4337
|
+
req.send_request(options)
|
|
4338
|
+
end
|
|
4339
|
+
|
|
3163
4340
|
# Creates and initializes a browser session in Amazon Bedrock AgentCore.
|
|
3164
4341
|
# The session enables agents to navigate and interact with web content,
|
|
3165
4342
|
# extract information from websites, and perform web-based tasks as part
|
|
@@ -3492,6 +4669,243 @@ module Aws::BedrockAgentCore
|
|
|
3492
4669
|
req.send_request(options)
|
|
3493
4670
|
end
|
|
3494
4671
|
|
|
4672
|
+
# Starts a recommendation job that analyzes agent traces and generates
|
|
4673
|
+
# optimization suggestions for system prompts or tool descriptions to
|
|
4674
|
+
# improve agent performance.
|
|
4675
|
+
#
|
|
4676
|
+
# @option params [required, String] :name
|
|
4677
|
+
# The name of the recommendation. Must be unique within your account.
|
|
4678
|
+
#
|
|
4679
|
+
# @option params [String] :description
|
|
4680
|
+
# The description of the recommendation.
|
|
4681
|
+
#
|
|
4682
|
+
# @option params [required, String] :type
|
|
4683
|
+
# The type of recommendation to generate. Valid values are
|
|
4684
|
+
# `SYSTEM_PROMPT_RECOMMENDATION` for system prompt optimization or
|
|
4685
|
+
# `TOOL_DESCRIPTION_RECOMMENDATION` for tool description optimization.
|
|
4686
|
+
#
|
|
4687
|
+
# @option params [required, Types::RecommendationConfig] :recommendation_config
|
|
4688
|
+
# The configuration for the recommendation, including the input to
|
|
4689
|
+
# optimize, agent traces to analyze, and evaluation settings.
|
|
4690
|
+
#
|
|
4691
|
+
# @option params [String] :client_token
|
|
4692
|
+
# A unique, case-sensitive identifier to ensure that the API request
|
|
4693
|
+
# completes no more than one time. If this token matches a previous
|
|
4694
|
+
# request, the service ignores the request, but does not return an
|
|
4695
|
+
# error.
|
|
4696
|
+
#
|
|
4697
|
+
# **A suitable default value is auto-generated.** You should normally
|
|
4698
|
+
# not need to pass this option.**
|
|
4699
|
+
#
|
|
4700
|
+
# @return [Types::StartRecommendationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
4701
|
+
#
|
|
4702
|
+
# * {Types::StartRecommendationResponse#recommendation_id #recommendation_id} => String
|
|
4703
|
+
# * {Types::StartRecommendationResponse#recommendation_arn #recommendation_arn} => String
|
|
4704
|
+
# * {Types::StartRecommendationResponse#name #name} => String
|
|
4705
|
+
# * {Types::StartRecommendationResponse#description #description} => String
|
|
4706
|
+
# * {Types::StartRecommendationResponse#type #type} => String
|
|
4707
|
+
# * {Types::StartRecommendationResponse#recommendation_config #recommendation_config} => Types::RecommendationConfig
|
|
4708
|
+
# * {Types::StartRecommendationResponse#status #status} => String
|
|
4709
|
+
# * {Types::StartRecommendationResponse#created_at #created_at} => Time
|
|
4710
|
+
# * {Types::StartRecommendationResponse#updated_at #updated_at} => Time
|
|
4711
|
+
#
|
|
4712
|
+
# @example Request syntax with placeholder values
|
|
4713
|
+
#
|
|
4714
|
+
# resp = client.start_recommendation({
|
|
4715
|
+
# name: "RecommendationName", # required
|
|
4716
|
+
# description: "RecommendationDescription",
|
|
4717
|
+
# type: "SYSTEM_PROMPT_RECOMMENDATION", # required, accepts SYSTEM_PROMPT_RECOMMENDATION, TOOL_DESCRIPTION_RECOMMENDATION
|
|
4718
|
+
# recommendation_config: { # required
|
|
4719
|
+
# system_prompt_recommendation_config: {
|
|
4720
|
+
# system_prompt: { # required
|
|
4721
|
+
# text: "SystemPromptText",
|
|
4722
|
+
# configuration_bundle: {
|
|
4723
|
+
# bundle_arn: "ConfigurationBundleArn", # required
|
|
4724
|
+
# version_id: "ConfigurationBundleVersionId", # required
|
|
4725
|
+
# system_prompt_json_path: "String", # required
|
|
4726
|
+
# },
|
|
4727
|
+
# },
|
|
4728
|
+
# agent_traces: { # required
|
|
4729
|
+
# session_spans: [
|
|
4730
|
+
# {
|
|
4731
|
+
# },
|
|
4732
|
+
# ],
|
|
4733
|
+
# cloudwatch_logs: {
|
|
4734
|
+
# log_group_arns: ["String"], # required
|
|
4735
|
+
# service_names: ["ServiceName"], # required
|
|
4736
|
+
# start_time: Time.now, # required
|
|
4737
|
+
# end_time: Time.now, # required
|
|
4738
|
+
# rule: {
|
|
4739
|
+
# filters: [
|
|
4740
|
+
# {
|
|
4741
|
+
# key: "CloudWatchLogsFilterKeyString", # required
|
|
4742
|
+
# operator: "Equals", # required, accepts Equals, NotEquals, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, Contains, NotContains
|
|
4743
|
+
# value: { # required
|
|
4744
|
+
# string_value: "FilterStringValue",
|
|
4745
|
+
# double_value: 1.0,
|
|
4746
|
+
# boolean_value: false,
|
|
4747
|
+
# },
|
|
4748
|
+
# },
|
|
4749
|
+
# ],
|
|
4750
|
+
# },
|
|
4751
|
+
# },
|
|
4752
|
+
# },
|
|
4753
|
+
# evaluation_config: { # required
|
|
4754
|
+
# evaluators: [ # required
|
|
4755
|
+
# {
|
|
4756
|
+
# evaluator_arn: "EvaluatorArn", # required
|
|
4757
|
+
# },
|
|
4758
|
+
# ],
|
|
4759
|
+
# },
|
|
4760
|
+
# },
|
|
4761
|
+
# tool_description_recommendation_config: {
|
|
4762
|
+
# tool_description: { # required
|
|
4763
|
+
# tool_description_text: {
|
|
4764
|
+
# tools: [ # required
|
|
4765
|
+
# {
|
|
4766
|
+
# tool_name: "RecommendationToolName", # required
|
|
4767
|
+
# tool_description: { # required
|
|
4768
|
+
# text: "ToolDescriptionText",
|
|
4769
|
+
# },
|
|
4770
|
+
# },
|
|
4771
|
+
# ],
|
|
4772
|
+
# },
|
|
4773
|
+
# configuration_bundle: {
|
|
4774
|
+
# bundle_arn: "ConfigurationBundleArn", # required
|
|
4775
|
+
# version_id: "ConfigurationBundleVersionId", # required
|
|
4776
|
+
# tools: [ # required
|
|
4777
|
+
# {
|
|
4778
|
+
# tool_name: "RecommendationToolName", # required
|
|
4779
|
+
# tool_description_json_path: "String", # required
|
|
4780
|
+
# },
|
|
4781
|
+
# ],
|
|
4782
|
+
# },
|
|
4783
|
+
# },
|
|
4784
|
+
# agent_traces: { # required
|
|
4785
|
+
# session_spans: [
|
|
4786
|
+
# {
|
|
4787
|
+
# },
|
|
4788
|
+
# ],
|
|
4789
|
+
# cloudwatch_logs: {
|
|
4790
|
+
# log_group_arns: ["String"], # required
|
|
4791
|
+
# service_names: ["ServiceName"], # required
|
|
4792
|
+
# start_time: Time.now, # required
|
|
4793
|
+
# end_time: Time.now, # required
|
|
4794
|
+
# rule: {
|
|
4795
|
+
# filters: [
|
|
4796
|
+
# {
|
|
4797
|
+
# key: "CloudWatchLogsFilterKeyString", # required
|
|
4798
|
+
# operator: "Equals", # required, accepts Equals, NotEquals, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, Contains, NotContains
|
|
4799
|
+
# value: { # required
|
|
4800
|
+
# string_value: "FilterStringValue",
|
|
4801
|
+
# double_value: 1.0,
|
|
4802
|
+
# boolean_value: false,
|
|
4803
|
+
# },
|
|
4804
|
+
# },
|
|
4805
|
+
# ],
|
|
4806
|
+
# },
|
|
4807
|
+
# },
|
|
4808
|
+
# },
|
|
4809
|
+
# },
|
|
4810
|
+
# },
|
|
4811
|
+
# client_token: "ClientToken",
|
|
4812
|
+
# })
|
|
4813
|
+
#
|
|
4814
|
+
# @example Response structure
|
|
4815
|
+
#
|
|
4816
|
+
# resp.recommendation_id #=> String
|
|
4817
|
+
# resp.recommendation_arn #=> String
|
|
4818
|
+
# resp.name #=> String
|
|
4819
|
+
# resp.description #=> String
|
|
4820
|
+
# resp.type #=> String, one of "SYSTEM_PROMPT_RECOMMENDATION", "TOOL_DESCRIPTION_RECOMMENDATION"
|
|
4821
|
+
# resp.recommendation_config.system_prompt_recommendation_config.system_prompt.text #=> String
|
|
4822
|
+
# resp.recommendation_config.system_prompt_recommendation_config.system_prompt.configuration_bundle.bundle_arn #=> String
|
|
4823
|
+
# resp.recommendation_config.system_prompt_recommendation_config.system_prompt.configuration_bundle.version_id #=> String
|
|
4824
|
+
# resp.recommendation_config.system_prompt_recommendation_config.system_prompt.configuration_bundle.system_prompt_json_path #=> String
|
|
4825
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.session_spans #=> Array
|
|
4826
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.log_group_arns #=> Array
|
|
4827
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.log_group_arns[0] #=> String
|
|
4828
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.service_names #=> Array
|
|
4829
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.service_names[0] #=> String
|
|
4830
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.start_time #=> Time
|
|
4831
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.end_time #=> Time
|
|
4832
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.rule.filters #=> Array
|
|
4833
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].key #=> String
|
|
4834
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].operator #=> String, one of "Equals", "NotEquals", "GreaterThan", "LessThan", "GreaterThanOrEqual", "LessThanOrEqual", "Contains", "NotContains"
|
|
4835
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].value.string_value #=> String
|
|
4836
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].value.double_value #=> Float
|
|
4837
|
+
# resp.recommendation_config.system_prompt_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].value.boolean_value #=> Boolean
|
|
4838
|
+
# resp.recommendation_config.system_prompt_recommendation_config.evaluation_config.evaluators #=> Array
|
|
4839
|
+
# resp.recommendation_config.system_prompt_recommendation_config.evaluation_config.evaluators[0].evaluator_arn #=> String
|
|
4840
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.tool_description_text.tools #=> Array
|
|
4841
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.tool_description_text.tools[0].tool_name #=> String
|
|
4842
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.tool_description_text.tools[0].tool_description.text #=> String
|
|
4843
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.configuration_bundle.bundle_arn #=> String
|
|
4844
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.configuration_bundle.version_id #=> String
|
|
4845
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.configuration_bundle.tools #=> Array
|
|
4846
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.configuration_bundle.tools[0].tool_name #=> String
|
|
4847
|
+
# resp.recommendation_config.tool_description_recommendation_config.tool_description.configuration_bundle.tools[0].tool_description_json_path #=> String
|
|
4848
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.session_spans #=> Array
|
|
4849
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.log_group_arns #=> Array
|
|
4850
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.log_group_arns[0] #=> String
|
|
4851
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.service_names #=> Array
|
|
4852
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.service_names[0] #=> String
|
|
4853
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.start_time #=> Time
|
|
4854
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.end_time #=> Time
|
|
4855
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.rule.filters #=> Array
|
|
4856
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].key #=> String
|
|
4857
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].operator #=> String, one of "Equals", "NotEquals", "GreaterThan", "LessThan", "GreaterThanOrEqual", "LessThanOrEqual", "Contains", "NotContains"
|
|
4858
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].value.string_value #=> String
|
|
4859
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].value.double_value #=> Float
|
|
4860
|
+
# resp.recommendation_config.tool_description_recommendation_config.agent_traces.cloudwatch_logs.rule.filters[0].value.boolean_value #=> Boolean
|
|
4861
|
+
# resp.status #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "FAILED", "DELETING"
|
|
4862
|
+
# resp.created_at #=> Time
|
|
4863
|
+
# resp.updated_at #=> Time
|
|
4864
|
+
#
|
|
4865
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/StartRecommendation AWS API Documentation
|
|
4866
|
+
#
|
|
4867
|
+
# @overload start_recommendation(params = {})
|
|
4868
|
+
# @param [Hash] params ({})
|
|
4869
|
+
def start_recommendation(params = {}, options = {})
|
|
4870
|
+
req = build_request(:start_recommendation, params)
|
|
4871
|
+
req.send_request(options)
|
|
4872
|
+
end
|
|
4873
|
+
|
|
4874
|
+
# Stops a running batch evaluation. Sessions that have already been
|
|
4875
|
+
# evaluated retain their results.
|
|
4876
|
+
#
|
|
4877
|
+
# @option params [required, String] :batch_evaluation_id
|
|
4878
|
+
# The unique identifier of the batch evaluation to stop.
|
|
4879
|
+
#
|
|
4880
|
+
# @return [Types::StopBatchEvaluationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
4881
|
+
#
|
|
4882
|
+
# * {Types::StopBatchEvaluationResponse#batch_evaluation_id #batch_evaluation_id} => String
|
|
4883
|
+
# * {Types::StopBatchEvaluationResponse#batch_evaluation_arn #batch_evaluation_arn} => String
|
|
4884
|
+
# * {Types::StopBatchEvaluationResponse#status #status} => String
|
|
4885
|
+
# * {Types::StopBatchEvaluationResponse#description #description} => String
|
|
4886
|
+
#
|
|
4887
|
+
# @example Request syntax with placeholder values
|
|
4888
|
+
#
|
|
4889
|
+
# resp = client.stop_batch_evaluation({
|
|
4890
|
+
# batch_evaluation_id: "BatchEvaluationId", # required
|
|
4891
|
+
# })
|
|
4892
|
+
#
|
|
4893
|
+
# @example Response structure
|
|
4894
|
+
#
|
|
4895
|
+
# resp.batch_evaluation_id #=> String
|
|
4896
|
+
# resp.batch_evaluation_arn #=> String
|
|
4897
|
+
# resp.status #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "COMPLETED_WITH_ERRORS", "FAILED", "STOPPING", "STOPPED", "DELETING"
|
|
4898
|
+
# resp.description #=> String
|
|
4899
|
+
#
|
|
4900
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/StopBatchEvaluation AWS API Documentation
|
|
4901
|
+
#
|
|
4902
|
+
# @overload stop_batch_evaluation(params = {})
|
|
4903
|
+
# @param [Hash] params ({})
|
|
4904
|
+
def stop_batch_evaluation(params = {}, options = {})
|
|
4905
|
+
req = build_request(:stop_batch_evaluation, params)
|
|
4906
|
+
req.send_request(options)
|
|
4907
|
+
end
|
|
4908
|
+
|
|
3495
4909
|
# Terminates an active browser session in Amazon Bedrock AgentCore. This
|
|
3496
4910
|
# operation stops the session, releases associated resources, and makes
|
|
3497
4911
|
# the session unavailable for further use.
|
|
@@ -3685,6 +5099,105 @@ module Aws::BedrockAgentCore
|
|
|
3685
5099
|
req.send_request(options)
|
|
3686
5100
|
end
|
|
3687
5101
|
|
|
5102
|
+
# Updates an A/B test's configuration, including variants, traffic
|
|
5103
|
+
# allocation, evaluation settings, or execution status.
|
|
5104
|
+
#
|
|
5105
|
+
# @option params [required, String] :ab_test_id
|
|
5106
|
+
# The unique identifier of the A/B test to update.
|
|
5107
|
+
#
|
|
5108
|
+
# @option params [String] :client_token
|
|
5109
|
+
# A unique, case-sensitive identifier to ensure that the API request
|
|
5110
|
+
# completes no more than one time. If this token matches a previous
|
|
5111
|
+
# request, the service ignores the request, but does not return an
|
|
5112
|
+
# error.
|
|
5113
|
+
#
|
|
5114
|
+
# **A suitable default value is auto-generated.** You should normally
|
|
5115
|
+
# not need to pass this option.**
|
|
5116
|
+
#
|
|
5117
|
+
# @option params [String] :name
|
|
5118
|
+
# The updated name of the A/B test.
|
|
5119
|
+
#
|
|
5120
|
+
# @option params [String] :description
|
|
5121
|
+
# The updated description of the A/B test.
|
|
5122
|
+
#
|
|
5123
|
+
# @option params [Array<Types::Variant>] :variants
|
|
5124
|
+
# The updated list of variants.
|
|
5125
|
+
#
|
|
5126
|
+
# @option params [Types::GatewayFilter] :gateway_filter
|
|
5127
|
+
# The updated gateway filter.
|
|
5128
|
+
#
|
|
5129
|
+
# @option params [Types::ABTestEvaluationConfig] :evaluation_config
|
|
5130
|
+
# The updated evaluation configuration.
|
|
5131
|
+
#
|
|
5132
|
+
# @option params [String] :role_arn
|
|
5133
|
+
# The updated IAM role ARN.
|
|
5134
|
+
#
|
|
5135
|
+
# @option params [String] :execution_status
|
|
5136
|
+
# The updated execution status to enable or disable the A/B test.
|
|
5137
|
+
#
|
|
5138
|
+
# @return [Types::UpdateABTestResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
5139
|
+
#
|
|
5140
|
+
# * {Types::UpdateABTestResponse#ab_test_id #ab_test_id} => String
|
|
5141
|
+
# * {Types::UpdateABTestResponse#ab_test_arn #ab_test_arn} => String
|
|
5142
|
+
# * {Types::UpdateABTestResponse#status #status} => String
|
|
5143
|
+
# * {Types::UpdateABTestResponse#execution_status #execution_status} => String
|
|
5144
|
+
# * {Types::UpdateABTestResponse#updated_at #updated_at} => Time
|
|
5145
|
+
#
|
|
5146
|
+
# @example Request syntax with placeholder values
|
|
5147
|
+
#
|
|
5148
|
+
# resp = client.update_ab_test({
|
|
5149
|
+
# ab_test_id: "ABTestId", # required
|
|
5150
|
+
# client_token: "ClientToken",
|
|
5151
|
+
# name: "ABTestName",
|
|
5152
|
+
# description: "ABTestDescription",
|
|
5153
|
+
# variants: [
|
|
5154
|
+
# {
|
|
5155
|
+
# name: "VariantName", # required
|
|
5156
|
+
# weight: 1, # required
|
|
5157
|
+
# variant_configuration: { # required
|
|
5158
|
+
# configuration_bundle: {
|
|
5159
|
+
# bundle_arn: "ConfigurationBundleArn", # required
|
|
5160
|
+
# bundle_version: "ConfigurationBundleVersion", # required
|
|
5161
|
+
# },
|
|
5162
|
+
# target: {
|
|
5163
|
+
# name: "TargetName", # required
|
|
5164
|
+
# },
|
|
5165
|
+
# },
|
|
5166
|
+
# },
|
|
5167
|
+
# ],
|
|
5168
|
+
# gateway_filter: {
|
|
5169
|
+
# target_paths: ["PathPattern"],
|
|
5170
|
+
# },
|
|
5171
|
+
# evaluation_config: {
|
|
5172
|
+
# online_evaluation_config_arn: "OnlineEvaluationConfigArn",
|
|
5173
|
+
# per_variant_online_evaluation_config: [
|
|
5174
|
+
# {
|
|
5175
|
+
# name: "VariantName", # required
|
|
5176
|
+
# online_evaluation_config_arn: "OnlineEvaluationConfigArn", # required
|
|
5177
|
+
# },
|
|
5178
|
+
# ],
|
|
5179
|
+
# },
|
|
5180
|
+
# role_arn: "RoleArn",
|
|
5181
|
+
# execution_status: "PAUSED", # accepts PAUSED, RUNNING, STOPPED, NOT_STARTED
|
|
5182
|
+
# })
|
|
5183
|
+
#
|
|
5184
|
+
# @example Response structure
|
|
5185
|
+
#
|
|
5186
|
+
# resp.ab_test_id #=> String
|
|
5187
|
+
# resp.ab_test_arn #=> String
|
|
5188
|
+
# resp.status #=> String, one of "CREATING", "ACTIVE", "CREATE_FAILED", "UPDATING", "UPDATE_FAILED", "DELETING", "DELETE_FAILED", "FAILED"
|
|
5189
|
+
# resp.execution_status #=> String, one of "PAUSED", "RUNNING", "STOPPED", "NOT_STARTED"
|
|
5190
|
+
# resp.updated_at #=> Time
|
|
5191
|
+
#
|
|
5192
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/UpdateABTest AWS API Documentation
|
|
5193
|
+
#
|
|
5194
|
+
# @overload update_ab_test(params = {})
|
|
5195
|
+
# @param [Hash] params ({})
|
|
5196
|
+
def update_ab_test(params = {}, options = {})
|
|
5197
|
+
req = build_request(:update_ab_test, params)
|
|
5198
|
+
req.send_request(options)
|
|
5199
|
+
end
|
|
5200
|
+
|
|
3688
5201
|
# Updates a browser stream. To use this operation, you must have
|
|
3689
5202
|
# permissions to perform the bedrock:UpdateBrowserStream action.
|
|
3690
5203
|
#
|
|
@@ -3762,7 +5275,7 @@ module Aws::BedrockAgentCore
|
|
|
3762
5275
|
tracer: tracer
|
|
3763
5276
|
)
|
|
3764
5277
|
context[:gem_name] = 'aws-sdk-bedrockagentcore'
|
|
3765
|
-
context[:gem_version] = '1.
|
|
5278
|
+
context[:gem_version] = '1.30.0'
|
|
3766
5279
|
Seahorse::Client::Request.new(handlers, context)
|
|
3767
5280
|
end
|
|
3768
5281
|
|