aws-sdk-bedrock 1.11.0 → 1.12.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2b0a5a5632309b3ea93042fb2e1c933d33f0c7865a6bb9dc5d8b87dc0b1e7fc
4
- data.tar.gz: 14c380cc377e5c9959619d7c6a1dca6276d975c83878270c5b07a2bf49255b38
3
+ metadata.gz: 0c419dba0e93f29b828cf5a2ccaf91cb0ffc8834e7784d929b3d37174243a6da
4
+ data.tar.gz: 97f129f441a7ed2fc97054e43dcc59cd5a49fb30422ded176da9c29e2505f745
5
5
  SHA512:
6
- metadata.gz: 233357dd65f892560b1ee65e4ac63c906686a4e2b126767b6a67cb2fb4828f87a6e6fed7ef3c9e1c7126ceeb7acaed3380e0208591bf69eaecaf9f20f6d6a1a3
7
- data.tar.gz: e1bf8dd3f12d0369cdd091088cc96ea39f43372b5ba0156d644fa181fc1fcebb37cc3d081dd90b689e119ce9fdbb568a78196753951bbd83cde6a43bf25c2217
6
+ metadata.gz: 0dec358aaac92ca0912d7fece0e17d1d25f3e2c3a034235985e4c9295d9a5857f8dd8f2818665468a8b4ab862e81a8e25695944da29ad4204b796104a5c2f778
7
+ data.tar.gz: 838ba873012a002568f72982c9314f52e781e6eee9d52a2a3204ef5281d32202647794977906934392e51c6f993b5783bbef0b9a01d8939bf8336f975d8673ad
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.12.0 (2024-07-10)
5
+ ------------------
6
+
7
+ * Feature - Add support for contextual grounding check for Guardrails for Amazon Bedrock.
8
+
4
9
  1.11.0 (2024-07-02)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.11.0
1
+ 1.12.0
@@ -574,51 +574,38 @@ module Aws::Bedrock
574
574
  req.send_request(options)
575
575
  end
576
576
 
577
- # Creates a guardrail to block topics and to filter out harmful content.
577
+ # Creates a guardrail to block topics and to implement safeguards for
578
+ # your generative AI applications.
578
579
  #
579
- # * Specify a `name` and optional `description`.
580
+ # You can configure the following policies in a guardrail to avoid
581
+ # undesirable and harmful content, filter out denied topics and words,
582
+ # and remove sensitive information for privacy protection.
580
583
  #
581
- # * Specify messages for when the guardrail successfully blocks a prompt
582
- # or a model response in the `blockedInputMessaging` and
583
- # `blockedOutputsMessaging` fields.
584
+ # * **Content filters** - Adjust filter strengths to block input prompts
585
+ # or model responses containing harmful content.
584
586
  #
585
- # * Specify topics for the guardrail to deny in the `topicPolicyConfig`
586
- # object. Each [GuardrailTopicConfig][1] object in the `topicsConfig`
587
- # list pertains to one topic.
587
+ # * **Denied topics** - Define a set of topics that are undesirable in
588
+ # the context of your application. These topics will be blocked if
589
+ # detected in user queries or model responses.
588
590
  #
589
- # * Give a `name` and `description` so that the guardrail can properly
590
- # identify the topic.
591
+ # * **Word filters** - Configure filters to block undesirable words,
592
+ # phrases, and profanity. Such words can include offensive terms,
593
+ # competitor names etc.
591
594
  #
592
- # * Specify `DENY` in the `type` field.
595
+ # * **Sensitive information filters** - Block or mask sensitive
596
+ # information such as personally identifiable information (PII) or
597
+ # custom regex in user inputs and model responses.
593
598
  #
594
- # * (Optional) Provide up to five prompts that you would categorize as
595
- # belonging to the topic in the `examples` list.
599
+ # In addition to the above policies, you can also configure the messages
600
+ # to be returned to the user if a user input or model response is in
601
+ # violation of the policies defined in the guardrail.
596
602
  #
597
- # * Specify filter strengths for the harmful categories defined in
598
- # Amazon Bedrock in the `contentPolicyConfig` object. Each
599
- # [GuardrailContentFilterConfig][2] object in the `filtersConfig` list
600
- # pertains to a harmful category. For more information, see [Content
601
- # filters][3]. For more information about the fields in a content
602
- # filter, see [GuardrailContentFilterConfig][2].
603
+ # For more information, see [Guardrails for Amazon Bedrock][1] in the
604
+ # *Amazon Bedrock User Guide*.
603
605
  #
604
- # * Specify the category in the `type` field.
605
606
  #
606
- # * Specify the strength of the filter for prompts in the
607
- # `inputStrength` field and for model responses in the `strength`
608
- # field of the [GuardrailContentFilterConfig][2].
609
607
  #
610
- # * (Optional) For security, include the ARN of a KMS key in the
611
- # `kmsKeyId` field.
612
- #
613
- # * (Optional) Attach any tags to the guardrail in the `tags` object.
614
- # For more information, see [Tag resources][4].
615
- #
616
- #
617
- #
618
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GuardrailTopicConfig.html
619
- # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GuardrailContentFilterConfig.html
620
- # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-filters
621
- # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/tagging
608
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html
622
609
  #
623
610
  # @option params [required, String] :name
624
611
  # The name to give the guardrail.
@@ -638,6 +625,10 @@ module Aws::Bedrock
638
625
  # @option params [Types::GuardrailSensitiveInformationPolicyConfig] :sensitive_information_policy_config
639
626
  # The sensitive information policy to configure for the guardrail.
640
627
  #
628
+ # @option params [Types::GuardrailContextualGroundingPolicyConfig] :contextual_grounding_policy_config
629
+ # The contextual grounding policy configuration used to create a
630
+ # guardrail.
631
+ #
641
632
  # @option params [required, String] :blocked_input_messaging
642
633
  # The message to return when the guardrail blocks a prompt.
643
634
  #
@@ -723,6 +714,14 @@ module Aws::Bedrock
723
714
  # },
724
715
  # ],
725
716
  # },
717
+ # contextual_grounding_policy_config: {
718
+ # filters_config: [ # required
719
+ # {
720
+ # type: "GROUNDING", # required, accepts GROUNDING, RELEVANCE
721
+ # threshold: 1.0, # required
722
+ # },
723
+ # ],
724
+ # },
726
725
  # blocked_input_messaging: "GuardrailBlockedMessaging", # required
727
726
  # blocked_outputs_messaging: "GuardrailBlockedMessaging", # required
728
727
  # kms_key_id: "KmsKeyId",
@@ -756,7 +755,7 @@ module Aws::Bedrock
756
755
  # compare the configuration with another version.
757
756
  #
758
757
  # @option params [required, String] :guardrail_identifier
759
- # The unique identifier of the guardrail.
758
+ # The unique identifier of the guardrail. This can be an ID or the ARN.
760
759
  #
761
760
  # @option params [String] :description
762
761
  # A description of the guardrail version.
@@ -1096,7 +1095,7 @@ module Aws::Bedrock
1096
1095
  # `guardrailVersion` field.
1097
1096
  #
1098
1097
  # @option params [required, String] :guardrail_identifier
1099
- # The unique identifier of the guardrail.
1098
+ # The unique identifier of the guardrail. This can be an ID or the ARN.
1100
1099
  #
1101
1100
  # @option params [String] :guardrail_version
1102
1101
  # The version of the guardrail.
@@ -1346,7 +1345,8 @@ module Aws::Bedrock
1346
1345
  # response returns details for the `DRAFT` version.
1347
1346
  #
1348
1347
  # @option params [required, String] :guardrail_identifier
1349
- # The unique identifier of the guardrail for which to get details.
1348
+ # The unique identifier of the guardrail for which to get details. This
1349
+ # can be an ID or the ARN.
1350
1350
  #
1351
1351
  # @option params [String] :guardrail_version
1352
1352
  # The version of the guardrail for which to get details. If you don't
@@ -1365,6 +1365,7 @@ module Aws::Bedrock
1365
1365
  # * {Types::GetGuardrailResponse#content_policy #content_policy} => Types::GuardrailContentPolicy
1366
1366
  # * {Types::GetGuardrailResponse#word_policy #word_policy} => Types::GuardrailWordPolicy
1367
1367
  # * {Types::GetGuardrailResponse#sensitive_information_policy #sensitive_information_policy} => Types::GuardrailSensitiveInformationPolicy
1368
+ # * {Types::GetGuardrailResponse#contextual_grounding_policy #contextual_grounding_policy} => Types::GuardrailContextualGroundingPolicy
1368
1369
  # * {Types::GetGuardrailResponse#created_at #created_at} => Time
1369
1370
  # * {Types::GetGuardrailResponse#updated_at #updated_at} => Time
1370
1371
  # * {Types::GetGuardrailResponse#status_reasons #status_reasons} => Array<String>
@@ -1410,6 +1411,9 @@ module Aws::Bedrock
1410
1411
  # resp.sensitive_information_policy.regexes[0].description #=> String
1411
1412
  # resp.sensitive_information_policy.regexes[0].pattern #=> String
1412
1413
  # resp.sensitive_information_policy.regexes[0].action #=> String, one of "BLOCK", "ANONYMIZE"
1414
+ # resp.contextual_grounding_policy.filters #=> Array
1415
+ # resp.contextual_grounding_policy.filters[0].type #=> String, one of "GROUNDING", "RELEVANCE"
1416
+ # resp.contextual_grounding_policy.filters[0].threshold #=> Float
1413
1417
  # resp.created_at #=> Time
1414
1418
  # resp.updated_at #=> Time
1415
1419
  # resp.status_reasons #=> Array
@@ -1829,7 +1833,7 @@ module Aws::Bedrock
1829
1833
  # `ListGuardrails` request to see the next batch of results.
1830
1834
  #
1831
1835
  # @option params [String] :guardrail_identifier
1832
- # The unique identifier of the guardrail.
1836
+ # The unique identifier of the guardrail. This can be an ID or the ARN.
1833
1837
  #
1834
1838
  # @option params [Integer] :max_results
1835
1839
  # The maximum number of results to return in the response.
@@ -2277,18 +2281,14 @@ module Aws::Bedrock
2277
2281
  # * (Optional) For security, include the ARN of a KMS key in the
2278
2282
  # `kmsKeyId` field.
2279
2283
  #
2280
- # * (Optional) Attach any tags to the guardrail in the `tags` object.
2281
- # For more information, see [Tag resources][4].
2282
- #
2283
2284
  #
2284
2285
  #
2285
2286
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GuardrailTopicConfig.html
2286
2287
  # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GuardrailContentFilterConfig.html
2287
- # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-filters
2288
- # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/tagging
2288
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-content-filters
2289
2289
  #
2290
2290
  # @option params [required, String] :guardrail_identifier
2291
- # The unique identifier of the guardrail
2291
+ # The unique identifier of the guardrail. This can be an ID or the ARN.
2292
2292
  #
2293
2293
  # @option params [required, String] :name
2294
2294
  # A name for the guardrail.
@@ -2308,6 +2308,10 @@ module Aws::Bedrock
2308
2308
  # @option params [Types::GuardrailSensitiveInformationPolicyConfig] :sensitive_information_policy_config
2309
2309
  # The sensitive information policy to configure for the guardrail.
2310
2310
  #
2311
+ # @option params [Types::GuardrailContextualGroundingPolicyConfig] :contextual_grounding_policy_config
2312
+ # The contextual grounding policy configuration used to update a
2313
+ # guardrail.
2314
+ #
2311
2315
  # @option params [required, String] :blocked_input_messaging
2312
2316
  # The message to return when the guardrail blocks a prompt.
2313
2317
  #
@@ -2377,6 +2381,14 @@ module Aws::Bedrock
2377
2381
  # },
2378
2382
  # ],
2379
2383
  # },
2384
+ # contextual_grounding_policy_config: {
2385
+ # filters_config: [ # required
2386
+ # {
2387
+ # type: "GROUNDING", # required, accepts GROUNDING, RELEVANCE
2388
+ # threshold: 1.0, # required
2389
+ # },
2390
+ # ],
2391
+ # },
2380
2392
  # blocked_input_messaging: "GuardrailBlockedMessaging", # required
2381
2393
  # blocked_outputs_messaging: "GuardrailBlockedMessaging", # required
2382
2394
  # kms_key_id: "KmsKeyId",
@@ -2458,7 +2470,7 @@ module Aws::Bedrock
2458
2470
  params: params,
2459
2471
  config: config)
2460
2472
  context[:gem_name] = 'aws-sdk-bedrock'
2461
- context[:gem_version] = '1.11.0'
2473
+ context[:gem_version] = '1.12.0'
2462
2474
  Seahorse::Client::Request.new(handlers, context)
2463
2475
  end
2464
2476
 
@@ -106,6 +106,15 @@ module Aws::Bedrock
106
106
  GuardrailContentFiltersConfig = Shapes::ListShape.new(name: 'GuardrailContentFiltersConfig')
107
107
  GuardrailContentPolicy = Shapes::StructureShape.new(name: 'GuardrailContentPolicy')
108
108
  GuardrailContentPolicyConfig = Shapes::StructureShape.new(name: 'GuardrailContentPolicyConfig')
109
+ GuardrailContextualGroundingFilter = Shapes::StructureShape.new(name: 'GuardrailContextualGroundingFilter')
110
+ GuardrailContextualGroundingFilterConfig = Shapes::StructureShape.new(name: 'GuardrailContextualGroundingFilterConfig')
111
+ GuardrailContextualGroundingFilterConfigThresholdDouble = Shapes::FloatShape.new(name: 'GuardrailContextualGroundingFilterConfigThresholdDouble')
112
+ GuardrailContextualGroundingFilterThresholdDouble = Shapes::FloatShape.new(name: 'GuardrailContextualGroundingFilterThresholdDouble')
113
+ GuardrailContextualGroundingFilterType = Shapes::StringShape.new(name: 'GuardrailContextualGroundingFilterType')
114
+ GuardrailContextualGroundingFilters = Shapes::ListShape.new(name: 'GuardrailContextualGroundingFilters')
115
+ GuardrailContextualGroundingFiltersConfig = Shapes::ListShape.new(name: 'GuardrailContextualGroundingFiltersConfig')
116
+ GuardrailContextualGroundingPolicy = Shapes::StructureShape.new(name: 'GuardrailContextualGroundingPolicy')
117
+ GuardrailContextualGroundingPolicyConfig = Shapes::StructureShape.new(name: 'GuardrailContextualGroundingPolicyConfig')
109
118
  GuardrailDescription = Shapes::StringShape.new(name: 'GuardrailDescription')
110
119
  GuardrailDraftVersion = Shapes::StringShape.new(name: 'GuardrailDraftVersion')
111
120
  GuardrailFailureRecommendation = Shapes::StringShape.new(name: 'GuardrailFailureRecommendation')
@@ -300,6 +309,7 @@ module Aws::Bedrock
300
309
  CreateGuardrailRequest.add_member(:content_policy_config, Shapes::ShapeRef.new(shape: GuardrailContentPolicyConfig, location_name: "contentPolicyConfig"))
301
310
  CreateGuardrailRequest.add_member(:word_policy_config, Shapes::ShapeRef.new(shape: GuardrailWordPolicyConfig, location_name: "wordPolicyConfig"))
302
311
  CreateGuardrailRequest.add_member(:sensitive_information_policy_config, Shapes::ShapeRef.new(shape: GuardrailSensitiveInformationPolicyConfig, location_name: "sensitiveInformationPolicyConfig"))
312
+ CreateGuardrailRequest.add_member(:contextual_grounding_policy_config, Shapes::ShapeRef.new(shape: GuardrailContextualGroundingPolicyConfig, location_name: "contextualGroundingPolicyConfig"))
303
313
  CreateGuardrailRequest.add_member(:blocked_input_messaging, Shapes::ShapeRef.new(shape: GuardrailBlockedMessaging, required: true, location_name: "blockedInputMessaging"))
304
314
  CreateGuardrailRequest.add_member(:blocked_outputs_messaging, Shapes::ShapeRef.new(shape: GuardrailBlockedMessaging, required: true, location_name: "blockedOutputsMessaging"))
305
315
  CreateGuardrailRequest.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: KmsKeyId, location_name: "kmsKeyId"))
@@ -533,6 +543,7 @@ module Aws::Bedrock
533
543
  GetGuardrailResponse.add_member(:content_policy, Shapes::ShapeRef.new(shape: GuardrailContentPolicy, location_name: "contentPolicy"))
534
544
  GetGuardrailResponse.add_member(:word_policy, Shapes::ShapeRef.new(shape: GuardrailWordPolicy, location_name: "wordPolicy"))
535
545
  GetGuardrailResponse.add_member(:sensitive_information_policy, Shapes::ShapeRef.new(shape: GuardrailSensitiveInformationPolicy, location_name: "sensitiveInformationPolicy"))
546
+ GetGuardrailResponse.add_member(:contextual_grounding_policy, Shapes::ShapeRef.new(shape: GuardrailContextualGroundingPolicy, location_name: "contextualGroundingPolicy"))
536
547
  GetGuardrailResponse.add_member(:created_at, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "createdAt"))
537
548
  GetGuardrailResponse.add_member(:updated_at, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "updatedAt"))
538
549
  GetGuardrailResponse.add_member(:status_reasons, Shapes::ShapeRef.new(shape: GuardrailStatusReasons, location_name: "statusReasons"))
@@ -611,6 +622,24 @@ module Aws::Bedrock
611
622
  GuardrailContentPolicyConfig.add_member(:filters_config, Shapes::ShapeRef.new(shape: GuardrailContentFiltersConfig, required: true, location_name: "filtersConfig"))
612
623
  GuardrailContentPolicyConfig.struct_class = Types::GuardrailContentPolicyConfig
613
624
 
625
+ GuardrailContextualGroundingFilter.add_member(:type, Shapes::ShapeRef.new(shape: GuardrailContextualGroundingFilterType, required: true, location_name: "type"))
626
+ GuardrailContextualGroundingFilter.add_member(:threshold, Shapes::ShapeRef.new(shape: GuardrailContextualGroundingFilterThresholdDouble, required: true, location_name: "threshold"))
627
+ GuardrailContextualGroundingFilter.struct_class = Types::GuardrailContextualGroundingFilter
628
+
629
+ GuardrailContextualGroundingFilterConfig.add_member(:type, Shapes::ShapeRef.new(shape: GuardrailContextualGroundingFilterType, required: true, location_name: "type"))
630
+ GuardrailContextualGroundingFilterConfig.add_member(:threshold, Shapes::ShapeRef.new(shape: GuardrailContextualGroundingFilterConfigThresholdDouble, required: true, location_name: "threshold"))
631
+ GuardrailContextualGroundingFilterConfig.struct_class = Types::GuardrailContextualGroundingFilterConfig
632
+
633
+ GuardrailContextualGroundingFilters.member = Shapes::ShapeRef.new(shape: GuardrailContextualGroundingFilter)
634
+
635
+ GuardrailContextualGroundingFiltersConfig.member = Shapes::ShapeRef.new(shape: GuardrailContextualGroundingFilterConfig)
636
+
637
+ GuardrailContextualGroundingPolicy.add_member(:filters, Shapes::ShapeRef.new(shape: GuardrailContextualGroundingFilters, required: true, location_name: "filters"))
638
+ GuardrailContextualGroundingPolicy.struct_class = Types::GuardrailContextualGroundingPolicy
639
+
640
+ GuardrailContextualGroundingPolicyConfig.add_member(:filters_config, Shapes::ShapeRef.new(shape: GuardrailContextualGroundingFiltersConfig, required: true, location_name: "filtersConfig"))
641
+ GuardrailContextualGroundingPolicyConfig.struct_class = Types::GuardrailContextualGroundingPolicyConfig
642
+
614
643
  GuardrailFailureRecommendations.member = Shapes::ShapeRef.new(shape: GuardrailFailureRecommendation)
615
644
 
616
645
  GuardrailManagedWordLists.member = Shapes::ShapeRef.new(shape: GuardrailManagedWords)
@@ -934,6 +963,7 @@ module Aws::Bedrock
934
963
  UpdateGuardrailRequest.add_member(:content_policy_config, Shapes::ShapeRef.new(shape: GuardrailContentPolicyConfig, location_name: "contentPolicyConfig"))
935
964
  UpdateGuardrailRequest.add_member(:word_policy_config, Shapes::ShapeRef.new(shape: GuardrailWordPolicyConfig, location_name: "wordPolicyConfig"))
936
965
  UpdateGuardrailRequest.add_member(:sensitive_information_policy_config, Shapes::ShapeRef.new(shape: GuardrailSensitiveInformationPolicyConfig, location_name: "sensitiveInformationPolicyConfig"))
966
+ UpdateGuardrailRequest.add_member(:contextual_grounding_policy_config, Shapes::ShapeRef.new(shape: GuardrailContextualGroundingPolicyConfig, location_name: "contextualGroundingPolicyConfig"))
937
967
  UpdateGuardrailRequest.add_member(:blocked_input_messaging, Shapes::ShapeRef.new(shape: GuardrailBlockedMessaging, required: true, location_name: "blockedInputMessaging"))
938
968
  UpdateGuardrailRequest.add_member(:blocked_outputs_messaging, Shapes::ShapeRef.new(shape: GuardrailBlockedMessaging, required: true, location_name: "blockedOutputsMessaging"))
939
969
  UpdateGuardrailRequest.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: KmsKeyId, location_name: "kmsKeyId"))
@@ -191,6 +191,11 @@ module Aws::Bedrock
191
191
  # The sensitive information policy to configure for the guardrail.
192
192
  # @return [Types::GuardrailSensitiveInformationPolicyConfig]
193
193
  #
194
+ # @!attribute [rw] contextual_grounding_policy_config
195
+ # The contextual grounding policy configuration used to create a
196
+ # guardrail.
197
+ # @return [Types::GuardrailContextualGroundingPolicyConfig]
198
+ #
194
199
  # @!attribute [rw] blocked_input_messaging
195
200
  # The message to return when the guardrail blocks a prompt.
196
201
  # @return [String]
@@ -231,6 +236,7 @@ module Aws::Bedrock
231
236
  :content_policy_config,
232
237
  :word_policy_config,
233
238
  :sensitive_information_policy_config,
239
+ :contextual_grounding_policy_config,
234
240
  :blocked_input_messaging,
235
241
  :blocked_outputs_messaging,
236
242
  :kms_key_id,
@@ -245,12 +251,12 @@ module Aws::Bedrock
245
251
  # @return [String]
246
252
  #
247
253
  # @!attribute [rw] guardrail_arn
248
- # The ARN of the guardrail that was created.
254
+ # The ARN of the guardrail.
249
255
  # @return [String]
250
256
  #
251
257
  # @!attribute [rw] version
252
- # The version of the guardrail that was created. This value should be
253
- # 1.
258
+ # The version of the guardrail that was created. This value will
259
+ # always be `DRAFT`.
254
260
  # @return [String]
255
261
  #
256
262
  # @!attribute [rw] created_at
@@ -269,7 +275,8 @@ module Aws::Bedrock
269
275
  end
270
276
 
271
277
  # @!attribute [rw] guardrail_identifier
272
- # The unique identifier of the guardrail.
278
+ # The unique identifier of the guardrail. This can be an ID or the
279
+ # ARN.
273
280
  # @return [String]
274
281
  #
275
282
  # @!attribute [rw] description
@@ -586,7 +593,8 @@ module Aws::Bedrock
586
593
  class DeleteCustomModelResponse < Aws::EmptyStructure; end
587
594
 
588
595
  # @!attribute [rw] guardrail_identifier
589
- # The unique identifier of the guardrail.
596
+ # The unique identifier of the guardrail. This can be an ID or the
597
+ # ARN.
590
598
  # @return [String]
591
599
  #
592
600
  # @!attribute [rw] guardrail_version
@@ -1231,6 +1239,7 @@ module Aws::Bedrock
1231
1239
 
1232
1240
  # @!attribute [rw] guardrail_identifier
1233
1241
  # The unique identifier of the guardrail for which to get details.
1242
+ # This can be an ID or the ARN.
1234
1243
  # @return [String]
1235
1244
  #
1236
1245
  # @!attribute [rw] guardrail_version
@@ -1261,7 +1270,7 @@ module Aws::Bedrock
1261
1270
  # @return [String]
1262
1271
  #
1263
1272
  # @!attribute [rw] guardrail_arn
1264
- # The ARN of the guardrail that was created.
1273
+ # The ARN of the guardrail.
1265
1274
  # @return [String]
1266
1275
  #
1267
1276
  # @!attribute [rw] version
@@ -1289,6 +1298,10 @@ module Aws::Bedrock
1289
1298
  # guardrail.
1290
1299
  # @return [Types::GuardrailSensitiveInformationPolicy]
1291
1300
  #
1301
+ # @!attribute [rw] contextual_grounding_policy
1302
+ # The contextual grounding policy used in the guardrail.
1303
+ # @return [Types::GuardrailContextualGroundingPolicy]
1304
+ #
1292
1305
  # @!attribute [rw] created_at
1293
1306
  # The date and time at which the guardrail was created.
1294
1307
  # @return [Time]
@@ -1333,6 +1346,7 @@ module Aws::Bedrock
1333
1346
  :content_policy,
1334
1347
  :word_policy,
1335
1348
  :sensitive_information_policy,
1349
+ :contextual_grounding_policy,
1336
1350
  :created_at,
1337
1351
  :updated_at,
1338
1352
  :status_reasons,
@@ -1700,17 +1714,9 @@ module Aws::Bedrock
1700
1714
  #
1701
1715
  # For more information, see [Guardrails content filters][1].
1702
1716
  #
1703
- # This data type is used in the following API operations:
1704
- #
1705
- # * [CreateGuardrail request body][2]
1706
- #
1707
- # * [UpdateGuardrail request body][3]
1708
- #
1709
1717
  #
1710
1718
  #
1711
1719
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-filters.html
1712
- # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateGuardrail.html#API_CreateGuardrail_RequestSyntax
1713
- # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_UpdateGuardrail.html#API_UpdateGuardrail_RequestSyntax
1714
1720
  #
1715
1721
  # @!attribute [rw] type
1716
1722
  # The harmful category that the content filter is applied to.
@@ -1767,32 +1773,93 @@ module Aws::Bedrock
1767
1773
 
1768
1774
  # Contains details about how to handle harmful content.
1769
1775
  #
1770
- # This data type is used in the following API operations:
1776
+ # @!attribute [rw] filters_config
1777
+ # Contains the type of the content filter and how strongly it should
1778
+ # apply to prompts and model responses.
1779
+ # @return [Array<Types::GuardrailContentFilterConfig>]
1780
+ #
1781
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailContentPolicyConfig AWS API Documentation
1782
+ #
1783
+ class GuardrailContentPolicyConfig < Struct.new(
1784
+ :filters_config)
1785
+ SENSITIVE = []
1786
+ include Aws::Structure
1787
+ end
1788
+
1789
+ # The details for the guardrails contextual grounding filter.
1790
+ #
1791
+ # @!attribute [rw] type
1792
+ # The filter type details for the guardrails contextual grounding
1793
+ # filter.
1794
+ # @return [String]
1795
+ #
1796
+ # @!attribute [rw] threshold
1797
+ # The threshold details for the guardrails contextual grounding
1798
+ # filter.
1799
+ # @return [Float]
1800
+ #
1801
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailContextualGroundingFilter AWS API Documentation
1802
+ #
1803
+ class GuardrailContextualGroundingFilter < Struct.new(
1804
+ :type,
1805
+ :threshold)
1806
+ SENSITIVE = []
1807
+ include Aws::Structure
1808
+ end
1809
+
1810
+ # The filter configuration details for the guardrails contextual
1811
+ # grounding filter.
1812
+ #
1813
+ # @!attribute [rw] type
1814
+ # The filter details for the guardrails contextual grounding filter.
1815
+ # @return [String]
1816
+ #
1817
+ # @!attribute [rw] threshold
1818
+ # The threshold details for the guardrails contextual grounding
1819
+ # filter.
1820
+ # @return [Float]
1771
1821
  #
1772
- # * [CreateGuardrail request body][1]
1822
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailContextualGroundingFilterConfig AWS API Documentation
1773
1823
  #
1774
- # * [UpdateGuardrail request body][2]
1824
+ class GuardrailContextualGroundingFilterConfig < Struct.new(
1825
+ :type,
1826
+ :threshold)
1827
+ SENSITIVE = []
1828
+ include Aws::Structure
1829
+ end
1830
+
1831
+ # The details for the guardrails contextual grounding policy.
1775
1832
  #
1833
+ # @!attribute [rw] filters
1834
+ # The filter details for the guardrails contextual grounding policy.
1835
+ # @return [Array<Types::GuardrailContextualGroundingFilter>]
1776
1836
  #
1837
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailContextualGroundingPolicy AWS API Documentation
1777
1838
  #
1778
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateGuardrail.html#API_CreateGuardrail_RequestSyntax
1779
- # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_UpdateGuardrail.html#API_UpdateGuardrail_RequestSyntax
1839
+ class GuardrailContextualGroundingPolicy < Struct.new(
1840
+ :filters)
1841
+ SENSITIVE = []
1842
+ include Aws::Structure
1843
+ end
1844
+
1845
+ # The policy configuration details for the guardrails contextual
1846
+ # grounding policy.
1780
1847
  #
1781
1848
  # @!attribute [rw] filters_config
1782
- # Contains the type of the content filter and how strongly it should
1783
- # apply to prompts and model responses.
1784
- # @return [Array<Types::GuardrailContentFilterConfig>]
1849
+ # The filter configuration details for the guardrails contextual
1850
+ # grounding policy.
1851
+ # @return [Array<Types::GuardrailContextualGroundingFilterConfig>]
1785
1852
  #
1786
- # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailContentPolicyConfig AWS API Documentation
1853
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailContextualGroundingPolicyConfig AWS API Documentation
1787
1854
  #
1788
- class GuardrailContentPolicyConfig < Struct.new(
1855
+ class GuardrailContextualGroundingPolicyConfig < Struct.new(
1789
1856
  :filters_config)
1790
1857
  SENSITIVE = []
1791
1858
  include Aws::Structure
1792
1859
  end
1793
1860
 
1794
1861
  # The managed word list that was configured for the guardrail. (This is
1795
- # a list of words that are pre-defined and managed by Guardrails only.)
1862
+ # a list of words that are pre-defined and managed by guardrails only.)
1796
1863
  #
1797
1864
  # @!attribute [rw] type
1798
1865
  # ManagedWords$type The managed word type that was configured for the
@@ -1844,6 +1911,231 @@ module Aws::Bedrock
1844
1911
  #
1845
1912
  # @!attribute [rw] type
1846
1913
  # Configure guardrail type when the PII entity is detected.
1914
+ #
1915
+ # The following PIIs are used to block or mask sensitive information:
1916
+ #
1917
+ # * **General**
1918
+ #
1919
+ # * **ADDRESS**
1920
+ #
1921
+ # A physical address, such as "100 Main Street, Anytown, USA" or
1922
+ # "Suite #12, Building 123". An address can include information
1923
+ # such as the street, building, location, city, state, country,
1924
+ # county, zip code, precinct, and neighborhood.
1925
+ #
1926
+ # * **AGE**
1927
+ #
1928
+ # An individual's age, including the quantity and unit of time.
1929
+ # For example, in the phrase "I am 40 years old," Guarrails
1930
+ # recognizes "40 years" as an age.
1931
+ #
1932
+ # * **NAME**
1933
+ #
1934
+ # An individual's name. This entity type does not include titles,
1935
+ # such as Dr., Mr., Mrs., or Miss. guardrails doesn't apply this
1936
+ # entity type to names that are part of organizations or
1937
+ # addresses. For example, guardrails recognizes the "John Doe
1938
+ # Organization" as an organization, and it recognizes "Jane Doe
1939
+ # Street" as an address.
1940
+ #
1941
+ # * **EMAIL**
1942
+ #
1943
+ # An email address, such as *marymajor@email.com*.
1944
+ #
1945
+ # * **PHONE**
1946
+ #
1947
+ # A phone number. This entity type also includes fax and pager
1948
+ # numbers.
1949
+ #
1950
+ # * **USERNAME**
1951
+ #
1952
+ # A user name that identifies an account, such as a login name,
1953
+ # screen name, nick name, or handle.
1954
+ #
1955
+ # * **PASSWORD**
1956
+ #
1957
+ # An alphanumeric string that is used as a password, such as
1958
+ # "**very20special#pass**".
1959
+ #
1960
+ # * **DRIVER\_ID**
1961
+ #
1962
+ # The number assigned to a driver's license, which is an official
1963
+ # document permitting an individual to operate one or more
1964
+ # motorized vehicles on a public road. A driver's license number
1965
+ # consists of alphanumeric characters.
1966
+ #
1967
+ # * **LICENSE\_PLATE**
1968
+ #
1969
+ # A license plate for a vehicle is issued by the state or country
1970
+ # where the vehicle is registered. The format for passenger
1971
+ # vehicles is typically five to eight digits, consisting of
1972
+ # upper-case letters and numbers. The format varies depending on
1973
+ # the location of the issuing state or country.
1974
+ #
1975
+ # * **VEHICLE\_IDENTIFICATION\_NUMBER**
1976
+ #
1977
+ # A Vehicle Identification Number (VIN) uniquely identifies a
1978
+ # vehicle. VIN content and format are defined in the *ISO 3779*
1979
+ # specification. Each country has specific codes and formats for
1980
+ # VINs.
1981
+ #
1982
+ # * **Finance**
1983
+ #
1984
+ # * **REDIT\_DEBIT\_CARD\_CVV**
1985
+ #
1986
+ # A three-digit card verification code (CVV) that is present on
1987
+ # VISA, MasterCard, and Discover credit and debit cards. For
1988
+ # American Express credit or debit cards, the CVV is a four-digit
1989
+ # numeric code.
1990
+ #
1991
+ # * **CREDIT\_DEBIT\_CARD\_EXPIRY**
1992
+ #
1993
+ # The expiration date for a credit or debit card. This number is
1994
+ # usually four digits long and is often formatted as *month/year*
1995
+ # or *MM/YY*. Guardrails recognizes expiration dates such as
1996
+ # *01/21*, *01/2021*, and *Jan 2021*.
1997
+ #
1998
+ # * **CREDIT\_DEBIT\_CARD\_NUMBER**
1999
+ #
2000
+ # The number for a credit or debit card. These numbers can vary
2001
+ # from 13 to 16 digits in length. However, Amazon Comprehend also
2002
+ # recognizes credit or debit card numbers when only the last four
2003
+ # digits are present.
2004
+ #
2005
+ # * **PIN**
2006
+ #
2007
+ # A four-digit personal identification number (PIN) with which you
2008
+ # can access your bank account.
2009
+ #
2010
+ # * **INTERNATIONAL\_BANK\_ACCOUNT\_NUMBER**
2011
+ #
2012
+ # An International Bank Account Number has specific formats in
2013
+ # each country. For more information, see
2014
+ # [www.iban.com/structure][1].
2015
+ #
2016
+ # * **SWIFT\_CODE**
2017
+ #
2018
+ # A SWIFT code is a standard format of Bank Identifier Code (BIC)
2019
+ # used to specify a particular bank or branch. Banks use these
2020
+ # codes for money transfers such as international wire transfers.
2021
+ #
2022
+ # SWIFT codes consist of eight or 11 characters. The 11-digit
2023
+ # codes refer to specific branches, while eight-digit codes (or
2024
+ # 11-digit codes ending in 'XXX') refer to the head or primary
2025
+ # office.
2026
+ #
2027
+ # * **IT**
2028
+ #
2029
+ # * **IP\_ADDRESS**
2030
+ #
2031
+ # An IPv4 address, such as *198.51.100.0*.
2032
+ #
2033
+ # * **MAC\_ADDRESS**
2034
+ #
2035
+ # A *media access control* (MAC) address is a unique identifier
2036
+ # assigned to a network interface controller (NIC).
2037
+ #
2038
+ # * **URL**
2039
+ #
2040
+ # A web address, such as *www.example.com*.
2041
+ #
2042
+ # * **AWS\_ACCESS\_KEY**
2043
+ #
2044
+ # A unique identifier that's associated with a secret access key;
2045
+ # you use the access key ID and secret access key to sign
2046
+ # programmatic Amazon Web Services requests cryptographically.
2047
+ #
2048
+ # * **AWS\_SECRET\_KEY**
2049
+ #
2050
+ # A unique identifier that's associated with an access key. You
2051
+ # use the access key ID and secret access key to sign programmatic
2052
+ # Amazon Web Services requests cryptographically.
2053
+ #
2054
+ # * **USA specific**
2055
+ #
2056
+ # * **US\_BANK\_ACCOUNT\_NUMBER**
2057
+ #
2058
+ # A US bank account number, which is typically 10 to 12 digits
2059
+ # long.
2060
+ #
2061
+ # * **US\_BANK\_ROUTING\_NUMBER**
2062
+ #
2063
+ # A US bank account routing number. These are typically nine
2064
+ # digits long,
2065
+ #
2066
+ # * **US\_INDIVIDUAL\_TAX\_IDENTIFICATION\_NUMBER**
2067
+ #
2068
+ # A US Individual Taxpayer Identification Number (ITIN) is a
2069
+ # nine-digit number that starts with a "9" and contain a "7"
2070
+ # or "8" as the fourth digit. An ITIN can be formatted with a
2071
+ # space or a dash after the third and forth digits.
2072
+ #
2073
+ # * **US\_PASSPORT\_NUMBER**
2074
+ #
2075
+ # A US passport number. Passport numbers range from six to nine
2076
+ # alphanumeric characters.
2077
+ #
2078
+ # * **US\_SOCIAL\_SECURITY\_NUMBER**
2079
+ #
2080
+ # A US Social Security Number (SSN) is a nine-digit number that is
2081
+ # issued to US citizens, permanent residents, and temporary
2082
+ # working residents.
2083
+ #
2084
+ # * **Canada specific**
2085
+ #
2086
+ # * **CA\_HEALTH\_NUMBER**
2087
+ #
2088
+ # A Canadian Health Service Number is a 10-digit unique
2089
+ # identifier, required for individuals to access healthcare
2090
+ # benefits.
2091
+ #
2092
+ # * **CA\_SOCIAL\_INSURANCE\_NUMBER**
2093
+ #
2094
+ # A Canadian Social Insurance Number (SIN) is a nine-digit unique
2095
+ # identifier, required for individuals to access government
2096
+ # programs and benefits.
2097
+ #
2098
+ # The SIN is formatted as three groups of three digits, such as
2099
+ # *123-456-789*. A SIN can be validated through a simple
2100
+ # check-digit process called the [Luhn algorithm][2].
2101
+ #
2102
+ # * **UK Specific**
2103
+ #
2104
+ # * **UK\_NATIONAL\_HEALTH\_SERVICE\_NUMBER**
2105
+ #
2106
+ # A UK National Health Service Number is a 10-17 digit number,
2107
+ # such as *485 777 3456*. The current system formats the 10-digit
2108
+ # number with spaces after the third and sixth digits. The final
2109
+ # digit is an error-detecting checksum.
2110
+ #
2111
+ # * **UK\_NATIONAL\_INSURANCE\_NUMBER**
2112
+ #
2113
+ # A UK National Insurance Number (NINO) provides individuals with
2114
+ # access to National Insurance (social security) benefits. It is
2115
+ # also used for some purposes in the UK tax system.
2116
+ #
2117
+ # The number is nine digits long and starts with two letters,
2118
+ # followed by six numbers and one letter. A NINO can be formatted
2119
+ # with a space or a dash after the two letters and after the
2120
+ # second, forth, and sixth digits.
2121
+ #
2122
+ # * **UK\_UNIQUE\_TAXPAYER\_REFERENCE\_NUMBER**
2123
+ #
2124
+ # A UK Unique Taxpayer Reference (UTR) is a 10-digit number that
2125
+ # identifies a taxpayer or a business.
2126
+ #
2127
+ # * **Custom**
2128
+ #
2129
+ # * **Regex filter** - You can use a regular expressions to define
2130
+ # patterns for a guardrail to recognize and act upon such as
2131
+ # serial number, booking ID etc..
2132
+ #
2133
+ # ^
2134
+ #
2135
+ #
2136
+ #
2137
+ # [1]: https://www.iban.com/structure
2138
+ # [2]: https://www.wikipedia.org/wiki/Luhn_algorithm
1847
2139
  # @return [String]
1848
2140
  #
1849
2141
  # @!attribute [rw] action
@@ -2060,17 +2352,6 @@ module Aws::Bedrock
2060
2352
 
2061
2353
  # Details about topics for the guardrail to identify and deny.
2062
2354
  #
2063
- # This data type is used in the following API operations:
2064
- #
2065
- # * [CreateGuardrail request body][1]
2066
- #
2067
- # * [UpdateGuardrail request body][2]
2068
- #
2069
- #
2070
- #
2071
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateGuardrail.html#API_CreateGuardrail_RequestSyntax
2072
- # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_UpdateGuardrail.html#API_UpdateGuardrail_RequestSyntax
2073
- #
2074
2355
  # @!attribute [rw] name
2075
2356
  # The name of the topic to deny.
2076
2357
  # @return [String]
@@ -2127,17 +2408,6 @@ module Aws::Bedrock
2127
2408
  # Contains details about topics that the guardrail should identify and
2128
2409
  # deny.
2129
2410
  #
2130
- # This data type is used in the following API operations:
2131
- #
2132
- # * [CreateGuardrail request body][1]
2133
- #
2134
- # * [UpdateGuardrail request body][2]
2135
- #
2136
- #
2137
- #
2138
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateGuardrail.html#API_CreateGuardrail_RequestSyntax
2139
- # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_UpdateGuardrail.html#API_UpdateGuardrail_RequestSyntax
2140
- #
2141
2411
  # @!attribute [rw] topics_config
2142
2412
  # A list of policies related to topics that the guardrail should deny.
2143
2413
  # @return [Array<Types::GuardrailTopicConfig>]
@@ -2519,7 +2789,8 @@ module Aws::Bedrock
2519
2789
  end
2520
2790
 
2521
2791
  # @!attribute [rw] guardrail_identifier
2522
- # The unique identifier of the guardrail.
2792
+ # The unique identifier of the guardrail. This can be an ID or the
2793
+ # ARN.
2523
2794
  # @return [String]
2524
2795
  #
2525
2796
  # @!attribute [rw] max_results
@@ -3154,7 +3425,8 @@ module Aws::Bedrock
3154
3425
  class UntagResourceResponse < Aws::EmptyStructure; end
3155
3426
 
3156
3427
  # @!attribute [rw] guardrail_identifier
3157
- # The unique identifier of the guardrail
3428
+ # The unique identifier of the guardrail. This can be an ID or the
3429
+ # ARN.
3158
3430
  # @return [String]
3159
3431
  #
3160
3432
  # @!attribute [rw] name
@@ -3181,6 +3453,11 @@ module Aws::Bedrock
3181
3453
  # The sensitive information policy to configure for the guardrail.
3182
3454
  # @return [Types::GuardrailSensitiveInformationPolicyConfig]
3183
3455
  #
3456
+ # @!attribute [rw] contextual_grounding_policy_config
3457
+ # The contextual grounding policy configuration used to update a
3458
+ # guardrail.
3459
+ # @return [Types::GuardrailContextualGroundingPolicyConfig]
3460
+ #
3184
3461
  # @!attribute [rw] blocked_input_messaging
3185
3462
  # The message to return when the guardrail blocks a prompt.
3186
3463
  # @return [String]
@@ -3203,6 +3480,7 @@ module Aws::Bedrock
3203
3480
  :content_policy_config,
3204
3481
  :word_policy_config,
3205
3482
  :sensitive_information_policy_config,
3483
+ :contextual_grounding_policy_config,
3206
3484
  :blocked_input_messaging,
3207
3485
  :blocked_outputs_messaging,
3208
3486
  :kms_key_id)
@@ -3215,7 +3493,7 @@ module Aws::Bedrock
3215
3493
  # @return [String]
3216
3494
  #
3217
3495
  # @!attribute [rw] guardrail_arn
3218
- # The ARN of the guardrail that was created.
3496
+ # The ARN of the guardrail.
3219
3497
  # @return [String]
3220
3498
  #
3221
3499
  # @!attribute [rw] version
@@ -53,6 +53,6 @@ require_relative 'aws-sdk-bedrock/customizations'
53
53
  # @!group service
54
54
  module Aws::Bedrock
55
55
 
56
- GEM_VERSION = '1.11.0'
56
+ GEM_VERSION = '1.12.0'
57
57
 
58
58
  end
data/sig/client.rbs CHANGED
@@ -205,6 +205,14 @@ module Aws
205
205
  },
206
206
  ]?
207
207
  },
208
+ ?contextual_grounding_policy_config: {
209
+ filters_config: Array[
210
+ {
211
+ type: ("GROUNDING" | "RELEVANCE"),
212
+ threshold: ::Float
213
+ },
214
+ ]
215
+ },
208
216
  blocked_input_messaging: ::String,
209
217
  blocked_outputs_messaging: ::String,
210
218
  ?kms_key_id: ::String,
@@ -400,6 +408,7 @@ module Aws
400
408
  def content_policy: () -> Types::GuardrailContentPolicy
401
409
  def word_policy: () -> Types::GuardrailWordPolicy
402
410
  def sensitive_information_policy: () -> Types::GuardrailSensitiveInformationPolicy
411
+ def contextual_grounding_policy: () -> Types::GuardrailContextualGroundingPolicy
403
412
  def created_at: () -> ::Time
404
413
  def updated_at: () -> ::Time
405
414
  def status_reasons: () -> ::Array[::String]
@@ -713,6 +722,14 @@ module Aws
713
722
  },
714
723
  ]?
715
724
  },
725
+ ?contextual_grounding_policy_config: {
726
+ filters_config: Array[
727
+ {
728
+ type: ("GROUNDING" | "RELEVANCE"),
729
+ threshold: ::Float
730
+ },
731
+ ]
732
+ },
716
733
  blocked_input_messaging: ::String,
717
734
  blocked_outputs_messaging: ::String,
718
735
  ?kms_key_id: ::String
data/sig/types.rbs CHANGED
@@ -55,6 +55,7 @@ module Aws::Bedrock
55
55
  attr_accessor content_policy_config: Types::GuardrailContentPolicyConfig
56
56
  attr_accessor word_policy_config: Types::GuardrailWordPolicyConfig
57
57
  attr_accessor sensitive_information_policy_config: Types::GuardrailSensitiveInformationPolicyConfig
58
+ attr_accessor contextual_grounding_policy_config: Types::GuardrailContextualGroundingPolicyConfig
58
59
  attr_accessor blocked_input_messaging: ::String
59
60
  attr_accessor blocked_outputs_messaging: ::String
60
61
  attr_accessor kms_key_id: ::String
@@ -350,6 +351,7 @@ module Aws::Bedrock
350
351
  attr_accessor content_policy: Types::GuardrailContentPolicy
351
352
  attr_accessor word_policy: Types::GuardrailWordPolicy
352
353
  attr_accessor sensitive_information_policy: Types::GuardrailSensitiveInformationPolicy
354
+ attr_accessor contextual_grounding_policy: Types::GuardrailContextualGroundingPolicy
353
355
  attr_accessor created_at: ::Time
354
356
  attr_accessor updated_at: ::Time
355
357
  attr_accessor status_reasons: ::Array[::String]
@@ -444,6 +446,28 @@ module Aws::Bedrock
444
446
  SENSITIVE: []
445
447
  end
446
448
 
449
+ class GuardrailContextualGroundingFilter
450
+ attr_accessor type: ("GROUNDING" | "RELEVANCE")
451
+ attr_accessor threshold: ::Float
452
+ SENSITIVE: []
453
+ end
454
+
455
+ class GuardrailContextualGroundingFilterConfig
456
+ attr_accessor type: ("GROUNDING" | "RELEVANCE")
457
+ attr_accessor threshold: ::Float
458
+ SENSITIVE: []
459
+ end
460
+
461
+ class GuardrailContextualGroundingPolicy
462
+ attr_accessor filters: ::Array[Types::GuardrailContextualGroundingFilter]
463
+ SENSITIVE: []
464
+ end
465
+
466
+ class GuardrailContextualGroundingPolicyConfig
467
+ attr_accessor filters_config: ::Array[Types::GuardrailContextualGroundingFilterConfig]
468
+ SENSITIVE: []
469
+ end
470
+
447
471
  class GuardrailManagedWords
448
472
  attr_accessor type: ("PROFANITY")
449
473
  SENSITIVE: []
@@ -826,6 +850,7 @@ module Aws::Bedrock
826
850
  attr_accessor content_policy_config: Types::GuardrailContentPolicyConfig
827
851
  attr_accessor word_policy_config: Types::GuardrailWordPolicyConfig
828
852
  attr_accessor sensitive_information_policy_config: Types::GuardrailSensitiveInformationPolicyConfig
853
+ attr_accessor contextual_grounding_policy_config: Types::GuardrailContextualGroundingPolicyConfig
829
854
  attr_accessor blocked_input_messaging: ::String
830
855
  attr_accessor blocked_outputs_messaging: ::String
831
856
  attr_accessor kms_key_id: ::String
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-bedrock
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0
4
+ version: 1.12.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-07-02 00:00:00.000000000 Z
11
+ date: 2024-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core