aws-sdk-bedrock 1.40.0 → 1.42.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.
@@ -39,15 +39,76 @@ module Aws::Bedrock
39
39
  # This model computes all evaluation related metrics.
40
40
  # @return [Types::EvaluatorModelConfig]
41
41
  #
42
+ # @!attribute [rw] custom_metric_config
43
+ # Defines the configuration of custom metrics to be used in an
44
+ # evaluation job.
45
+ # @return [Types::AutomatedEvaluationCustomMetricConfig]
46
+ #
42
47
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/AutomatedEvaluationConfig AWS API Documentation
43
48
  #
44
49
  class AutomatedEvaluationConfig < Struct.new(
45
50
  :dataset_metric_configs,
51
+ :evaluator_model_config,
52
+ :custom_metric_config)
53
+ SENSITIVE = []
54
+ include Aws::Structure
55
+ end
56
+
57
+ # Defines the configuration of custom metrics to be used in an
58
+ # evaluation job. To learn more about using custom metrics in Amazon
59
+ # Bedrock evaluation jobs, see [Create a prompt for a custom metrics
60
+ # (LLM-as-a-judge model evaluations)][1] and [Create a prompt for a
61
+ # custom metrics (RAG evaluations)][2].
62
+ #
63
+ #
64
+ #
65
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-custom-metrics-prompt-formats.html
66
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-evaluation-custom-metrics-prompt-formats.html
67
+ #
68
+ # @!attribute [rw] custom_metrics
69
+ # Defines a list of custom metrics to be used in an Amazon Bedrock
70
+ # evaluation job.
71
+ # @return [Array<Types::AutomatedEvaluationCustomMetricSource>]
72
+ #
73
+ # @!attribute [rw] evaluator_model_config
74
+ # Configuration of the evaluator model you want to use to evaluate
75
+ # custom metrics in an Amazon Bedrock evaluation job.
76
+ # @return [Types::CustomMetricEvaluatorModelConfig]
77
+ #
78
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/AutomatedEvaluationCustomMetricConfig AWS API Documentation
79
+ #
80
+ class AutomatedEvaluationCustomMetricConfig < Struct.new(
81
+ :custom_metrics,
46
82
  :evaluator_model_config)
47
83
  SENSITIVE = []
48
84
  include Aws::Structure
49
85
  end
50
86
 
87
+ # An array item definining a single custom metric for use in an Amazon
88
+ # Bedrock evaluation job.
89
+ #
90
+ # @note AutomatedEvaluationCustomMetricSource is a union - when making an API calls you must set exactly one of the members.
91
+ #
92
+ # @note AutomatedEvaluationCustomMetricSource is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of AutomatedEvaluationCustomMetricSource corresponding to the set member.
93
+ #
94
+ # @!attribute [rw] custom_metric_definition
95
+ # The definition of a custom metric for use in an Amazon Bedrock
96
+ # evaluation job.
97
+ # @return [Types::CustomMetricDefinition]
98
+ #
99
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/AutomatedEvaluationCustomMetricSource AWS API Documentation
100
+ #
101
+ class AutomatedEvaluationCustomMetricSource < Struct.new(
102
+ :custom_metric_definition,
103
+ :unknown)
104
+ SENSITIVE = [:custom_metric_definition]
105
+ include Aws::Structure
106
+ include Aws::Structure::Union
107
+
108
+ class CustomMetricDefinition < AutomatedEvaluationCustomMetricSource; end
109
+ class Unknown < AutomatedEvaluationCustomMetricSource; end
110
+ end
111
+
51
112
  # A JSON array that provides the status of the evaluation jobs being
52
113
  # deleted.
53
114
  #
@@ -1101,6 +1162,95 @@ module Aws::Bedrock
1101
1162
  include Aws::Structure
1102
1163
  end
1103
1164
 
1165
+ # Defines the model you want to evaluate custom metrics in an Amazon
1166
+ # Bedrock evaluation job.
1167
+ #
1168
+ # @!attribute [rw] model_identifier
1169
+ # The Amazon Resource Name (ARN) of the evaluator model for custom
1170
+ # metrics. For a list of supported evaluator models, see [Evaluate
1171
+ # model performance using another LLM as a judge][1] and [Evaluate the
1172
+ # performance of RAG sources using Amazon Bedrock evaluations][2].
1173
+ #
1174
+ #
1175
+ #
1176
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/evaluation-judge.html
1177
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/evaluation-kb.html
1178
+ # @return [String]
1179
+ #
1180
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CustomMetricBedrockEvaluatorModel AWS API Documentation
1181
+ #
1182
+ class CustomMetricBedrockEvaluatorModel < Struct.new(
1183
+ :model_identifier)
1184
+ SENSITIVE = []
1185
+ include Aws::Structure
1186
+ end
1187
+
1188
+ # The definition of a custom metric for use in an Amazon Bedrock
1189
+ # evaluation job. A custom metric definition includes a metric name,
1190
+ # prompt (instructions) and optionally, a rating scale. Your prompt must
1191
+ # include a task description and input variables. The required input
1192
+ # variables are different for model-as-a-judge and RAG evaluations.
1193
+ #
1194
+ # For more information about how to define a custom metric in Amazon
1195
+ # Bedrock, see [Create a prompt for a custom metrics (LLM-as-a-judge
1196
+ # model evaluations)][1] and [Create a prompt for a custom metrics (RAG
1197
+ # evaluations)][2].
1198
+ #
1199
+ #
1200
+ #
1201
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-custom-metrics-prompt-formats.html
1202
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-evaluation-custom-metrics-prompt-formats.html
1203
+ #
1204
+ # @!attribute [rw] name
1205
+ # The name for a custom metric. Names must be unique in your Amazon
1206
+ # Web Services region.
1207
+ # @return [String]
1208
+ #
1209
+ # @!attribute [rw] instructions
1210
+ # The prompt for a custom metric that instructs the evaluator model
1211
+ # how to rate the model or RAG source under evaluation.
1212
+ # @return [String]
1213
+ #
1214
+ # @!attribute [rw] rating_scale
1215
+ # Defines the rating scale to be used for a custom metric. We
1216
+ # recommend that you always define a ratings scale when creating a
1217
+ # custom metric. If you don't define a scale, Amazon Bedrock won't
1218
+ # be able to visually display the results of the evaluation in the
1219
+ # console or calculate average values of numerical scores. For more
1220
+ # information on specifying a rating scale, see [Specifying an output
1221
+ # schema (rating scale)][1].
1222
+ #
1223
+ #
1224
+ #
1225
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-custom-metrics-prompt-formats.html#model-evaluation-custom-metrics-prompt-formats-schema
1226
+ # @return [Array<Types::RatingScaleItem>]
1227
+ #
1228
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CustomMetricDefinition AWS API Documentation
1229
+ #
1230
+ class CustomMetricDefinition < Struct.new(
1231
+ :name,
1232
+ :instructions,
1233
+ :rating_scale)
1234
+ SENSITIVE = [:name]
1235
+ include Aws::Structure
1236
+ end
1237
+
1238
+ # Configuration of the evaluator model you want to use to evaluate
1239
+ # custom metrics in an Amazon Bedrock evaluation job.
1240
+ #
1241
+ # @!attribute [rw] bedrock_evaluator_models
1242
+ # Defines the model you want to evaluate custom metrics in an Amazon
1243
+ # Bedrock evaluation job.
1244
+ # @return [Array<Types::CustomMetricBedrockEvaluatorModel>]
1245
+ #
1246
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CustomMetricEvaluatorModelConfig AWS API Documentation
1247
+ #
1248
+ class CustomMetricEvaluatorModelConfig < Struct.new(
1249
+ :bedrock_evaluator_models)
1250
+ SENSITIVE = []
1251
+ include Aws::Structure
1252
+ end
1253
+
1104
1254
  # Summary information for a custom model.
1105
1255
  #
1106
1256
  # @!attribute [rw] model_arn
@@ -1526,7 +1676,7 @@ module Aws::Bedrock
1526
1676
  #
1527
1677
  # For knowledge base evaluation jobs that evaluate retrieval only,
1528
1678
  # valid values are "`Builtin.ContextRelevance`",
1529
- # "`Builtin.ContextConverage`".
1679
+ # "`Builtin.ContextCoverage`".
1530
1680
  #
1531
1681
  # For knowledge base evaluation jobs that evaluate retrieval with
1532
1682
  # response generation, valid values are "`Builtin.Correctness`",
@@ -1847,6 +1997,11 @@ module Aws::Bedrock
1847
1997
  # metrics for a knowledge base evaluation job.
1848
1998
  # @return [Array<String>]
1849
1999
  #
2000
+ # @!attribute [rw] custom_metrics_evaluator_model_identifiers
2001
+ # The Amazon Resource Names (ARNs) of the models used to compute
2002
+ # custom metrics in an Amazon Bedrock evaluation job.
2003
+ # @return [Array<String>]
2004
+ #
1850
2005
  # @!attribute [rw] inference_config_summary
1851
2006
  # Identifies the models, Knowledge Bases, or other RAG sources
1852
2007
  # evaluated in a model or Knowledge Base evaluation job.
@@ -1869,6 +2024,7 @@ module Aws::Bedrock
1869
2024
  :model_identifiers,
1870
2025
  :rag_identifiers,
1871
2026
  :evaluator_model_identifiers,
2027
+ :custom_metrics_evaluator_model_identifiers,
1872
2028
  :inference_config_summary,
1873
2029
  :application_type)
1874
2030
  SENSITIVE = []
@@ -3089,7 +3245,7 @@ module Aws::Bedrock
3089
3245
  #
3090
3246
  # * Failed – This job has failed. Check the failure message for any
3091
3247
  # further details. For further assistance, reach out to the [Amazon
3092
- # Web Services Support Center][3].
3248
+ # Web ServicesSupport Center][3].
3093
3249
  #
3094
3250
  # * Stopped – This job was stopped by a user.
3095
3251
  #
@@ -3441,6 +3597,38 @@ module Aws::Bedrock
3441
3597
  # The output modalities selected for the guardrail content filter.
3442
3598
  # @return [Array<String>]
3443
3599
  #
3600
+ # @!attribute [rw] input_action
3601
+ # The action to take when harmful content is detected in the input.
3602
+ # Supported values include:
3603
+ #
3604
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
3605
+ #
3606
+ # * `NONE` – Take no action but return detection information in the
3607
+ # trace response.
3608
+ # @return [String]
3609
+ #
3610
+ # @!attribute [rw] output_action
3611
+ # The action to take when harmful content is detected in the output.
3612
+ # Supported values include:
3613
+ #
3614
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
3615
+ #
3616
+ # * `NONE` – Take no action but return detection information in the
3617
+ # trace response.
3618
+ # @return [String]
3619
+ #
3620
+ # @!attribute [rw] input_enabled
3621
+ # Indicates whether guardrail evaluation is enabled on the input. When
3622
+ # disabled, you aren't charged for the evaluation. The evaluation
3623
+ # doesn't appear in the response.
3624
+ # @return [Boolean]
3625
+ #
3626
+ # @!attribute [rw] output_enabled
3627
+ # Indicates whether guardrail evaluation is enabled on the output.
3628
+ # When disabled, you aren't charged for the evaluation. The
3629
+ # evaluation doesn't appear in the response.
3630
+ # @return [Boolean]
3631
+ #
3444
3632
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailContentFilter AWS API Documentation
3445
3633
  #
3446
3634
  class GuardrailContentFilter < Struct.new(
@@ -3448,8 +3636,12 @@ module Aws::Bedrock
3448
3636
  :input_strength,
3449
3637
  :output_strength,
3450
3638
  :input_modalities,
3451
- :output_modalities)
3452
- SENSITIVE = [:input_modalities, :output_modalities]
3639
+ :output_modalities,
3640
+ :input_action,
3641
+ :output_action,
3642
+ :input_enabled,
3643
+ :output_enabled)
3644
+ SENSITIVE = [:input_modalities, :output_modalities, :input_action, :output_action]
3453
3645
  include Aws::Structure
3454
3646
  end
3455
3647
 
@@ -3520,6 +3712,38 @@ module Aws::Bedrock
3520
3712
  # configuration.
3521
3713
  # @return [Array<String>]
3522
3714
  #
3715
+ # @!attribute [rw] input_action
3716
+ # Specifies the action to take when harmful content is detected.
3717
+ # Supported values include:
3718
+ #
3719
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
3720
+ #
3721
+ # * `NONE` – Take no action but return detection information in the
3722
+ # trace response.
3723
+ # @return [String]
3724
+ #
3725
+ # @!attribute [rw] output_action
3726
+ # Specifies the action to take when harmful content is detected in the
3727
+ # output. Supported values include:
3728
+ #
3729
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
3730
+ #
3731
+ # * `NONE` – Take no action but return detection information in the
3732
+ # trace response.
3733
+ # @return [String]
3734
+ #
3735
+ # @!attribute [rw] input_enabled
3736
+ # Specifies whether to enable guardrail evaluation on the input. When
3737
+ # disabled, you aren't charged for the evaluation. The evaluation
3738
+ # doesn't appear in the response.
3739
+ # @return [Boolean]
3740
+ #
3741
+ # @!attribute [rw] output_enabled
3742
+ # Specifies whether to enable guardrail evaluation on the output. When
3743
+ # disabled, you aren't charged for the evaluation. The evaluation
3744
+ # doesn't appear in the response.
3745
+ # @return [Boolean]
3746
+ #
3523
3747
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailContentFilterConfig AWS API Documentation
3524
3748
  #
3525
3749
  class GuardrailContentFilterConfig < Struct.new(
@@ -3527,8 +3751,12 @@ module Aws::Bedrock
3527
3751
  :input_strength,
3528
3752
  :output_strength,
3529
3753
  :input_modalities,
3530
- :output_modalities)
3531
- SENSITIVE = [:input_modalities, :output_modalities]
3754
+ :output_modalities,
3755
+ :input_action,
3756
+ :output_action,
3757
+ :input_enabled,
3758
+ :output_enabled)
3759
+ SENSITIVE = [:input_modalities, :output_modalities, :input_action, :output_action]
3532
3760
  include Aws::Structure
3533
3761
  end
3534
3762
 
@@ -3584,12 +3812,30 @@ module Aws::Bedrock
3584
3812
  # filter.
3585
3813
  # @return [Float]
3586
3814
  #
3815
+ # @!attribute [rw] action
3816
+ # The action to take when content fails the contextual grounding
3817
+ # evaluation. Supported values include:
3818
+ #
3819
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
3820
+ #
3821
+ # * `NONE` – Take no action but return detection information in the
3822
+ # trace response.
3823
+ # @return [String]
3824
+ #
3825
+ # @!attribute [rw] enabled
3826
+ # Indicates whether contextual grounding is enabled for evaluation.
3827
+ # When disabled, you aren't charged for the evaluation. The
3828
+ # evaluation doesn't appear in the response.
3829
+ # @return [Boolean]
3830
+ #
3587
3831
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailContextualGroundingFilter AWS API Documentation
3588
3832
  #
3589
3833
  class GuardrailContextualGroundingFilter < Struct.new(
3590
3834
  :type,
3591
- :threshold)
3592
- SENSITIVE = []
3835
+ :threshold,
3836
+ :action,
3837
+ :enabled)
3838
+ SENSITIVE = [:action]
3593
3839
  include Aws::Structure
3594
3840
  end
3595
3841
 
@@ -3605,12 +3851,30 @@ module Aws::Bedrock
3605
3851
  # filter.
3606
3852
  # @return [Float]
3607
3853
  #
3854
+ # @!attribute [rw] action
3855
+ # Specifies the action to take when content fails the contextual
3856
+ # grounding evaluation. Supported values include:
3857
+ #
3858
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
3859
+ #
3860
+ # * `NONE` – Take no action but return detection information in the
3861
+ # trace response.
3862
+ # @return [String]
3863
+ #
3864
+ # @!attribute [rw] enabled
3865
+ # Specifies whether to enable contextual grounding evaluation. When
3866
+ # disabled, you aren't charged for the evaluation. The evaluation
3867
+ # doesn't appear in the response.
3868
+ # @return [Boolean]
3869
+ #
3608
3870
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailContextualGroundingFilterConfig AWS API Documentation
3609
3871
  #
3610
3872
  class GuardrailContextualGroundingFilterConfig < Struct.new(
3611
3873
  :type,
3612
- :threshold)
3613
- SENSITIVE = []
3874
+ :threshold,
3875
+ :action,
3876
+ :enabled)
3877
+ SENSITIVE = [:action]
3614
3878
  include Aws::Structure
3615
3879
  end
3616
3880
 
@@ -3652,11 +3916,47 @@ module Aws::Bedrock
3652
3916
  # guardrail. (For now, we only offer profanity word list)
3653
3917
  # @return [String]
3654
3918
  #
3919
+ # @!attribute [rw] input_action
3920
+ # The action to take when harmful content is detected in the input.
3921
+ # Supported values include:
3922
+ #
3923
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
3924
+ #
3925
+ # * `NONE` – Take no action but return detection information in the
3926
+ # trace response.
3927
+ # @return [String]
3928
+ #
3929
+ # @!attribute [rw] output_action
3930
+ # The action to take when harmful content is detected in the output.
3931
+ # Supported values include:
3932
+ #
3933
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
3934
+ #
3935
+ # * `NONE` – Take no action but return detection information in the
3936
+ # trace response.
3937
+ # @return [String]
3938
+ #
3939
+ # @!attribute [rw] input_enabled
3940
+ # Indicates whether guardrail evaluation is enabled on the input. When
3941
+ # disabled, you aren't charged for the evaluation. The evaluation
3942
+ # doesn't appear in the response.
3943
+ # @return [Boolean]
3944
+ #
3945
+ # @!attribute [rw] output_enabled
3946
+ # Indicates whether guardrail evaluation is enabled on the output.
3947
+ # When disabled, you aren't charged for the evaluation. The
3948
+ # evaluation doesn't appear in the response.
3949
+ # @return [Boolean]
3950
+ #
3655
3951
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailManagedWords AWS API Documentation
3656
3952
  #
3657
3953
  class GuardrailManagedWords < Struct.new(
3658
- :type)
3659
- SENSITIVE = []
3954
+ :type,
3955
+ :input_action,
3956
+ :output_action,
3957
+ :input_enabled,
3958
+ :output_enabled)
3959
+ SENSITIVE = [:input_action, :output_action]
3660
3960
  include Aws::Structure
3661
3961
  end
3662
3962
 
@@ -3666,11 +3966,47 @@ module Aws::Bedrock
3666
3966
  # The managed word type to configure for the guardrail.
3667
3967
  # @return [String]
3668
3968
  #
3969
+ # @!attribute [rw] input_action
3970
+ # Specifies the action to take when harmful content is detected in the
3971
+ # input. Supported values include:
3972
+ #
3973
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
3974
+ #
3975
+ # * `NONE` – Take no action but return detection information in the
3976
+ # trace response.
3977
+ # @return [String]
3978
+ #
3979
+ # @!attribute [rw] output_action
3980
+ # Specifies the action to take when harmful content is detected in the
3981
+ # output. Supported values include:
3982
+ #
3983
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
3984
+ #
3985
+ # * `NONE` – Take no action but return detection information in the
3986
+ # trace response.
3987
+ # @return [String]
3988
+ #
3989
+ # @!attribute [rw] input_enabled
3990
+ # Specifies whether to enable guardrail evaluation on the input. When
3991
+ # disabled, you aren't charged for the evaluation. The evaluation
3992
+ # doesn't appear in the response.
3993
+ # @return [Boolean]
3994
+ #
3995
+ # @!attribute [rw] output_enabled
3996
+ # Specifies whether to enable guardrail evaluation on the output. When
3997
+ # disabled, you aren't charged for the evaluation. The evaluation
3998
+ # doesn't appear in the response.
3999
+ # @return [Boolean]
4000
+ #
3669
4001
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailManagedWordsConfig AWS API Documentation
3670
4002
  #
3671
4003
  class GuardrailManagedWordsConfig < Struct.new(
3672
- :type)
3673
- SENSITIVE = []
4004
+ :type,
4005
+ :input_action,
4006
+ :output_action,
4007
+ :input_enabled,
4008
+ :output_enabled)
4009
+ SENSITIVE = [:input_action, :output_action]
3674
4010
  include Aws::Structure
3675
4011
  end
3676
4012
 
@@ -3684,11 +4020,53 @@ module Aws::Bedrock
3684
4020
  # The configured guardrail action when PII entity is detected.
3685
4021
  # @return [String]
3686
4022
  #
4023
+ # @!attribute [rw] input_action
4024
+ # The action to take when harmful content is detected in the input.
4025
+ # Supported values include:
4026
+ #
4027
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4028
+ #
4029
+ # * `ANONYMIZE` – Mask the content and replace it with identifier
4030
+ # tags.
4031
+ #
4032
+ # * `NONE` – Take no action but return detection information in the
4033
+ # trace response.
4034
+ # @return [String]
4035
+ #
4036
+ # @!attribute [rw] output_action
4037
+ # The action to take when harmful content is detected in the output.
4038
+ # Supported values include:
4039
+ #
4040
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4041
+ #
4042
+ # * `ANONYMIZE` – Mask the content and replace it with identifier
4043
+ # tags.
4044
+ #
4045
+ # * `NONE` – Take no action but return detection information in the
4046
+ # trace response.
4047
+ # @return [String]
4048
+ #
4049
+ # @!attribute [rw] input_enabled
4050
+ # Indicates whether guardrail evaluation is enabled on the input. When
4051
+ # disabled, you aren't charged for the evaluation. The evaluation
4052
+ # doesn't appear in the response.
4053
+ # @return [Boolean]
4054
+ #
4055
+ # @!attribute [rw] output_enabled
4056
+ # Indicates whether guardrail evaluation is enabled on the output.
4057
+ # When disabled, you aren't charged for the evaluation. The
4058
+ # evaluation doesn't appear in the response.
4059
+ # @return [Boolean]
4060
+ #
3687
4061
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailPiiEntity AWS API Documentation
3688
4062
  #
3689
4063
  class GuardrailPiiEntity < Struct.new(
3690
4064
  :type,
3691
- :action)
4065
+ :action,
4066
+ :input_action,
4067
+ :output_action,
4068
+ :input_enabled,
4069
+ :output_enabled)
3692
4070
  SENSITIVE = []
3693
4071
  include Aws::Structure
3694
4072
  end
@@ -3922,11 +4300,53 @@ module Aws::Bedrock
3922
4300
  # Configure guardrail action when the PII entity is detected.
3923
4301
  # @return [String]
3924
4302
  #
4303
+ # @!attribute [rw] input_action
4304
+ # Specifies the action to take when harmful content is detected in the
4305
+ # input. Supported values include:
4306
+ #
4307
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4308
+ #
4309
+ # * `ANONYMIZE` – Mask the content and replace it with identifier
4310
+ # tags.
4311
+ #
4312
+ # * `NONE` – Take no action but return detection information in the
4313
+ # trace response.
4314
+ # @return [String]
4315
+ #
4316
+ # @!attribute [rw] output_action
4317
+ # Specifies the action to take when harmful content is detected in the
4318
+ # output. Supported values include:
4319
+ #
4320
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4321
+ #
4322
+ # * `ANONYMIZE` – Mask the content and replace it with identifier
4323
+ # tags.
4324
+ #
4325
+ # * `NONE` – Take no action but return detection information in the
4326
+ # trace response.
4327
+ # @return [String]
4328
+ #
4329
+ # @!attribute [rw] input_enabled
4330
+ # Specifies whether to enable guardrail evaluation on the input. When
4331
+ # disabled, you aren't charged for the evaluation. The evaluation
4332
+ # doesn't appear in the response.
4333
+ # @return [Boolean]
4334
+ #
4335
+ # @!attribute [rw] output_enabled
4336
+ # Specifies whether to enable guardrail evaluation on the output. When
4337
+ # disabled, you aren't charged for the evaluation. The evaluation
4338
+ # doesn't appear in the response.
4339
+ # @return [Boolean]
4340
+ #
3925
4341
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailPiiEntityConfig AWS API Documentation
3926
4342
  #
3927
4343
  class GuardrailPiiEntityConfig < Struct.new(
3928
4344
  :type,
3929
- :action)
4345
+ :action,
4346
+ :input_action,
4347
+ :output_action,
4348
+ :input_enabled,
4349
+ :output_enabled)
3930
4350
  SENSITIVE = []
3931
4351
  include Aws::Structure
3932
4352
  end
@@ -3949,13 +4369,49 @@ module Aws::Bedrock
3949
4369
  # The action taken when a match to the regular expression is detected.
3950
4370
  # @return [String]
3951
4371
  #
4372
+ # @!attribute [rw] input_action
4373
+ # The action to take when harmful content is detected in the input.
4374
+ # Supported values include:
4375
+ #
4376
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4377
+ #
4378
+ # * `NONE` – Take no action but return detection information in the
4379
+ # trace response.
4380
+ # @return [String]
4381
+ #
4382
+ # @!attribute [rw] output_action
4383
+ # The action to take when harmful content is detected in the output.
4384
+ # Supported values include:
4385
+ #
4386
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4387
+ #
4388
+ # * `NONE` – Take no action but return detection information in the
4389
+ # trace response.
4390
+ # @return [String]
4391
+ #
4392
+ # @!attribute [rw] input_enabled
4393
+ # Indicates whether guardrail evaluation is enabled on the input. When
4394
+ # disabled, you aren't charged for the evaluation. The evaluation
4395
+ # doesn't appear in the response.
4396
+ # @return [Boolean]
4397
+ #
4398
+ # @!attribute [rw] output_enabled
4399
+ # Indicates whether guardrail evaluation is enabled on the output.
4400
+ # When disabled, you aren't charged for the evaluation. The
4401
+ # evaluation doesn't appear in the response.
4402
+ # @return [Boolean]
4403
+ #
3952
4404
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailRegex AWS API Documentation
3953
4405
  #
3954
4406
  class GuardrailRegex < Struct.new(
3955
4407
  :name,
3956
4408
  :description,
3957
4409
  :pattern,
3958
- :action)
4410
+ :action,
4411
+ :input_action,
4412
+ :output_action,
4413
+ :input_enabled,
4414
+ :output_enabled)
3959
4415
  SENSITIVE = []
3960
4416
  include Aws::Structure
3961
4417
  end
@@ -3980,13 +4436,49 @@ module Aws::Bedrock
3980
4436
  # is detected.
3981
4437
  # @return [String]
3982
4438
  #
4439
+ # @!attribute [rw] input_action
4440
+ # Specifies the action to take when harmful content is detected in the
4441
+ # input. Supported values include:
4442
+ #
4443
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4444
+ #
4445
+ # * `NONE` – Take no action but return detection information in the
4446
+ # trace response.
4447
+ # @return [String]
4448
+ #
4449
+ # @!attribute [rw] output_action
4450
+ # Specifies the action to take when harmful content is detected in the
4451
+ # output. Supported values include:
4452
+ #
4453
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4454
+ #
4455
+ # * `NONE` – Take no action but return detection information in the
4456
+ # trace response.
4457
+ # @return [String]
4458
+ #
4459
+ # @!attribute [rw] input_enabled
4460
+ # Specifies whether to enable guardrail evaluation on the input. When
4461
+ # disabled, you aren't charged for the evaluation. The evaluation
4462
+ # doesn't appear in the response.
4463
+ # @return [Boolean]
4464
+ #
4465
+ # @!attribute [rw] output_enabled
4466
+ # Specifies whether to enable guardrail evaluation on the output. When
4467
+ # disabled, you aren't charged for the evaluation. The evaluation
4468
+ # doesn't appear in the response.
4469
+ # @return [Boolean]
4470
+ #
3983
4471
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailRegexConfig AWS API Documentation
3984
4472
  #
3985
4473
  class GuardrailRegexConfig < Struct.new(
3986
4474
  :name,
3987
4475
  :description,
3988
4476
  :pattern,
3989
- :action)
4477
+ :action,
4478
+ :input_action,
4479
+ :output_action,
4480
+ :input_enabled,
4481
+ :output_enabled)
3990
4482
  SENSITIVE = []
3991
4483
  include Aws::Structure
3992
4484
  end
@@ -4119,14 +4611,50 @@ module Aws::Bedrock
4119
4611
  # Specifies to deny the topic.
4120
4612
  # @return [String]
4121
4613
  #
4614
+ # @!attribute [rw] input_action
4615
+ # The action to take when harmful content is detected in the input.
4616
+ # Supported values include:
4617
+ #
4618
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4619
+ #
4620
+ # * `NONE` – Take no action but return detection information in the
4621
+ # trace response.
4622
+ # @return [String]
4623
+ #
4624
+ # @!attribute [rw] output_action
4625
+ # The action to take when harmful content is detected in the output.
4626
+ # Supported values include:
4627
+ #
4628
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4629
+ #
4630
+ # * `NONE` – Take no action but return detection information in the
4631
+ # trace response.
4632
+ # @return [String]
4633
+ #
4634
+ # @!attribute [rw] input_enabled
4635
+ # Indicates whether guardrail evaluation is enabled on the input. When
4636
+ # disabled, you aren't charged for the evaluation. The evaluation
4637
+ # doesn't appear in the response.
4638
+ # @return [Boolean]
4639
+ #
4640
+ # @!attribute [rw] output_enabled
4641
+ # Indicates whether guardrail evaluation is enabled on the output.
4642
+ # When disabled, you aren't charged for the evaluation. The
4643
+ # evaluation doesn't appear in the response.
4644
+ # @return [Boolean]
4645
+ #
4122
4646
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailTopic AWS API Documentation
4123
4647
  #
4124
4648
  class GuardrailTopic < Struct.new(
4125
4649
  :name,
4126
4650
  :definition,
4127
4651
  :examples,
4128
- :type)
4129
- SENSITIVE = [:name, :definition, :examples]
4652
+ :type,
4653
+ :input_action,
4654
+ :output_action,
4655
+ :input_enabled,
4656
+ :output_enabled)
4657
+ SENSITIVE = [:name, :definition, :examples, :input_action, :output_action]
4130
4658
  include Aws::Structure
4131
4659
  end
4132
4660
 
@@ -4149,14 +4677,50 @@ module Aws::Bedrock
4149
4677
  # Specifies to deny the topic.
4150
4678
  # @return [String]
4151
4679
  #
4680
+ # @!attribute [rw] input_action
4681
+ # Specifies the action to take when harmful content is detected in the
4682
+ # input. Supported values include:
4683
+ #
4684
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4685
+ #
4686
+ # * `NONE` – Take no action but return detection information in the
4687
+ # trace response.
4688
+ # @return [String]
4689
+ #
4690
+ # @!attribute [rw] output_action
4691
+ # Specifies the action to take when harmful content is detected in the
4692
+ # output. Supported values include:
4693
+ #
4694
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4695
+ #
4696
+ # * `NONE` – Take no action but return detection information in the
4697
+ # trace response.
4698
+ # @return [String]
4699
+ #
4700
+ # @!attribute [rw] input_enabled
4701
+ # Specifies whether to enable guardrail evaluation on the input. When
4702
+ # disabled, you aren't charged for the evaluation. The evaluation
4703
+ # doesn't appear in the response.
4704
+ # @return [Boolean]
4705
+ #
4706
+ # @!attribute [rw] output_enabled
4707
+ # Specifies whether to enable guardrail evaluation on the output. When
4708
+ # disabled, you aren't charged for the evaluation. The evaluation
4709
+ # doesn't appear in the response.
4710
+ # @return [Boolean]
4711
+ #
4152
4712
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailTopicConfig AWS API Documentation
4153
4713
  #
4154
4714
  class GuardrailTopicConfig < Struct.new(
4155
4715
  :name,
4156
4716
  :definition,
4157
4717
  :examples,
4158
- :type)
4159
- SENSITIVE = [:name, :definition, :examples]
4718
+ :type,
4719
+ :input_action,
4720
+ :output_action,
4721
+ :input_enabled,
4722
+ :output_enabled)
4723
+ SENSITIVE = [:name, :definition, :examples, :input_action, :output_action]
4160
4724
  include Aws::Structure
4161
4725
  end
4162
4726
 
@@ -4206,11 +4770,47 @@ module Aws::Bedrock
4206
4770
  # Text of the word configured for the guardrail to block.
4207
4771
  # @return [String]
4208
4772
  #
4773
+ # @!attribute [rw] input_action
4774
+ # The action to take when harmful content is detected in the input.
4775
+ # Supported values include:
4776
+ #
4777
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4778
+ #
4779
+ # * `NONE` – Take no action but return detection information in the
4780
+ # trace response.
4781
+ # @return [String]
4782
+ #
4783
+ # @!attribute [rw] output_action
4784
+ # The action to take when harmful content is detected in the output.
4785
+ # Supported values include:
4786
+ #
4787
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4788
+ #
4789
+ # * `NONE` – Take no action but return detection information in the
4790
+ # trace response.
4791
+ # @return [String]
4792
+ #
4793
+ # @!attribute [rw] input_enabled
4794
+ # Indicates whether guardrail evaluation is enabled on the input. When
4795
+ # disabled, you aren't charged for the evaluation. The evaluation
4796
+ # doesn't appear in the response.
4797
+ # @return [Boolean]
4798
+ #
4799
+ # @!attribute [rw] output_enabled
4800
+ # Indicates whether guardrail evaluation is enabled on the output.
4801
+ # When disabled, you aren't charged for the evaluation. The
4802
+ # evaluation doesn't appear in the response.
4803
+ # @return [Boolean]
4804
+ #
4209
4805
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailWord AWS API Documentation
4210
4806
  #
4211
4807
  class GuardrailWord < Struct.new(
4212
- :text)
4213
- SENSITIVE = []
4808
+ :text,
4809
+ :input_action,
4810
+ :output_action,
4811
+ :input_enabled,
4812
+ :output_enabled)
4813
+ SENSITIVE = [:input_action, :output_action]
4214
4814
  include Aws::Structure
4215
4815
  end
4216
4816
 
@@ -4220,11 +4820,47 @@ module Aws::Bedrock
4220
4820
  # Text of the word configured for the guardrail to block.
4221
4821
  # @return [String]
4222
4822
  #
4823
+ # @!attribute [rw] input_action
4824
+ # Specifies the action to take when harmful content is detected in the
4825
+ # input. Supported values include:
4826
+ #
4827
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4828
+ #
4829
+ # * `NONE` – Take no action but return detection information in the
4830
+ # trace response.
4831
+ # @return [String]
4832
+ #
4833
+ # @!attribute [rw] output_action
4834
+ # Specifies the action to take when harmful content is detected in the
4835
+ # output. Supported values include:
4836
+ #
4837
+ # * `BLOCK` – Block the content and replace it with blocked messaging.
4838
+ #
4839
+ # * `NONE` – Take no action but return detection information in the
4840
+ # trace response.
4841
+ # @return [String]
4842
+ #
4843
+ # @!attribute [rw] input_enabled
4844
+ # Specifies whether to enable guardrail evaluation on the intput. When
4845
+ # disabled, you aren't charged for the evaluation. The evaluation
4846
+ # doesn't appear in the response.
4847
+ # @return [Boolean]
4848
+ #
4849
+ # @!attribute [rw] output_enabled
4850
+ # Specifies whether to enable guardrail evaluation on the output. When
4851
+ # disabled, you aren't charged for the evaluation. The evaluation
4852
+ # doesn't appear in the response.
4853
+ # @return [Boolean]
4854
+ #
4223
4855
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailWordConfig AWS API Documentation
4224
4856
  #
4225
4857
  class GuardrailWordConfig < Struct.new(
4226
- :text)
4227
- SENSITIVE = []
4858
+ :text,
4859
+ :input_action,
4860
+ :output_action,
4861
+ :input_enabled,
4862
+ :output_enabled)
4863
+ SENSITIVE = [:input_action, :output_action]
4228
4864
  include Aws::Structure
4229
4865
  end
4230
4866
 
@@ -5415,7 +6051,7 @@ module Aws::Bedrock
5415
6051
  #
5416
6052
  # * Failed – This job has failed. Check the failure message for any
5417
6053
  # further details. For further assistance, reach out to the [Amazon
5418
- # Web Services Support Center][3].
6054
+ # Web ServicesSupport Center][3].
5419
6055
  #
5420
6056
  # * Stopped – This job was stopped by a user.
5421
6057
  #
@@ -6171,7 +6807,7 @@ module Aws::Bedrock
6171
6807
  #
6172
6808
  # * Failed – This job has failed. Check the failure message for any
6173
6809
  # further details. For further assistance, reach out to the [Amazon
6174
- # Web Services Support Center][3].
6810
+ # Web ServicesSupport Center][3].
6175
6811
  #
6176
6812
  # * Stopped – This job was stopped by a user.
6177
6813
  #
@@ -6543,6 +7179,58 @@ module Aws::Bedrock
6543
7179
  class Unknown < RAGConfig; end
6544
7180
  end
6545
7181
 
7182
+ # Defines the value and corresponding definition for one rating in a
7183
+ # custom metric rating scale.
7184
+ #
7185
+ # @!attribute [rw] definition
7186
+ # Defines the definition for one rating in a custom metric rating
7187
+ # scale.
7188
+ # @return [String]
7189
+ #
7190
+ # @!attribute [rw] value
7191
+ # Defines the value for one rating in a custom metric rating scale.
7192
+ # @return [Types::RatingScaleItemValue]
7193
+ #
7194
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/RatingScaleItem AWS API Documentation
7195
+ #
7196
+ class RatingScaleItem < Struct.new(
7197
+ :definition,
7198
+ :value)
7199
+ SENSITIVE = []
7200
+ include Aws::Structure
7201
+ end
7202
+
7203
+ # Defines the value for one rating in a custom metric rating scale.
7204
+ #
7205
+ # @note RatingScaleItemValue is a union - when making an API calls you must set exactly one of the members.
7206
+ #
7207
+ # @note RatingScaleItemValue is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of RatingScaleItemValue corresponding to the set member.
7208
+ #
7209
+ # @!attribute [rw] string_value
7210
+ # A string representing the value for a rating in a custom metric
7211
+ # rating scale.
7212
+ # @return [String]
7213
+ #
7214
+ # @!attribute [rw] float_value
7215
+ # A floating point number representing the value for a rating in a
7216
+ # custom metric rating scale.
7217
+ # @return [Float]
7218
+ #
7219
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/RatingScaleItemValue AWS API Documentation
7220
+ #
7221
+ class RatingScaleItemValue < Struct.new(
7222
+ :string_value,
7223
+ :float_value,
7224
+ :unknown)
7225
+ SENSITIVE = []
7226
+ include Aws::Structure
7227
+ include Aws::Structure::Union
7228
+
7229
+ class StringValue < RatingScaleItemValue; end
7230
+ class FloatValue < RatingScaleItemValue; end
7231
+ class Unknown < RatingScaleItemValue; end
7232
+ end
7233
+
6546
7234
  # @!attribute [rw] endpoint_identifier
6547
7235
  # The ARN of the Amazon SageMaker endpoint you want to register with
6548
7236
  # Amazon Bedrock Marketplace.