aws-sdk-bedrockagentruntime 1.9.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0b33ecfc30b93d8a65929e3cd819ade75f55b90acf67de7f7bb0f665a912561
4
- data.tar.gz: 3f3ec35ccc289e5a22ccc82b5e4c3910b32e8534437b413f924b6b4e44bf657c
3
+ metadata.gz: '0928157fe86b6c66231098d2d1b5fc1322af4df835cb8f6a592d4a00a189fc1b'
4
+ data.tar.gz: 3cfb628b027c4a3693c0b60357a4b56c42365b70089a5bd812deffe8f6ed76af
5
5
  SHA512:
6
- metadata.gz: 7f2063b06a4d1430646b9970907d489ccd2845dab6105f682fdff15942930260e915afcd6845eb031795b7fed763db2eeb5b0206535933f908a171d5fbb98f2a
7
- data.tar.gz: 7560d744e4abfe1c081844c095cebcd69e970ac17e049f40a9a8bc377c7a2ec8f2e4021b1a3cbd8576e18c923da76c988117d3330859e0006d6587ee037fc231
6
+ metadata.gz: c61819a5e2f6230c4fef93f6fed0c8205707b3dc9593ecac319f1754cb333dd4178eff343c4f78d90e905693a8647ddd6234ec257d38956fb208029b6ef187e0
7
+ data.tar.gz: 4989f65266664ef9f188689431c4138c04c96fffe6e74845d837e473bf48337516d94d11715318e9d36eb174a68dd0bb752453e1576223b2f2969b032fa55782
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.11.0 (2024-05-20)
5
+ ------------------
6
+
7
+ * Feature - This release adds support for using Guardrails with Bedrock Agents.
8
+
9
+ 1.10.0 (2024-05-15)
10
+ ------------------
11
+
12
+ * Feature - Updating Bedrock Knowledge Base Metadata & Filters feature with two new filters listContains and stringContains
13
+
4
14
  1.9.0 (2024-05-13)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.9.0
1
+ 1.11.0
@@ -813,6 +813,58 @@ module Aws::BedrockAgentRuntime
813
813
  # event.session_id #=> String
814
814
  # event.trace.failure_trace.failure_reason #=> String
815
815
  # event.trace.failure_trace.trace_id #=> String
816
+ # event.trace.guardrail_trace.action #=> String, one of "INTERVENED", "NONE"
817
+ # event.trace.guardrail_trace.input_assessments #=> Array
818
+ # event.trace.guardrail_trace.input_assessments[0].content_policy.filters #=> Array
819
+ # event.trace.guardrail_trace.input_assessments[0].content_policy.filters[0].action #=> String, one of "BLOCKED"
820
+ # event.trace.guardrail_trace.input_assessments[0].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
821
+ # event.trace.guardrail_trace.input_assessments[0].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
822
+ # event.trace.guardrail_trace.input_assessments[0].sensitive_information_policy.pii_entities #=> Array
823
+ # event.trace.guardrail_trace.input_assessments[0].sensitive_information_policy.pii_entities[0].action #=> String, one of "BLOCKED", "ANONYMIZED"
824
+ # event.trace.guardrail_trace.input_assessments[0].sensitive_information_policy.pii_entities[0].match #=> String
825
+ # event.trace.guardrail_trace.input_assessments[0].sensitive_information_policy.pii_entities[0].type #=> String, one of "ADDRESS", "AGE", "AWS_ACCESS_KEY", "AWS_SECRET_KEY", "CA_HEALTH_NUMBER", "CA_SOCIAL_INSURANCE_NUMBER", "CREDIT_DEBIT_CARD_CVV", "CREDIT_DEBIT_CARD_EXPIRY", "CREDIT_DEBIT_CARD_NUMBER", "DRIVER_ID", "EMAIL", "INTERNATIONAL_BANK_ACCOUNT_NUMBER", "IP_ADDRESS", "LICENSE_PLATE", "MAC_ADDRESS", "NAME", "PASSWORD", "PHONE", "PIN", "SWIFT_CODE", "UK_NATIONAL_HEALTH_SERVICE_NUMBER", "UK_NATIONAL_INSURANCE_NUMBER", "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER", "URL", "USERNAME", "US_BANK_ACCOUNT_NUMBER", "US_BANK_ROUTING_NUMBER", "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER", "US_PASSPORT_NUMBER", "US_SOCIAL_SECURITY_NUMBER", "VEHICLE_IDENTIFICATION_NUMBER"
826
+ # event.trace.guardrail_trace.input_assessments[0].sensitive_information_policy.regexes #=> Array
827
+ # event.trace.guardrail_trace.input_assessments[0].sensitive_information_policy.regexes[0].action #=> String, one of "BLOCKED", "ANONYMIZED"
828
+ # event.trace.guardrail_trace.input_assessments[0].sensitive_information_policy.regexes[0].match #=> String
829
+ # event.trace.guardrail_trace.input_assessments[0].sensitive_information_policy.regexes[0].name #=> String
830
+ # event.trace.guardrail_trace.input_assessments[0].sensitive_information_policy.regexes[0].regex #=> String
831
+ # event.trace.guardrail_trace.input_assessments[0].topic_policy.topics #=> Array
832
+ # event.trace.guardrail_trace.input_assessments[0].topic_policy.topics[0].action #=> String, one of "BLOCKED"
833
+ # event.trace.guardrail_trace.input_assessments[0].topic_policy.topics[0].name #=> String
834
+ # event.trace.guardrail_trace.input_assessments[0].topic_policy.topics[0].type #=> String, one of "DENY"
835
+ # event.trace.guardrail_trace.input_assessments[0].word_policy.custom_words #=> Array
836
+ # event.trace.guardrail_trace.input_assessments[0].word_policy.custom_words[0].action #=> String, one of "BLOCKED"
837
+ # event.trace.guardrail_trace.input_assessments[0].word_policy.custom_words[0].match #=> String
838
+ # event.trace.guardrail_trace.input_assessments[0].word_policy.managed_word_lists #=> Array
839
+ # event.trace.guardrail_trace.input_assessments[0].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED"
840
+ # event.trace.guardrail_trace.input_assessments[0].word_policy.managed_word_lists[0].match #=> String
841
+ # event.trace.guardrail_trace.input_assessments[0].word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
842
+ # event.trace.guardrail_trace.output_assessments #=> Array
843
+ # event.trace.guardrail_trace.output_assessments[0].content_policy.filters #=> Array
844
+ # event.trace.guardrail_trace.output_assessments[0].content_policy.filters[0].action #=> String, one of "BLOCKED"
845
+ # event.trace.guardrail_trace.output_assessments[0].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
846
+ # event.trace.guardrail_trace.output_assessments[0].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
847
+ # event.trace.guardrail_trace.output_assessments[0].sensitive_information_policy.pii_entities #=> Array
848
+ # event.trace.guardrail_trace.output_assessments[0].sensitive_information_policy.pii_entities[0].action #=> String, one of "BLOCKED", "ANONYMIZED"
849
+ # event.trace.guardrail_trace.output_assessments[0].sensitive_information_policy.pii_entities[0].match #=> String
850
+ # event.trace.guardrail_trace.output_assessments[0].sensitive_information_policy.pii_entities[0].type #=> String, one of "ADDRESS", "AGE", "AWS_ACCESS_KEY", "AWS_SECRET_KEY", "CA_HEALTH_NUMBER", "CA_SOCIAL_INSURANCE_NUMBER", "CREDIT_DEBIT_CARD_CVV", "CREDIT_DEBIT_CARD_EXPIRY", "CREDIT_DEBIT_CARD_NUMBER", "DRIVER_ID", "EMAIL", "INTERNATIONAL_BANK_ACCOUNT_NUMBER", "IP_ADDRESS", "LICENSE_PLATE", "MAC_ADDRESS", "NAME", "PASSWORD", "PHONE", "PIN", "SWIFT_CODE", "UK_NATIONAL_HEALTH_SERVICE_NUMBER", "UK_NATIONAL_INSURANCE_NUMBER", "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER", "URL", "USERNAME", "US_BANK_ACCOUNT_NUMBER", "US_BANK_ROUTING_NUMBER", "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER", "US_PASSPORT_NUMBER", "US_SOCIAL_SECURITY_NUMBER", "VEHICLE_IDENTIFICATION_NUMBER"
851
+ # event.trace.guardrail_trace.output_assessments[0].sensitive_information_policy.regexes #=> Array
852
+ # event.trace.guardrail_trace.output_assessments[0].sensitive_information_policy.regexes[0].action #=> String, one of "BLOCKED", "ANONYMIZED"
853
+ # event.trace.guardrail_trace.output_assessments[0].sensitive_information_policy.regexes[0].match #=> String
854
+ # event.trace.guardrail_trace.output_assessments[0].sensitive_information_policy.regexes[0].name #=> String
855
+ # event.trace.guardrail_trace.output_assessments[0].sensitive_information_policy.regexes[0].regex #=> String
856
+ # event.trace.guardrail_trace.output_assessments[0].topic_policy.topics #=> Array
857
+ # event.trace.guardrail_trace.output_assessments[0].topic_policy.topics[0].action #=> String, one of "BLOCKED"
858
+ # event.trace.guardrail_trace.output_assessments[0].topic_policy.topics[0].name #=> String
859
+ # event.trace.guardrail_trace.output_assessments[0].topic_policy.topics[0].type #=> String, one of "DENY"
860
+ # event.trace.guardrail_trace.output_assessments[0].word_policy.custom_words #=> Array
861
+ # event.trace.guardrail_trace.output_assessments[0].word_policy.custom_words[0].action #=> String, one of "BLOCKED"
862
+ # event.trace.guardrail_trace.output_assessments[0].word_policy.custom_words[0].match #=> String
863
+ # event.trace.guardrail_trace.output_assessments[0].word_policy.managed_word_lists #=> Array
864
+ # event.trace.guardrail_trace.output_assessments[0].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED"
865
+ # event.trace.guardrail_trace.output_assessments[0].word_policy.managed_word_lists[0].match #=> String
866
+ # event.trace.guardrail_trace.output_assessments[0].word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
867
+ # event.trace.guardrail_trace.trace_id #=> String
816
868
  # event.trace.orchestration_trace.invocation_input.action_group_invocation_input.action_group_name #=> String
817
869
  # event.trace.orchestration_trace.invocation_input.action_group_invocation_input.api_path #=> String
818
870
  # event.trace.orchestration_trace.invocation_input.action_group_invocation_input.function #=> String
@@ -989,6 +1041,11 @@ module Aws::BedrockAgentRuntime
989
1041
  # value: { # required
990
1042
  # },
991
1043
  # },
1044
+ # list_contains: {
1045
+ # key: "FilterKey", # required
1046
+ # value: { # required
1047
+ # },
1048
+ # },
992
1049
  # not_equals: {
993
1050
  # key: "FilterKey", # required
994
1051
  # value: { # required
@@ -1009,6 +1066,11 @@ module Aws::BedrockAgentRuntime
1009
1066
  # value: { # required
1010
1067
  # },
1011
1068
  # },
1069
+ # string_contains: {
1070
+ # key: "FilterKey", # required
1071
+ # value: { # required
1072
+ # },
1073
+ # },
1012
1074
  # },
1013
1075
  # number_of_results: 1,
1014
1076
  # override_search_type: "HYBRID", # accepts HYBRID, SEMANTIC
@@ -1173,6 +1235,11 @@ module Aws::BedrockAgentRuntime
1173
1235
  # value: { # required
1174
1236
  # },
1175
1237
  # },
1238
+ # list_contains: {
1239
+ # key: "FilterKey", # required
1240
+ # value: { # required
1241
+ # },
1242
+ # },
1176
1243
  # not_equals: {
1177
1244
  # key: "FilterKey", # required
1178
1245
  # value: { # required
@@ -1193,6 +1260,11 @@ module Aws::BedrockAgentRuntime
1193
1260
  # value: { # required
1194
1261
  # },
1195
1262
  # },
1263
+ # string_contains: {
1264
+ # key: "FilterKey", # required
1265
+ # value: { # required
1266
+ # },
1267
+ # },
1196
1268
  # },
1197
1269
  # number_of_results: 1,
1198
1270
  # override_search_type: "HYBRID", # accepts HYBRID, SEMANTIC
@@ -1244,7 +1316,7 @@ module Aws::BedrockAgentRuntime
1244
1316
  params: params,
1245
1317
  config: config)
1246
1318
  context[:gem_name] = 'aws-sdk-bedrockagentruntime'
1247
- context[:gem_version] = '1.9.0'
1319
+ context[:gem_version] = '1.11.0'
1248
1320
  Seahorse::Client::Request.new(handlers, context)
1249
1321
  end
1250
1322
 
@@ -66,9 +66,38 @@ module Aws::BedrockAgentRuntime
66
66
  GeneratedResponsePart = Shapes::StructureShape.new(name: 'GeneratedResponsePart')
67
67
  GenerationConfiguration = Shapes::StructureShape.new(name: 'GenerationConfiguration')
68
68
  GuadrailAction = Shapes::StringShape.new(name: 'GuadrailAction')
69
+ GuardrailAction = Shapes::StringShape.new(name: 'GuardrailAction')
70
+ GuardrailAssessment = Shapes::StructureShape.new(name: 'GuardrailAssessment')
71
+ GuardrailAssessmentList = Shapes::ListShape.new(name: 'GuardrailAssessmentList')
69
72
  GuardrailConfiguration = Shapes::StructureShape.new(name: 'GuardrailConfiguration')
70
73
  GuardrailConfigurationGuardrailIdString = Shapes::StringShape.new(name: 'GuardrailConfigurationGuardrailIdString')
71
74
  GuardrailConfigurationGuardrailVersionString = Shapes::StringShape.new(name: 'GuardrailConfigurationGuardrailVersionString')
75
+ GuardrailContentFilter = Shapes::StructureShape.new(name: 'GuardrailContentFilter')
76
+ GuardrailContentFilterConfidence = Shapes::StringShape.new(name: 'GuardrailContentFilterConfidence')
77
+ GuardrailContentFilterList = Shapes::ListShape.new(name: 'GuardrailContentFilterList')
78
+ GuardrailContentFilterType = Shapes::StringShape.new(name: 'GuardrailContentFilterType')
79
+ GuardrailContentPolicyAction = Shapes::StringShape.new(name: 'GuardrailContentPolicyAction')
80
+ GuardrailContentPolicyAssessment = Shapes::StructureShape.new(name: 'GuardrailContentPolicyAssessment')
81
+ GuardrailCustomWord = Shapes::StructureShape.new(name: 'GuardrailCustomWord')
82
+ GuardrailCustomWordList = Shapes::ListShape.new(name: 'GuardrailCustomWordList')
83
+ GuardrailManagedWord = Shapes::StructureShape.new(name: 'GuardrailManagedWord')
84
+ GuardrailManagedWordList = Shapes::ListShape.new(name: 'GuardrailManagedWordList')
85
+ GuardrailManagedWordType = Shapes::StringShape.new(name: 'GuardrailManagedWordType')
86
+ GuardrailPiiEntityFilter = Shapes::StructureShape.new(name: 'GuardrailPiiEntityFilter')
87
+ GuardrailPiiEntityFilterList = Shapes::ListShape.new(name: 'GuardrailPiiEntityFilterList')
88
+ GuardrailPiiEntityType = Shapes::StringShape.new(name: 'GuardrailPiiEntityType')
89
+ GuardrailRegexFilter = Shapes::StructureShape.new(name: 'GuardrailRegexFilter')
90
+ GuardrailRegexFilterList = Shapes::ListShape.new(name: 'GuardrailRegexFilterList')
91
+ GuardrailSensitiveInformationPolicyAction = Shapes::StringShape.new(name: 'GuardrailSensitiveInformationPolicyAction')
92
+ GuardrailSensitiveInformationPolicyAssessment = Shapes::StructureShape.new(name: 'GuardrailSensitiveInformationPolicyAssessment')
93
+ GuardrailTopic = Shapes::StructureShape.new(name: 'GuardrailTopic')
94
+ GuardrailTopicList = Shapes::ListShape.new(name: 'GuardrailTopicList')
95
+ GuardrailTopicPolicyAction = Shapes::StringShape.new(name: 'GuardrailTopicPolicyAction')
96
+ GuardrailTopicPolicyAssessment = Shapes::StructureShape.new(name: 'GuardrailTopicPolicyAssessment')
97
+ GuardrailTopicType = Shapes::StringShape.new(name: 'GuardrailTopicType')
98
+ GuardrailTrace = Shapes::StructureShape.new(name: 'GuardrailTrace')
99
+ GuardrailWordPolicyAction = Shapes::StringShape.new(name: 'GuardrailWordPolicyAction')
100
+ GuardrailWordPolicyAssessment = Shapes::StructureShape.new(name: 'GuardrailWordPolicyAssessment')
72
101
  Identifier = Shapes::StringShape.new(name: 'Identifier')
73
102
  InferenceConfig = Shapes::StructureShape.new(name: 'InferenceConfig')
74
103
  InferenceConfiguration = Shapes::StructureShape.new(name: 'InferenceConfiguration')
@@ -314,10 +343,80 @@ module Aws::BedrockAgentRuntime
314
343
  GenerationConfiguration.add_member(:prompt_template, Shapes::ShapeRef.new(shape: PromptTemplate, location_name: "promptTemplate"))
315
344
  GenerationConfiguration.struct_class = Types::GenerationConfiguration
316
345
 
346
+ GuardrailAssessment.add_member(:content_policy, Shapes::ShapeRef.new(shape: GuardrailContentPolicyAssessment, location_name: "contentPolicy"))
347
+ GuardrailAssessment.add_member(:sensitive_information_policy, Shapes::ShapeRef.new(shape: GuardrailSensitiveInformationPolicyAssessment, location_name: "sensitiveInformationPolicy"))
348
+ GuardrailAssessment.add_member(:topic_policy, Shapes::ShapeRef.new(shape: GuardrailTopicPolicyAssessment, location_name: "topicPolicy"))
349
+ GuardrailAssessment.add_member(:word_policy, Shapes::ShapeRef.new(shape: GuardrailWordPolicyAssessment, location_name: "wordPolicy"))
350
+ GuardrailAssessment.struct_class = Types::GuardrailAssessment
351
+
352
+ GuardrailAssessmentList.member = Shapes::ShapeRef.new(shape: GuardrailAssessment)
353
+
317
354
  GuardrailConfiguration.add_member(:guardrail_id, Shapes::ShapeRef.new(shape: GuardrailConfigurationGuardrailIdString, required: true, location_name: "guardrailId"))
318
355
  GuardrailConfiguration.add_member(:guardrail_version, Shapes::ShapeRef.new(shape: GuardrailConfigurationGuardrailVersionString, required: true, location_name: "guardrailVersion"))
319
356
  GuardrailConfiguration.struct_class = Types::GuardrailConfiguration
320
357
 
358
+ GuardrailContentFilter.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailContentPolicyAction, location_name: "action"))
359
+ GuardrailContentFilter.add_member(:confidence, Shapes::ShapeRef.new(shape: GuardrailContentFilterConfidence, location_name: "confidence"))
360
+ GuardrailContentFilter.add_member(:type, Shapes::ShapeRef.new(shape: GuardrailContentFilterType, location_name: "type"))
361
+ GuardrailContentFilter.struct_class = Types::GuardrailContentFilter
362
+
363
+ GuardrailContentFilterList.member = Shapes::ShapeRef.new(shape: GuardrailContentFilter)
364
+
365
+ GuardrailContentPolicyAssessment.add_member(:filters, Shapes::ShapeRef.new(shape: GuardrailContentFilterList, location_name: "filters"))
366
+ GuardrailContentPolicyAssessment.struct_class = Types::GuardrailContentPolicyAssessment
367
+
368
+ GuardrailCustomWord.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailWordPolicyAction, location_name: "action"))
369
+ GuardrailCustomWord.add_member(:match, Shapes::ShapeRef.new(shape: String, location_name: "match"))
370
+ GuardrailCustomWord.struct_class = Types::GuardrailCustomWord
371
+
372
+ GuardrailCustomWordList.member = Shapes::ShapeRef.new(shape: GuardrailCustomWord)
373
+
374
+ GuardrailManagedWord.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailWordPolicyAction, location_name: "action"))
375
+ GuardrailManagedWord.add_member(:match, Shapes::ShapeRef.new(shape: String, location_name: "match"))
376
+ GuardrailManagedWord.add_member(:type, Shapes::ShapeRef.new(shape: GuardrailManagedWordType, location_name: "type"))
377
+ GuardrailManagedWord.struct_class = Types::GuardrailManagedWord
378
+
379
+ GuardrailManagedWordList.member = Shapes::ShapeRef.new(shape: GuardrailManagedWord)
380
+
381
+ GuardrailPiiEntityFilter.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailSensitiveInformationPolicyAction, location_name: "action"))
382
+ GuardrailPiiEntityFilter.add_member(:match, Shapes::ShapeRef.new(shape: String, location_name: "match"))
383
+ GuardrailPiiEntityFilter.add_member(:type, Shapes::ShapeRef.new(shape: GuardrailPiiEntityType, location_name: "type"))
384
+ GuardrailPiiEntityFilter.struct_class = Types::GuardrailPiiEntityFilter
385
+
386
+ GuardrailPiiEntityFilterList.member = Shapes::ShapeRef.new(shape: GuardrailPiiEntityFilter)
387
+
388
+ GuardrailRegexFilter.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailSensitiveInformationPolicyAction, location_name: "action"))
389
+ GuardrailRegexFilter.add_member(:match, Shapes::ShapeRef.new(shape: String, location_name: "match"))
390
+ GuardrailRegexFilter.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "name"))
391
+ GuardrailRegexFilter.add_member(:regex, Shapes::ShapeRef.new(shape: String, location_name: "regex"))
392
+ GuardrailRegexFilter.struct_class = Types::GuardrailRegexFilter
393
+
394
+ GuardrailRegexFilterList.member = Shapes::ShapeRef.new(shape: GuardrailRegexFilter)
395
+
396
+ GuardrailSensitiveInformationPolicyAssessment.add_member(:pii_entities, Shapes::ShapeRef.new(shape: GuardrailPiiEntityFilterList, location_name: "piiEntities"))
397
+ GuardrailSensitiveInformationPolicyAssessment.add_member(:regexes, Shapes::ShapeRef.new(shape: GuardrailRegexFilterList, location_name: "regexes"))
398
+ GuardrailSensitiveInformationPolicyAssessment.struct_class = Types::GuardrailSensitiveInformationPolicyAssessment
399
+
400
+ GuardrailTopic.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailTopicPolicyAction, location_name: "action"))
401
+ GuardrailTopic.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "name"))
402
+ GuardrailTopic.add_member(:type, Shapes::ShapeRef.new(shape: GuardrailTopicType, location_name: "type"))
403
+ GuardrailTopic.struct_class = Types::GuardrailTopic
404
+
405
+ GuardrailTopicList.member = Shapes::ShapeRef.new(shape: GuardrailTopic)
406
+
407
+ GuardrailTopicPolicyAssessment.add_member(:topics, Shapes::ShapeRef.new(shape: GuardrailTopicList, location_name: "topics"))
408
+ GuardrailTopicPolicyAssessment.struct_class = Types::GuardrailTopicPolicyAssessment
409
+
410
+ GuardrailTrace.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailAction, location_name: "action"))
411
+ GuardrailTrace.add_member(:input_assessments, Shapes::ShapeRef.new(shape: GuardrailAssessmentList, location_name: "inputAssessments"))
412
+ GuardrailTrace.add_member(:output_assessments, Shapes::ShapeRef.new(shape: GuardrailAssessmentList, location_name: "outputAssessments"))
413
+ GuardrailTrace.add_member(:trace_id, Shapes::ShapeRef.new(shape: TraceId, location_name: "traceId"))
414
+ GuardrailTrace.struct_class = Types::GuardrailTrace
415
+
416
+ GuardrailWordPolicyAssessment.add_member(:custom_words, Shapes::ShapeRef.new(shape: GuardrailCustomWordList, location_name: "customWords"))
417
+ GuardrailWordPolicyAssessment.add_member(:managed_word_lists, Shapes::ShapeRef.new(shape: GuardrailManagedWordList, location_name: "managedWordLists"))
418
+ GuardrailWordPolicyAssessment.struct_class = Types::GuardrailWordPolicyAssessment
419
+
321
420
  InferenceConfig.add_member(:text_inference_config, Shapes::ShapeRef.new(shape: TextInferenceConfig, location_name: "textInferenceConfig"))
322
421
  InferenceConfig.struct_class = Types::InferenceConfig
323
422
 
@@ -525,10 +624,12 @@ module Aws::BedrockAgentRuntime
525
624
  RetrievalFilter.add_member(:in, Shapes::ShapeRef.new(shape: FilterAttribute, location_name: "in"))
526
625
  RetrievalFilter.add_member(:less_than, Shapes::ShapeRef.new(shape: FilterAttribute, location_name: "lessThan"))
527
626
  RetrievalFilter.add_member(:less_than_or_equals, Shapes::ShapeRef.new(shape: FilterAttribute, location_name: "lessThanOrEquals"))
627
+ RetrievalFilter.add_member(:list_contains, Shapes::ShapeRef.new(shape: FilterAttribute, location_name: "listContains"))
528
628
  RetrievalFilter.add_member(:not_equals, Shapes::ShapeRef.new(shape: FilterAttribute, location_name: "notEquals"))
529
629
  RetrievalFilter.add_member(:not_in, Shapes::ShapeRef.new(shape: FilterAttribute, location_name: "notIn"))
530
630
  RetrievalFilter.add_member(:or_all, Shapes::ShapeRef.new(shape: RetrievalFilterList, location_name: "orAll"))
531
631
  RetrievalFilter.add_member(:starts_with, Shapes::ShapeRef.new(shape: FilterAttribute, location_name: "startsWith"))
632
+ RetrievalFilter.add_member(:string_contains, Shapes::ShapeRef.new(shape: FilterAttribute, location_name: "stringContains"))
532
633
  RetrievalFilter.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
533
634
  RetrievalFilter.add_member_subclass(:and_all, Types::RetrievalFilter::AndAll)
534
635
  RetrievalFilter.add_member_subclass(:equals, Types::RetrievalFilter::Equals)
@@ -537,10 +638,12 @@ module Aws::BedrockAgentRuntime
537
638
  RetrievalFilter.add_member_subclass(:in, Types::RetrievalFilter::In)
538
639
  RetrievalFilter.add_member_subclass(:less_than, Types::RetrievalFilter::LessThan)
539
640
  RetrievalFilter.add_member_subclass(:less_than_or_equals, Types::RetrievalFilter::LessThanOrEquals)
641
+ RetrievalFilter.add_member_subclass(:list_contains, Types::RetrievalFilter::ListContains)
540
642
  RetrievalFilter.add_member_subclass(:not_equals, Types::RetrievalFilter::NotEquals)
541
643
  RetrievalFilter.add_member_subclass(:not_in, Types::RetrievalFilter::NotIn)
542
644
  RetrievalFilter.add_member_subclass(:or_all, Types::RetrievalFilter::OrAll)
543
645
  RetrievalFilter.add_member_subclass(:starts_with, Types::RetrievalFilter::StartsWith)
646
+ RetrievalFilter.add_member_subclass(:string_contains, Types::RetrievalFilter::StringContains)
544
647
  RetrievalFilter.add_member_subclass(:unknown, Types::RetrievalFilter::Unknown)
545
648
  RetrievalFilter.struct_class = Types::RetrievalFilter
546
649
 
@@ -643,11 +746,13 @@ module Aws::BedrockAgentRuntime
643
746
  ThrottlingException.struct_class = Types::ThrottlingException
644
747
 
645
748
  Trace.add_member(:failure_trace, Shapes::ShapeRef.new(shape: FailureTrace, location_name: "failureTrace"))
749
+ Trace.add_member(:guardrail_trace, Shapes::ShapeRef.new(shape: GuardrailTrace, location_name: "guardrailTrace"))
646
750
  Trace.add_member(:orchestration_trace, Shapes::ShapeRef.new(shape: OrchestrationTrace, location_name: "orchestrationTrace"))
647
751
  Trace.add_member(:post_processing_trace, Shapes::ShapeRef.new(shape: PostProcessingTrace, location_name: "postProcessingTrace"))
648
752
  Trace.add_member(:pre_processing_trace, Shapes::ShapeRef.new(shape: PreProcessingTrace, location_name: "preProcessingTrace"))
649
753
  Trace.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
650
754
  Trace.add_member_subclass(:failure_trace, Types::Trace::FailureTrace)
755
+ Trace.add_member_subclass(:guardrail_trace, Types::Trace::GuardrailTrace)
651
756
  Trace.add_member_subclass(:orchestration_trace, Types::Trace::OrchestrationTrace)
652
757
  Trace.add_member_subclass(:post_processing_trace, Types::Trace::PostProcessingTrace)
653
758
  Trace.add_member_subclass(:pre_processing_trace, Types::Trace::PreProcessingTrace)
@@ -750,6 +750,35 @@ module Aws::BedrockAgentRuntime
750
750
  include Aws::Structure
751
751
  end
752
752
 
753
+ # Assessment details of the content analyzed by Guardrails.
754
+ #
755
+ # @!attribute [rw] content_policy
756
+ # Content policy details of the Guardrail.
757
+ # @return [Types::GuardrailContentPolicyAssessment]
758
+ #
759
+ # @!attribute [rw] sensitive_information_policy
760
+ # Sensitive Information policy details of Guardrail.
761
+ # @return [Types::GuardrailSensitiveInformationPolicyAssessment]
762
+ #
763
+ # @!attribute [rw] topic_policy
764
+ # Topic policy details of the Guardrail.
765
+ # @return [Types::GuardrailTopicPolicyAssessment]
766
+ #
767
+ # @!attribute [rw] word_policy
768
+ # Word policy details of the Guardrail.
769
+ # @return [Types::GuardrailWordPolicyAssessment]
770
+ #
771
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GuardrailAssessment AWS API Documentation
772
+ #
773
+ class GuardrailAssessment < Struct.new(
774
+ :content_policy,
775
+ :sensitive_information_policy,
776
+ :topic_policy,
777
+ :word_policy)
778
+ SENSITIVE = [:content_policy, :sensitive_information_policy, :topic_policy, :word_policy]
779
+ include Aws::Structure
780
+ end
781
+
753
782
  # The configuration details for the guardrail.
754
783
  #
755
784
  # @!attribute [rw] guardrail_id
@@ -769,6 +798,251 @@ module Aws::BedrockAgentRuntime
769
798
  include Aws::Structure
770
799
  end
771
800
 
801
+ # Details of the content filter used in the Guardrail.
802
+ #
803
+ # @!attribute [rw] action
804
+ # The action placed on the content by the Guardrail filter.
805
+ # @return [String]
806
+ #
807
+ # @!attribute [rw] confidence
808
+ # The confidence level regarding the content detected in the filter by
809
+ # the Guardrail.
810
+ # @return [String]
811
+ #
812
+ # @!attribute [rw] type
813
+ # The type of content detected in the filter by the Guardrail.
814
+ # @return [String]
815
+ #
816
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GuardrailContentFilter AWS API Documentation
817
+ #
818
+ class GuardrailContentFilter < Struct.new(
819
+ :action,
820
+ :confidence,
821
+ :type)
822
+ SENSITIVE = []
823
+ include Aws::Structure
824
+ end
825
+
826
+ # The details of the policy assessment in the Guardrails filter.
827
+ #
828
+ # @!attribute [rw] filters
829
+ # The filter details of the policy assessment used in the Guardrails
830
+ # filter.
831
+ # @return [Array<Types::GuardrailContentFilter>]
832
+ #
833
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GuardrailContentPolicyAssessment AWS API Documentation
834
+ #
835
+ class GuardrailContentPolicyAssessment < Struct.new(
836
+ :filters)
837
+ SENSITIVE = [:filters]
838
+ include Aws::Structure
839
+ end
840
+
841
+ # The custom word details for the filter in the Guardrail.
842
+ #
843
+ # @!attribute [rw] action
844
+ # The action details for the custom word filter in the Guardrail.
845
+ # @return [String]
846
+ #
847
+ # @!attribute [rw] match
848
+ # The match details for the custom word filter in the Guardrail.
849
+ # @return [String]
850
+ #
851
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GuardrailCustomWord AWS API Documentation
852
+ #
853
+ class GuardrailCustomWord < Struct.new(
854
+ :action,
855
+ :match)
856
+ SENSITIVE = []
857
+ include Aws::Structure
858
+ end
859
+
860
+ # The managed word details for the filter in the Guardrail.
861
+ #
862
+ # @!attribute [rw] action
863
+ # The action details for the managed word filter in the Guardrail.
864
+ # @return [String]
865
+ #
866
+ # @!attribute [rw] match
867
+ # The match details for the managed word filter in the Guardrail.
868
+ # @return [String]
869
+ #
870
+ # @!attribute [rw] type
871
+ # The type details for the managed word filter in the Guardrail.
872
+ # @return [String]
873
+ #
874
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GuardrailManagedWord AWS API Documentation
875
+ #
876
+ class GuardrailManagedWord < Struct.new(
877
+ :action,
878
+ :match,
879
+ :type)
880
+ SENSITIVE = []
881
+ include Aws::Structure
882
+ end
883
+
884
+ # The Guardrail filter to identify and remove personally identifiable
885
+ # information (PII).
886
+ #
887
+ # @!attribute [rw] action
888
+ # The action of the Guardrail filter to identify and remove PII.
889
+ # @return [String]
890
+ #
891
+ # @!attribute [rw] match
892
+ # The match to settings in the Guardrail filter to identify and remove
893
+ # PII.
894
+ # @return [String]
895
+ #
896
+ # @!attribute [rw] type
897
+ # The type of PII the Guardrail filter has identified and removed.
898
+ # @return [String]
899
+ #
900
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GuardrailPiiEntityFilter AWS API Documentation
901
+ #
902
+ class GuardrailPiiEntityFilter < Struct.new(
903
+ :action,
904
+ :match,
905
+ :type)
906
+ SENSITIVE = []
907
+ include Aws::Structure
908
+ end
909
+
910
+ # The details for the regex filter used in the Guardrail.
911
+ #
912
+ # @!attribute [rw] action
913
+ # The action details for the regex filter used in the Guardrail.
914
+ # @return [String]
915
+ #
916
+ # @!attribute [rw] match
917
+ # The match details for the regex filter used in the Guardrail.
918
+ # @return [String]
919
+ #
920
+ # @!attribute [rw] name
921
+ # The name details for the regex filter used in the Guardrail.
922
+ # @return [String]
923
+ #
924
+ # @!attribute [rw] regex
925
+ # The regex details for the regex filter used in the Guardrail.
926
+ # @return [String]
927
+ #
928
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GuardrailRegexFilter AWS API Documentation
929
+ #
930
+ class GuardrailRegexFilter < Struct.new(
931
+ :action,
932
+ :match,
933
+ :name,
934
+ :regex)
935
+ SENSITIVE = []
936
+ include Aws::Structure
937
+ end
938
+
939
+ # The details of the sensitive policy assessment used in the Guardrail.
940
+ #
941
+ # @!attribute [rw] pii_entities
942
+ # The details of the PII entities used in the sensitive policy
943
+ # assessment for the Guardrail.
944
+ # @return [Array<Types::GuardrailPiiEntityFilter>]
945
+ #
946
+ # @!attribute [rw] regexes
947
+ # The details of the regexes used in the sensitive policy assessment
948
+ # for the Guardrail.
949
+ # @return [Array<Types::GuardrailRegexFilter>]
950
+ #
951
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GuardrailSensitiveInformationPolicyAssessment AWS API Documentation
952
+ #
953
+ class GuardrailSensitiveInformationPolicyAssessment < Struct.new(
954
+ :pii_entities,
955
+ :regexes)
956
+ SENSITIVE = [:pii_entities, :regexes]
957
+ include Aws::Structure
958
+ end
959
+
960
+ # The details for a specific topic defined in the Guardrail.
961
+ #
962
+ # @!attribute [rw] action
963
+ # The action details on a specific topic in the Guardrail.
964
+ # @return [String]
965
+ #
966
+ # @!attribute [rw] name
967
+ # The name details on a specific topic in the Guardrail.
968
+ # @return [String]
969
+ #
970
+ # @!attribute [rw] type
971
+ # The type details on a specific topic in the Guardrail.
972
+ # @return [String]
973
+ #
974
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GuardrailTopic AWS API Documentation
975
+ #
976
+ class GuardrailTopic < Struct.new(
977
+ :action,
978
+ :name,
979
+ :type)
980
+ SENSITIVE = []
981
+ include Aws::Structure
982
+ end
983
+
984
+ # The details of the policy assessment used in the Guardrail.
985
+ #
986
+ # @!attribute [rw] topics
987
+ # The topic details of the policy assessment used in the Guardrail.
988
+ # @return [Array<Types::GuardrailTopic>]
989
+ #
990
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GuardrailTopicPolicyAssessment AWS API Documentation
991
+ #
992
+ class GuardrailTopicPolicyAssessment < Struct.new(
993
+ :topics)
994
+ SENSITIVE = [:topics]
995
+ include Aws::Structure
996
+ end
997
+
998
+ # The trace details used in the Guardrail.
999
+ #
1000
+ # @!attribute [rw] action
1001
+ # The trace action details used with the Guardrail.
1002
+ # @return [String]
1003
+ #
1004
+ # @!attribute [rw] input_assessments
1005
+ # The details of the input assessments used in the Guardrail Trace.
1006
+ # @return [Array<Types::GuardrailAssessment>]
1007
+ #
1008
+ # @!attribute [rw] output_assessments
1009
+ # The details of the output assessments used in the Guardrail Trace.
1010
+ # @return [Array<Types::GuardrailAssessment>]
1011
+ #
1012
+ # @!attribute [rw] trace_id
1013
+ # The details of the trace Id used in the Guardrail Trace.
1014
+ # @return [String]
1015
+ #
1016
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GuardrailTrace AWS API Documentation
1017
+ #
1018
+ class GuardrailTrace < Struct.new(
1019
+ :action,
1020
+ :input_assessments,
1021
+ :output_assessments,
1022
+ :trace_id)
1023
+ SENSITIVE = []
1024
+ include Aws::Structure
1025
+ end
1026
+
1027
+ # The assessment details for words defined in the Guardrail filter.
1028
+ #
1029
+ # @!attribute [rw] custom_words
1030
+ # The custom word details for words defined in the Guardrail filter.
1031
+ # @return [Array<Types::GuardrailCustomWord>]
1032
+ #
1033
+ # @!attribute [rw] managed_word_lists
1034
+ # The managed word lists for words defined in the Guardrail filter.
1035
+ # @return [Array<Types::GuardrailManagedWord>]
1036
+ #
1037
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GuardrailWordPolicyAssessment AWS API Documentation
1038
+ #
1039
+ class GuardrailWordPolicyAssessment < Struct.new(
1040
+ :custom_words,
1041
+ :managed_word_lists)
1042
+ SENSITIVE = [:custom_words, :managed_word_lists]
1043
+ include Aws::Structure
1044
+ end
1045
+
772
1046
  # The configuration for inference settings when generating responses
773
1047
  # using RetrieveAndGenerate.
774
1048
  #
@@ -1807,7 +2081,8 @@ module Aws::BedrockAgentRuntime
1807
2081
 
1808
2082
  # Specifies the filters to use on the metadata attributes in the
1809
2083
  # knowledge base data sources before returning results. For more
1810
- # information, see [Query configurations][1].
2084
+ # information, see [Query configurations][1]. See the examples below to
2085
+ # see how to use these filters.
1811
2086
  #
1812
2087
  # This data type is used in the following API operations:
1813
2088
  #
@@ -1824,68 +2099,145 @@ module Aws::BedrockAgentRuntime
1824
2099
  # @note RetrievalFilter is a union - when making an API calls you must set exactly one of the members.
1825
2100
  #
1826
2101
  # @!attribute [rw] and_all
1827
- # Knowledge base data sources whose metadata attributes fulfill all
1828
- # the filter conditions inside this list are returned.
2102
+ # Knowledge base data sources are returned if their metadata
2103
+ # attributes fulfill all the filter conditions inside this list.
1829
2104
  # @return [Array<Types::RetrievalFilter>]
1830
2105
  #
1831
2106
  # @!attribute [rw] equals
1832
- # Knowledge base data sources that contain a metadata attribute whose
1833
- # name matches the `key` and whose value matches the `value` in this
1834
- # object are returned.
2107
+ # Knowledge base data sources are returned if they contain a metadata
2108
+ # attribute whose name matches the `key` and whose value matches the
2109
+ # `value` in this object.
2110
+ #
2111
+ # The following example would return data sources with an `animal`
2112
+ # attribute whose value is `cat`:
2113
+ #
2114
+ # `"equals": \{ "key": "animal", "value": "cat" \}`
1835
2115
  # @return [Types::FilterAttribute]
1836
2116
  #
1837
2117
  # @!attribute [rw] greater_than
1838
- # Knowledge base data sources that contain a metadata attribute whose
1839
- # name matches the `key` and whose value is greater than the `value`
1840
- # in this object are returned.
2118
+ # Knowledge base data sources are returned if they contain a metadata
2119
+ # attribute whose name matches the `key` and whose value is greater
2120
+ # than the `value` in this object.
2121
+ #
2122
+ # The following example would return data sources with an `year`
2123
+ # attribute whose value is greater than `1989`:
2124
+ #
2125
+ # `"greaterThan": \{ "key": "year", "value": 1989 \}`
1841
2126
  # @return [Types::FilterAttribute]
1842
2127
  #
1843
2128
  # @!attribute [rw] greater_than_or_equals
1844
- # Knowledge base data sources that contain a metadata attribute whose
1845
- # name matches the `key` and whose value is greater than or equal to
1846
- # the `value` in this object are returned.
2129
+ # Knowledge base data sources are returned if they contain a metadata
2130
+ # attribute whose name matches the `key` and whose value is greater
2131
+ # than or equal to the `value` in this object.
2132
+ #
2133
+ # The following example would return data sources with an `year`
2134
+ # attribute whose value is greater than or equal to `1989`:
2135
+ #
2136
+ # `"greaterThanOrEquals": \{ "key": "year", "value": 1989 \}`
1847
2137
  # @return [Types::FilterAttribute]
1848
2138
  #
1849
2139
  # @!attribute [rw] in
1850
- # Knowledge base data sources that contain a metadata attribute whose
1851
- # name matches the `key` and whose value is in the list specified in
1852
- # the `value` in this object are returned.
2140
+ # Knowledge base data sources are returned if they contain a metadata
2141
+ # attribute whose name matches the `key` and whose value is in the
2142
+ # list specified in the `value` in this object.
2143
+ #
2144
+ # The following example would return data sources with an `animal`
2145
+ # attribute that is either `cat` or `dog`:
2146
+ #
2147
+ # `"in": \{ "key": "animal", "value": ["cat", "dog"] \}`
1853
2148
  # @return [Types::FilterAttribute]
1854
2149
  #
1855
2150
  # @!attribute [rw] less_than
1856
- # Knowledge base data sources that contain a metadata attribute whose
1857
- # name matches the `key` and whose value is less than the `value` in
1858
- # this object are returned.
2151
+ # Knowledge base data sources are returned if they contain a metadata
2152
+ # attribute whose name matches the `key` and whose value is less than
2153
+ # the `value` in this object.
2154
+ #
2155
+ # The following example would return data sources with an `year`
2156
+ # attribute whose value is less than to `1989`.
2157
+ #
2158
+ # `"lessThan": \{ "key": "year", "value": 1989 \}`
1859
2159
  # @return [Types::FilterAttribute]
1860
2160
  #
1861
2161
  # @!attribute [rw] less_than_or_equals
1862
- # Knowledge base data sources that contain a metadata attribute whose
1863
- # name matches the `key` and whose value is less than or equal to the
1864
- # `value` in this object are returned.
2162
+ # Knowledge base data sources are returned if they contain a metadata
2163
+ # attribute whose name matches the `key` and whose value is less than
2164
+ # or equal to the `value` in this object.
2165
+ #
2166
+ # The following example would return data sources with an `year`
2167
+ # attribute whose value is less than or equal to `1989`.
2168
+ #
2169
+ # `"lessThanOrEquals": \{ "key": "year", "value": 1989 \}`
2170
+ # @return [Types::FilterAttribute]
2171
+ #
2172
+ # @!attribute [rw] list_contains
2173
+ # Knowledge base data sources are returned if they contain a metadata
2174
+ # attribute whose name matches the `key` and whose value is a list
2175
+ # that contains the `value` as one of its members.
2176
+ #
2177
+ # The following example would return data sources with an `animals`
2178
+ # attribute that is a list containing a `cat` member (for example
2179
+ # `["dog", "cat"]`).
2180
+ #
2181
+ # `"listContains": \{ "key": "animals", "value": "cat" \}`
1865
2182
  # @return [Types::FilterAttribute]
1866
2183
  #
1867
2184
  # @!attribute [rw] not_equals
1868
2185
  # Knowledge base data sources that contain a metadata attribute whose
1869
2186
  # name matches the `key` and whose value doesn't match the `value` in
1870
2187
  # this object are returned.
2188
+ #
2189
+ # The following example would return data sources that don't contain
2190
+ # an `animal` attribute whose value is `cat`.
2191
+ #
2192
+ # `"notEquals": \{ "key": "animal", "value": "cat" \}`
1871
2193
  # @return [Types::FilterAttribute]
1872
2194
  #
1873
2195
  # @!attribute [rw] not_in
1874
- # Knowledge base data sources that contain a metadata attribute whose
1875
- # name matches the `key` and whose value isn't in the list specified
1876
- # in the `value` in this object are returned.
2196
+ # Knowledge base data sources are returned if they contain a metadata
2197
+ # attribute whose name matches the `key` and whose value isn't in the
2198
+ # list specified in the `value` in this object.
2199
+ #
2200
+ # The following example would return data sources whose `animal`
2201
+ # attribute is neither `cat` nor `dog`.
2202
+ #
2203
+ # `"notIn": \{ "key": "animal", "value": ["cat", "dog"] \}`
1877
2204
  # @return [Types::FilterAttribute]
1878
2205
  #
1879
2206
  # @!attribute [rw] or_all
1880
- # Knowledge base data sources whose metadata attributes fulfill at
1881
- # least one of the filter conditions inside this list are returned.
2207
+ # Knowledge base data sources are returned if their metadata
2208
+ # attributes fulfill at least one of the filter conditions inside this
2209
+ # list.
1882
2210
  # @return [Array<Types::RetrievalFilter>]
1883
2211
  #
1884
2212
  # @!attribute [rw] starts_with
1885
- # Knowledge base data sources that contain a metadata attribute whose
1886
- # name matches the `key` and whose value starts with the `value` in
1887
- # this object are returned. This filter is currently only supported
2213
+ # Knowledge base data sources are returned if they contain a metadata
2214
+ # attribute whose name matches the `key` and whose value starts with
2215
+ # the `value` in this object. This filter is currently only supported
1888
2216
  # for Amazon OpenSearch Serverless vector stores.
2217
+ #
2218
+ # The following example would return data sources with an `animal`
2219
+ # attribute starts with `ca` (for example, `cat` or `camel`).
2220
+ #
2221
+ # `"startsWith": \{ "key": "animal", "value": "ca" \}`
2222
+ # @return [Types::FilterAttribute]
2223
+ #
2224
+ # @!attribute [rw] string_contains
2225
+ # Knowledge base data sources are returned if they contain a metadata
2226
+ # attribute whose name matches the `key` and whose value is one of the
2227
+ # following:
2228
+ #
2229
+ # * A string that contains the `value` as a substring. The following
2230
+ # example would return data sources with an `animal` attribute that
2231
+ # contains the substring `at` (for example `cat`).
2232
+ #
2233
+ # `"stringContains": \{ "key": "animal", "value": "at" \}`
2234
+ #
2235
+ # * A list with a member that contains the `value` as a substring. The
2236
+ # following example would return data sources with an `animals`
2237
+ # attribute that is a list containing a member that contains the
2238
+ # substring `at` (for example `["dog", "cat"]`).
2239
+ #
2240
+ # `"stringContains": \{ "key": "animals", "value": "at" \}`
1889
2241
  # @return [Types::FilterAttribute]
1890
2242
  #
1891
2243
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrievalFilter AWS API Documentation
@@ -1898,10 +2250,12 @@ module Aws::BedrockAgentRuntime
1898
2250
  :in,
1899
2251
  :less_than,
1900
2252
  :less_than_or_equals,
2253
+ :list_contains,
1901
2254
  :not_equals,
1902
2255
  :not_in,
1903
2256
  :or_all,
1904
2257
  :starts_with,
2258
+ :string_contains,
1905
2259
  :unknown)
1906
2260
  SENSITIVE = []
1907
2261
  include Aws::Structure
@@ -1914,10 +2268,12 @@ module Aws::BedrockAgentRuntime
1914
2268
  class In < RetrievalFilter; end
1915
2269
  class LessThan < RetrievalFilter; end
1916
2270
  class LessThanOrEquals < RetrievalFilter; end
2271
+ class ListContains < RetrievalFilter; end
1917
2272
  class NotEquals < RetrievalFilter; end
1918
2273
  class NotIn < RetrievalFilter; end
1919
2274
  class OrAll < RetrievalFilter; end
1920
2275
  class StartsWith < RetrievalFilter; end
2276
+ class StringContains < RetrievalFilter; end
1921
2277
  class Unknown < RetrievalFilter; end
1922
2278
  end
1923
2279
 
@@ -2557,6 +2913,10 @@ module Aws::BedrockAgentRuntime
2557
2913
  # Contains information about the failure of the interaction.
2558
2914
  # @return [Types::FailureTrace]
2559
2915
  #
2916
+ # @!attribute [rw] guardrail_trace
2917
+ # The trace details for a trace defined in the Guardrail filter.
2918
+ # @return [Types::GuardrailTrace]
2919
+ #
2560
2920
  # @!attribute [rw] orchestration_trace
2561
2921
  # Details about the orchestration step, in which the agent determines
2562
2922
  # the order in which actions are executed and which knowledge bases
@@ -2577,15 +2937,17 @@ module Aws::BedrockAgentRuntime
2577
2937
  #
2578
2938
  class Trace < Struct.new(
2579
2939
  :failure_trace,
2940
+ :guardrail_trace,
2580
2941
  :orchestration_trace,
2581
2942
  :post_processing_trace,
2582
2943
  :pre_processing_trace,
2583
2944
  :unknown)
2584
- SENSITIVE = [:failure_trace, :orchestration_trace, :post_processing_trace, :pre_processing_trace]
2945
+ SENSITIVE = [:failure_trace, :guardrail_trace, :orchestration_trace, :post_processing_trace, :pre_processing_trace]
2585
2946
  include Aws::Structure
2586
2947
  include Aws::Structure::Union
2587
2948
 
2588
2949
  class FailureTrace < Trace; end
2950
+ class GuardrailTrace < Trace; end
2589
2951
  class OrchestrationTrace < Trace; end
2590
2952
  class PostProcessingTrace < Trace; end
2591
2953
  class PreProcessingTrace < Trace; end
@@ -53,6 +53,6 @@ require_relative 'aws-sdk-bedrockagentruntime/event_streams'
53
53
  # @!group service
54
54
  module Aws::BedrockAgentRuntime
55
55
 
56
- GEM_VERSION = '1.9.0'
56
+ GEM_VERSION = '1.11.0'
57
57
 
58
58
  end
data/sig/client.rbs CHANGED
@@ -164,6 +164,11 @@ module Aws
164
164
  value: {
165
165
  }
166
166
  }?,
167
+ list_contains: {
168
+ key: ::String,
169
+ value: {
170
+ }
171
+ }?,
167
172
  not_equals: {
168
173
  key: ::String,
169
174
  value: {
@@ -181,6 +186,11 @@ module Aws
181
186
  key: ::String,
182
187
  value: {
183
188
  }
189
+ }?,
190
+ string_contains: {
191
+ key: ::String,
192
+ value: {
193
+ }
184
194
  }?
185
195
  }?,
186
196
  number_of_results: ::Integer?,
@@ -299,6 +309,11 @@ module Aws
299
309
  value: {
300
310
  }
301
311
  }?,
312
+ list_contains: {
313
+ key: ::String,
314
+ value: {
315
+ }
316
+ }?,
302
317
  not_equals: {
303
318
  key: ::String,
304
319
  value: {
@@ -316,6 +331,11 @@ module Aws
316
331
  key: ::String,
317
332
  value: {
318
333
  }
334
+ }?,
335
+ string_contains: {
336
+ key: ::String,
337
+ value: {
338
+ }
319
339
  }?
320
340
  }?,
321
341
  number_of_results: ::Integer?,
data/sig/types.rbs CHANGED
@@ -177,12 +177,92 @@ module Aws::BedrockAgentRuntime
177
177
  SENSITIVE: []
178
178
  end
179
179
 
180
+ class GuardrailAssessment
181
+ attr_accessor content_policy: Types::GuardrailContentPolicyAssessment
182
+ attr_accessor sensitive_information_policy: Types::GuardrailSensitiveInformationPolicyAssessment
183
+ attr_accessor topic_policy: Types::GuardrailTopicPolicyAssessment
184
+ attr_accessor word_policy: Types::GuardrailWordPolicyAssessment
185
+ SENSITIVE: [:content_policy, :sensitive_information_policy, :topic_policy, :word_policy]
186
+ end
187
+
180
188
  class GuardrailConfiguration
181
189
  attr_accessor guardrail_id: ::String
182
190
  attr_accessor guardrail_version: ::String
183
191
  SENSITIVE: []
184
192
  end
185
193
 
194
+ class GuardrailContentFilter
195
+ attr_accessor action: ("BLOCKED")
196
+ attr_accessor confidence: ("NONE" | "LOW" | "MEDIUM" | "HIGH")
197
+ attr_accessor type: ("INSULTS" | "HATE" | "SEXUAL" | "VIOLENCE" | "MISCONDUCT" | "PROMPT_ATTACK")
198
+ SENSITIVE: []
199
+ end
200
+
201
+ class GuardrailContentPolicyAssessment
202
+ attr_accessor filters: ::Array[Types::GuardrailContentFilter]
203
+ SENSITIVE: [:filters]
204
+ end
205
+
206
+ class GuardrailCustomWord
207
+ attr_accessor action: ("BLOCKED")
208
+ attr_accessor match: ::String
209
+ SENSITIVE: []
210
+ end
211
+
212
+ class GuardrailManagedWord
213
+ attr_accessor action: ("BLOCKED")
214
+ attr_accessor match: ::String
215
+ attr_accessor type: ("PROFANITY")
216
+ SENSITIVE: []
217
+ end
218
+
219
+ class GuardrailPiiEntityFilter
220
+ attr_accessor action: ("BLOCKED" | "ANONYMIZED")
221
+ attr_accessor match: ::String
222
+ attr_accessor type: ("ADDRESS" | "AGE" | "AWS_ACCESS_KEY" | "AWS_SECRET_KEY" | "CA_HEALTH_NUMBER" | "CA_SOCIAL_INSURANCE_NUMBER" | "CREDIT_DEBIT_CARD_CVV" | "CREDIT_DEBIT_CARD_EXPIRY" | "CREDIT_DEBIT_CARD_NUMBER" | "DRIVER_ID" | "EMAIL" | "INTERNATIONAL_BANK_ACCOUNT_NUMBER" | "IP_ADDRESS" | "LICENSE_PLATE" | "MAC_ADDRESS" | "NAME" | "PASSWORD" | "PHONE" | "PIN" | "SWIFT_CODE" | "UK_NATIONAL_HEALTH_SERVICE_NUMBER" | "UK_NATIONAL_INSURANCE_NUMBER" | "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" | "URL" | "USERNAME" | "US_BANK_ACCOUNT_NUMBER" | "US_BANK_ROUTING_NUMBER" | "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" | "US_PASSPORT_NUMBER" | "US_SOCIAL_SECURITY_NUMBER" | "VEHICLE_IDENTIFICATION_NUMBER")
223
+ SENSITIVE: []
224
+ end
225
+
226
+ class GuardrailRegexFilter
227
+ attr_accessor action: ("BLOCKED" | "ANONYMIZED")
228
+ attr_accessor match: ::String
229
+ attr_accessor name: ::String
230
+ attr_accessor regex: ::String
231
+ SENSITIVE: []
232
+ end
233
+
234
+ class GuardrailSensitiveInformationPolicyAssessment
235
+ attr_accessor pii_entities: ::Array[Types::GuardrailPiiEntityFilter]
236
+ attr_accessor regexes: ::Array[Types::GuardrailRegexFilter]
237
+ SENSITIVE: [:pii_entities, :regexes]
238
+ end
239
+
240
+ class GuardrailTopic
241
+ attr_accessor action: ("BLOCKED")
242
+ attr_accessor name: ::String
243
+ attr_accessor type: ("DENY")
244
+ SENSITIVE: []
245
+ end
246
+
247
+ class GuardrailTopicPolicyAssessment
248
+ attr_accessor topics: ::Array[Types::GuardrailTopic]
249
+ SENSITIVE: [:topics]
250
+ end
251
+
252
+ class GuardrailTrace
253
+ attr_accessor action: ("INTERVENED" | "NONE")
254
+ attr_accessor input_assessments: ::Array[Types::GuardrailAssessment]
255
+ attr_accessor output_assessments: ::Array[Types::GuardrailAssessment]
256
+ attr_accessor trace_id: ::String
257
+ SENSITIVE: []
258
+ end
259
+
260
+ class GuardrailWordPolicyAssessment
261
+ attr_accessor custom_words: ::Array[Types::GuardrailCustomWord]
262
+ attr_accessor managed_word_lists: ::Array[Types::GuardrailManagedWord]
263
+ SENSITIVE: [:custom_words, :managed_word_lists]
264
+ end
265
+
186
266
  class InferenceConfig
187
267
  attr_accessor text_inference_config: Types::TextInferenceConfig
188
268
  SENSITIVE: []
@@ -448,10 +528,12 @@ module Aws::BedrockAgentRuntime
448
528
  attr_accessor in: Types::FilterAttribute
449
529
  attr_accessor less_than: Types::FilterAttribute
450
530
  attr_accessor less_than_or_equals: Types::FilterAttribute
531
+ attr_accessor list_contains: Types::FilterAttribute
451
532
  attr_accessor not_equals: Types::FilterAttribute
452
533
  attr_accessor not_in: Types::FilterAttribute
453
534
  attr_accessor or_all: ::Array[Types::RetrievalFilter]
454
535
  attr_accessor starts_with: Types::FilterAttribute
536
+ attr_accessor string_contains: Types::FilterAttribute
455
537
  attr_accessor unknown: untyped
456
538
  SENSITIVE: []
457
539
 
@@ -469,6 +551,8 @@ module Aws::BedrockAgentRuntime
469
551
  end
470
552
  class LessThanOrEquals < RetrievalFilter
471
553
  end
554
+ class ListContains < RetrievalFilter
555
+ end
472
556
  class NotEquals < RetrievalFilter
473
557
  end
474
558
  class NotIn < RetrievalFilter
@@ -477,6 +561,8 @@ module Aws::BedrockAgentRuntime
477
561
  end
478
562
  class StartsWith < RetrievalFilter
479
563
  end
564
+ class StringContains < RetrievalFilter
565
+ end
480
566
  class Unknown < RetrievalFilter
481
567
  end
482
568
  end
@@ -610,14 +696,17 @@ module Aws::BedrockAgentRuntime
610
696
 
611
697
  class Trace
612
698
  attr_accessor failure_trace: Types::FailureTrace
699
+ attr_accessor guardrail_trace: Types::GuardrailTrace
613
700
  attr_accessor orchestration_trace: Types::OrchestrationTrace
614
701
  attr_accessor post_processing_trace: Types::PostProcessingTrace
615
702
  attr_accessor pre_processing_trace: Types::PreProcessingTrace
616
703
  attr_accessor unknown: untyped
617
- SENSITIVE: [:failure_trace, :orchestration_trace, :post_processing_trace, :pre_processing_trace]
704
+ SENSITIVE: [:failure_trace, :guardrail_trace, :orchestration_trace, :post_processing_trace, :pre_processing_trace]
618
705
 
619
706
  class FailureTrace < Trace
620
707
  end
708
+ class GuardrailTrace < Trace
709
+ end
621
710
  class OrchestrationTrace < Trace
622
711
  end
623
712
  class PostProcessingTrace < Trace
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-bedrockagentruntime
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-13 00:00:00.000000000 Z
11
+ date: 2024-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core