aws-sdk-bedrock 1.39.0 → 1.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-bedrock/client.rb +88 -7
- data/lib/aws-sdk-bedrock/client_api.rb +63 -0
- data/lib/aws-sdk-bedrock/types.rb +540 -25
- data/lib/aws-sdk-bedrock.rb +1 -1
- data/sig/client.rbs +67 -14
- data/sig/types.rbs +73 -14
- metadata +2 -2
@@ -1151,6 +1151,35 @@ module Aws::Bedrock
|
|
1151
1151
|
include Aws::Structure
|
1152
1152
|
end
|
1153
1153
|
|
1154
|
+
# A `CustomModelUnit` (CMU) is an abstract view of the hardware
|
1155
|
+
# utilization that Amazon Bedrock needs to host a single copy of your
|
1156
|
+
# custom model. A model copy represents a single instance of your
|
1157
|
+
# imported model that is ready to serve inference requests. Amazon
|
1158
|
+
# Bedrock determines the number of custom model units that a model copy
|
1159
|
+
# needs when you import the custom model.
|
1160
|
+
#
|
1161
|
+
# You can use `CustomModelUnits` to estimate the cost of running your
|
1162
|
+
# custom model. For more information, see Calculate the cost of running
|
1163
|
+
# a custom model in the Amazon Bedrock user guide.
|
1164
|
+
#
|
1165
|
+
# @!attribute [rw] custom_model_units_per_model_copy
|
1166
|
+
# The number of custom model units used to host a model copy.
|
1167
|
+
# @return [Integer]
|
1168
|
+
#
|
1169
|
+
# @!attribute [rw] custom_model_units_version
|
1170
|
+
# The version of the custom model unit. Use to determine the billing
|
1171
|
+
# rate for the custom model unit.
|
1172
|
+
# @return [String]
|
1173
|
+
#
|
1174
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CustomModelUnits AWS API Documentation
|
1175
|
+
#
|
1176
|
+
class CustomModelUnits < Struct.new(
|
1177
|
+
:custom_model_units_per_model_copy,
|
1178
|
+
:custom_model_units_version)
|
1179
|
+
SENSITIVE = []
|
1180
|
+
include Aws::Structure
|
1181
|
+
end
|
1182
|
+
|
1154
1183
|
# A model customization configuration
|
1155
1184
|
#
|
1156
1185
|
# @note CustomizationConfig is a union - when making an API calls you must set exactly one of the members.
|
@@ -2548,6 +2577,11 @@ module Aws::Bedrock
|
|
2548
2577
|
# Specifies if the imported model supports converse.
|
2549
2578
|
# @return [Boolean]
|
2550
2579
|
#
|
2580
|
+
# @!attribute [rw] custom_model_units
|
2581
|
+
# Information about the hardware utilization for a single copy of the
|
2582
|
+
# model.
|
2583
|
+
# @return [Types::CustomModelUnits]
|
2584
|
+
#
|
2551
2585
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetImportedModelResponse AWS API Documentation
|
2552
2586
|
#
|
2553
2587
|
class GetImportedModelResponse < Struct.new(
|
@@ -2559,7 +2593,8 @@ module Aws::Bedrock
|
|
2559
2593
|
:creation_time,
|
2560
2594
|
:model_architecture,
|
2561
2595
|
:model_kms_key_arn,
|
2562
|
-
:instruct_supported
|
2596
|
+
:instruct_supported,
|
2597
|
+
:custom_model_units)
|
2563
2598
|
SENSITIVE = []
|
2564
2599
|
include Aws::Structure
|
2565
2600
|
end
|
@@ -3406,6 +3441,38 @@ module Aws::Bedrock
|
|
3406
3441
|
# The output modalities selected for the guardrail content filter.
|
3407
3442
|
# @return [Array<String>]
|
3408
3443
|
#
|
3444
|
+
# @!attribute [rw] input_action
|
3445
|
+
# The action to take when harmful content is detected in the input.
|
3446
|
+
# Supported values include:
|
3447
|
+
#
|
3448
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
3449
|
+
#
|
3450
|
+
# * `NONE` – Take no action but return detection information in the
|
3451
|
+
# trace response.
|
3452
|
+
# @return [String]
|
3453
|
+
#
|
3454
|
+
# @!attribute [rw] output_action
|
3455
|
+
# The action to take when harmful content is detected in the output.
|
3456
|
+
# Supported values include:
|
3457
|
+
#
|
3458
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
3459
|
+
#
|
3460
|
+
# * `NONE` – Take no action but return detection information in the
|
3461
|
+
# trace response.
|
3462
|
+
# @return [String]
|
3463
|
+
#
|
3464
|
+
# @!attribute [rw] input_enabled
|
3465
|
+
# Indicates whether guardrail evaluation is enabled on the input. When
|
3466
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
3467
|
+
# doesn't appear in the response.
|
3468
|
+
# @return [Boolean]
|
3469
|
+
#
|
3470
|
+
# @!attribute [rw] output_enabled
|
3471
|
+
# Indicates whether guardrail evaluation is enabled on the output.
|
3472
|
+
# When disabled, you aren't charged for the evaluation. The
|
3473
|
+
# evaluation doesn't appear in the response.
|
3474
|
+
# @return [Boolean]
|
3475
|
+
#
|
3409
3476
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailContentFilter AWS API Documentation
|
3410
3477
|
#
|
3411
3478
|
class GuardrailContentFilter < Struct.new(
|
@@ -3413,8 +3480,12 @@ module Aws::Bedrock
|
|
3413
3480
|
:input_strength,
|
3414
3481
|
:output_strength,
|
3415
3482
|
:input_modalities,
|
3416
|
-
:output_modalities
|
3417
|
-
|
3483
|
+
:output_modalities,
|
3484
|
+
:input_action,
|
3485
|
+
:output_action,
|
3486
|
+
:input_enabled,
|
3487
|
+
:output_enabled)
|
3488
|
+
SENSITIVE = [:input_modalities, :output_modalities, :input_action, :output_action]
|
3418
3489
|
include Aws::Structure
|
3419
3490
|
end
|
3420
3491
|
|
@@ -3485,6 +3556,38 @@ module Aws::Bedrock
|
|
3485
3556
|
# configuration.
|
3486
3557
|
# @return [Array<String>]
|
3487
3558
|
#
|
3559
|
+
# @!attribute [rw] input_action
|
3560
|
+
# Specifies the action to take when harmful content is detected.
|
3561
|
+
# Supported values include:
|
3562
|
+
#
|
3563
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
3564
|
+
#
|
3565
|
+
# * `NONE` – Take no action but return detection information in the
|
3566
|
+
# trace response.
|
3567
|
+
# @return [String]
|
3568
|
+
#
|
3569
|
+
# @!attribute [rw] output_action
|
3570
|
+
# Specifies the action to take when harmful content is detected in the
|
3571
|
+
# output. Supported values include:
|
3572
|
+
#
|
3573
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
3574
|
+
#
|
3575
|
+
# * `NONE` – Take no action but return detection information in the
|
3576
|
+
# trace response.
|
3577
|
+
# @return [String]
|
3578
|
+
#
|
3579
|
+
# @!attribute [rw] input_enabled
|
3580
|
+
# Specifies whether to enable guardrail evaluation on the input. When
|
3581
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
3582
|
+
# doesn't appear in the response.
|
3583
|
+
# @return [Boolean]
|
3584
|
+
#
|
3585
|
+
# @!attribute [rw] output_enabled
|
3586
|
+
# Specifies whether to enable guardrail evaluation on the output. When
|
3587
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
3588
|
+
# doesn't appear in the response.
|
3589
|
+
# @return [Boolean]
|
3590
|
+
#
|
3488
3591
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailContentFilterConfig AWS API Documentation
|
3489
3592
|
#
|
3490
3593
|
class GuardrailContentFilterConfig < Struct.new(
|
@@ -3492,8 +3595,12 @@ module Aws::Bedrock
|
|
3492
3595
|
:input_strength,
|
3493
3596
|
:output_strength,
|
3494
3597
|
:input_modalities,
|
3495
|
-
:output_modalities
|
3496
|
-
|
3598
|
+
:output_modalities,
|
3599
|
+
:input_action,
|
3600
|
+
:output_action,
|
3601
|
+
:input_enabled,
|
3602
|
+
:output_enabled)
|
3603
|
+
SENSITIVE = [:input_modalities, :output_modalities, :input_action, :output_action]
|
3497
3604
|
include Aws::Structure
|
3498
3605
|
end
|
3499
3606
|
|
@@ -3549,12 +3656,30 @@ module Aws::Bedrock
|
|
3549
3656
|
# filter.
|
3550
3657
|
# @return [Float]
|
3551
3658
|
#
|
3659
|
+
# @!attribute [rw] action
|
3660
|
+
# The action to take when content fails the contextual grounding
|
3661
|
+
# evaluation. Supported values include:
|
3662
|
+
#
|
3663
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
3664
|
+
#
|
3665
|
+
# * `NONE` – Take no action but return detection information in the
|
3666
|
+
# trace response.
|
3667
|
+
# @return [String]
|
3668
|
+
#
|
3669
|
+
# @!attribute [rw] enabled
|
3670
|
+
# Indicates whether contextual grounding is enabled for evaluation.
|
3671
|
+
# When disabled, you aren't charged for the evaluation. The
|
3672
|
+
# evaluation doesn't appear in the response.
|
3673
|
+
# @return [Boolean]
|
3674
|
+
#
|
3552
3675
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailContextualGroundingFilter AWS API Documentation
|
3553
3676
|
#
|
3554
3677
|
class GuardrailContextualGroundingFilter < Struct.new(
|
3555
3678
|
:type,
|
3556
|
-
:threshold
|
3557
|
-
|
3679
|
+
:threshold,
|
3680
|
+
:action,
|
3681
|
+
:enabled)
|
3682
|
+
SENSITIVE = [:action]
|
3558
3683
|
include Aws::Structure
|
3559
3684
|
end
|
3560
3685
|
|
@@ -3570,12 +3695,30 @@ module Aws::Bedrock
|
|
3570
3695
|
# filter.
|
3571
3696
|
# @return [Float]
|
3572
3697
|
#
|
3698
|
+
# @!attribute [rw] action
|
3699
|
+
# Specifies the action to take when content fails the contextual
|
3700
|
+
# grounding evaluation. Supported values include:
|
3701
|
+
#
|
3702
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
3703
|
+
#
|
3704
|
+
# * `NONE` – Take no action but return detection information in the
|
3705
|
+
# trace response.
|
3706
|
+
# @return [String]
|
3707
|
+
#
|
3708
|
+
# @!attribute [rw] enabled
|
3709
|
+
# Specifies whether to enable contextual grounding evaluation. When
|
3710
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
3711
|
+
# doesn't appear in the response.
|
3712
|
+
# @return [Boolean]
|
3713
|
+
#
|
3573
3714
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailContextualGroundingFilterConfig AWS API Documentation
|
3574
3715
|
#
|
3575
3716
|
class GuardrailContextualGroundingFilterConfig < Struct.new(
|
3576
3717
|
:type,
|
3577
|
-
:threshold
|
3578
|
-
|
3718
|
+
:threshold,
|
3719
|
+
:action,
|
3720
|
+
:enabled)
|
3721
|
+
SENSITIVE = [:action]
|
3579
3722
|
include Aws::Structure
|
3580
3723
|
end
|
3581
3724
|
|
@@ -3617,11 +3760,47 @@ module Aws::Bedrock
|
|
3617
3760
|
# guardrail. (For now, we only offer profanity word list)
|
3618
3761
|
# @return [String]
|
3619
3762
|
#
|
3763
|
+
# @!attribute [rw] input_action
|
3764
|
+
# The action to take when harmful content is detected in the input.
|
3765
|
+
# Supported values include:
|
3766
|
+
#
|
3767
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
3768
|
+
#
|
3769
|
+
# * `NONE` – Take no action but return detection information in the
|
3770
|
+
# trace response.
|
3771
|
+
# @return [String]
|
3772
|
+
#
|
3773
|
+
# @!attribute [rw] output_action
|
3774
|
+
# The action to take when harmful content is detected in the output.
|
3775
|
+
# Supported values include:
|
3776
|
+
#
|
3777
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
3778
|
+
#
|
3779
|
+
# * `NONE` – Take no action but return detection information in the
|
3780
|
+
# trace response.
|
3781
|
+
# @return [String]
|
3782
|
+
#
|
3783
|
+
# @!attribute [rw] input_enabled
|
3784
|
+
# Indicates whether guardrail evaluation is enabled on the input. When
|
3785
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
3786
|
+
# doesn't appear in the response.
|
3787
|
+
# @return [Boolean]
|
3788
|
+
#
|
3789
|
+
# @!attribute [rw] output_enabled
|
3790
|
+
# Indicates whether guardrail evaluation is enabled on the output.
|
3791
|
+
# When disabled, you aren't charged for the evaluation. The
|
3792
|
+
# evaluation doesn't appear in the response.
|
3793
|
+
# @return [Boolean]
|
3794
|
+
#
|
3620
3795
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailManagedWords AWS API Documentation
|
3621
3796
|
#
|
3622
3797
|
class GuardrailManagedWords < Struct.new(
|
3623
|
-
:type
|
3624
|
-
|
3798
|
+
:type,
|
3799
|
+
:input_action,
|
3800
|
+
:output_action,
|
3801
|
+
:input_enabled,
|
3802
|
+
:output_enabled)
|
3803
|
+
SENSITIVE = [:input_action, :output_action]
|
3625
3804
|
include Aws::Structure
|
3626
3805
|
end
|
3627
3806
|
|
@@ -3631,11 +3810,47 @@ module Aws::Bedrock
|
|
3631
3810
|
# The managed word type to configure for the guardrail.
|
3632
3811
|
# @return [String]
|
3633
3812
|
#
|
3813
|
+
# @!attribute [rw] input_action
|
3814
|
+
# Specifies the action to take when harmful content is detected in the
|
3815
|
+
# input. Supported values include:
|
3816
|
+
#
|
3817
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
3818
|
+
#
|
3819
|
+
# * `NONE` – Take no action but return detection information in the
|
3820
|
+
# trace response.
|
3821
|
+
# @return [String]
|
3822
|
+
#
|
3823
|
+
# @!attribute [rw] output_action
|
3824
|
+
# Specifies the action to take when harmful content is detected in the
|
3825
|
+
# output. Supported values include:
|
3826
|
+
#
|
3827
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
3828
|
+
#
|
3829
|
+
# * `NONE` – Take no action but return detection information in the
|
3830
|
+
# trace response.
|
3831
|
+
# @return [String]
|
3832
|
+
#
|
3833
|
+
# @!attribute [rw] input_enabled
|
3834
|
+
# Specifies whether to enable guardrail evaluation on the input. When
|
3835
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
3836
|
+
# doesn't appear in the response.
|
3837
|
+
# @return [Boolean]
|
3838
|
+
#
|
3839
|
+
# @!attribute [rw] output_enabled
|
3840
|
+
# Specifies whether to enable guardrail evaluation on the output. When
|
3841
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
3842
|
+
# doesn't appear in the response.
|
3843
|
+
# @return [Boolean]
|
3844
|
+
#
|
3634
3845
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailManagedWordsConfig AWS API Documentation
|
3635
3846
|
#
|
3636
3847
|
class GuardrailManagedWordsConfig < Struct.new(
|
3637
|
-
:type
|
3638
|
-
|
3848
|
+
:type,
|
3849
|
+
:input_action,
|
3850
|
+
:output_action,
|
3851
|
+
:input_enabled,
|
3852
|
+
:output_enabled)
|
3853
|
+
SENSITIVE = [:input_action, :output_action]
|
3639
3854
|
include Aws::Structure
|
3640
3855
|
end
|
3641
3856
|
|
@@ -3649,11 +3864,53 @@ module Aws::Bedrock
|
|
3649
3864
|
# The configured guardrail action when PII entity is detected.
|
3650
3865
|
# @return [String]
|
3651
3866
|
#
|
3867
|
+
# @!attribute [rw] input_action
|
3868
|
+
# The action to take when harmful content is detected in the input.
|
3869
|
+
# Supported values include:
|
3870
|
+
#
|
3871
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
3872
|
+
#
|
3873
|
+
# * `ANONYMIZE` – Mask the content and replace it with identifier
|
3874
|
+
# tags.
|
3875
|
+
#
|
3876
|
+
# * `NONE` – Take no action but return detection information in the
|
3877
|
+
# trace response.
|
3878
|
+
# @return [String]
|
3879
|
+
#
|
3880
|
+
# @!attribute [rw] output_action
|
3881
|
+
# The action to take when harmful content is detected in the output.
|
3882
|
+
# Supported values include:
|
3883
|
+
#
|
3884
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
3885
|
+
#
|
3886
|
+
# * `ANONYMIZE` – Mask the content and replace it with identifier
|
3887
|
+
# tags.
|
3888
|
+
#
|
3889
|
+
# * `NONE` – Take no action but return detection information in the
|
3890
|
+
# trace response.
|
3891
|
+
# @return [String]
|
3892
|
+
#
|
3893
|
+
# @!attribute [rw] input_enabled
|
3894
|
+
# Indicates whether guardrail evaluation is enabled on the input. When
|
3895
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
3896
|
+
# doesn't appear in the response.
|
3897
|
+
# @return [Boolean]
|
3898
|
+
#
|
3899
|
+
# @!attribute [rw] output_enabled
|
3900
|
+
# Indicates whether guardrail evaluation is enabled on the output.
|
3901
|
+
# When disabled, you aren't charged for the evaluation. The
|
3902
|
+
# evaluation doesn't appear in the response.
|
3903
|
+
# @return [Boolean]
|
3904
|
+
#
|
3652
3905
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailPiiEntity AWS API Documentation
|
3653
3906
|
#
|
3654
3907
|
class GuardrailPiiEntity < Struct.new(
|
3655
3908
|
:type,
|
3656
|
-
:action
|
3909
|
+
:action,
|
3910
|
+
:input_action,
|
3911
|
+
:output_action,
|
3912
|
+
:input_enabled,
|
3913
|
+
:output_enabled)
|
3657
3914
|
SENSITIVE = []
|
3658
3915
|
include Aws::Structure
|
3659
3916
|
end
|
@@ -3887,11 +4144,53 @@ module Aws::Bedrock
|
|
3887
4144
|
# Configure guardrail action when the PII entity is detected.
|
3888
4145
|
# @return [String]
|
3889
4146
|
#
|
4147
|
+
# @!attribute [rw] input_action
|
4148
|
+
# Specifies the action to take when harmful content is detected in the
|
4149
|
+
# input. Supported values include:
|
4150
|
+
#
|
4151
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
4152
|
+
#
|
4153
|
+
# * `ANONYMIZE` – Mask the content and replace it with identifier
|
4154
|
+
# tags.
|
4155
|
+
#
|
4156
|
+
# * `NONE` – Take no action but return detection information in the
|
4157
|
+
# trace response.
|
4158
|
+
# @return [String]
|
4159
|
+
#
|
4160
|
+
# @!attribute [rw] output_action
|
4161
|
+
# Specifies the action to take when harmful content is detected in the
|
4162
|
+
# output. Supported values include:
|
4163
|
+
#
|
4164
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
4165
|
+
#
|
4166
|
+
# * `ANONYMIZE` – Mask the content and replace it with identifier
|
4167
|
+
# tags.
|
4168
|
+
#
|
4169
|
+
# * `NONE` – Take no action but return detection information in the
|
4170
|
+
# trace response.
|
4171
|
+
# @return [String]
|
4172
|
+
#
|
4173
|
+
# @!attribute [rw] input_enabled
|
4174
|
+
# Specifies whether to enable guardrail evaluation on the input. When
|
4175
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
4176
|
+
# doesn't appear in the response.
|
4177
|
+
# @return [Boolean]
|
4178
|
+
#
|
4179
|
+
# @!attribute [rw] output_enabled
|
4180
|
+
# Specifies whether to enable guardrail evaluation on the output. When
|
4181
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
4182
|
+
# doesn't appear in the response.
|
4183
|
+
# @return [Boolean]
|
4184
|
+
#
|
3890
4185
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailPiiEntityConfig AWS API Documentation
|
3891
4186
|
#
|
3892
4187
|
class GuardrailPiiEntityConfig < Struct.new(
|
3893
4188
|
:type,
|
3894
|
-
:action
|
4189
|
+
:action,
|
4190
|
+
:input_action,
|
4191
|
+
:output_action,
|
4192
|
+
:input_enabled,
|
4193
|
+
:output_enabled)
|
3895
4194
|
SENSITIVE = []
|
3896
4195
|
include Aws::Structure
|
3897
4196
|
end
|
@@ -3914,13 +4213,49 @@ module Aws::Bedrock
|
|
3914
4213
|
# The action taken when a match to the regular expression is detected.
|
3915
4214
|
# @return [String]
|
3916
4215
|
#
|
4216
|
+
# @!attribute [rw] input_action
|
4217
|
+
# The action to take when harmful content is detected in the input.
|
4218
|
+
# Supported values include:
|
4219
|
+
#
|
4220
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
4221
|
+
#
|
4222
|
+
# * `NONE` – Take no action but return detection information in the
|
4223
|
+
# trace response.
|
4224
|
+
# @return [String]
|
4225
|
+
#
|
4226
|
+
# @!attribute [rw] output_action
|
4227
|
+
# The action to take when harmful content is detected in the output.
|
4228
|
+
# Supported values include:
|
4229
|
+
#
|
4230
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
4231
|
+
#
|
4232
|
+
# * `NONE` – Take no action but return detection information in the
|
4233
|
+
# trace response.
|
4234
|
+
# @return [String]
|
4235
|
+
#
|
4236
|
+
# @!attribute [rw] input_enabled
|
4237
|
+
# Indicates whether guardrail evaluation is enabled on the input. When
|
4238
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
4239
|
+
# doesn't appear in the response.
|
4240
|
+
# @return [Boolean]
|
4241
|
+
#
|
4242
|
+
# @!attribute [rw] output_enabled
|
4243
|
+
# Indicates whether guardrail evaluation is enabled on the output.
|
4244
|
+
# When disabled, you aren't charged for the evaluation. The
|
4245
|
+
# evaluation doesn't appear in the response.
|
4246
|
+
# @return [Boolean]
|
4247
|
+
#
|
3917
4248
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailRegex AWS API Documentation
|
3918
4249
|
#
|
3919
4250
|
class GuardrailRegex < Struct.new(
|
3920
4251
|
:name,
|
3921
4252
|
:description,
|
3922
4253
|
:pattern,
|
3923
|
-
:action
|
4254
|
+
:action,
|
4255
|
+
:input_action,
|
4256
|
+
:output_action,
|
4257
|
+
:input_enabled,
|
4258
|
+
:output_enabled)
|
3924
4259
|
SENSITIVE = []
|
3925
4260
|
include Aws::Structure
|
3926
4261
|
end
|
@@ -3945,13 +4280,49 @@ module Aws::Bedrock
|
|
3945
4280
|
# is detected.
|
3946
4281
|
# @return [String]
|
3947
4282
|
#
|
4283
|
+
# @!attribute [rw] input_action
|
4284
|
+
# Specifies the action to take when harmful content is detected in the
|
4285
|
+
# input. Supported values include:
|
4286
|
+
#
|
4287
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
4288
|
+
#
|
4289
|
+
# * `NONE` – Take no action but return detection information in the
|
4290
|
+
# trace response.
|
4291
|
+
# @return [String]
|
4292
|
+
#
|
4293
|
+
# @!attribute [rw] output_action
|
4294
|
+
# Specifies the action to take when harmful content is detected in the
|
4295
|
+
# output. Supported values include:
|
4296
|
+
#
|
4297
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
4298
|
+
#
|
4299
|
+
# * `NONE` – Take no action but return detection information in the
|
4300
|
+
# trace response.
|
4301
|
+
# @return [String]
|
4302
|
+
#
|
4303
|
+
# @!attribute [rw] input_enabled
|
4304
|
+
# Specifies whether to enable guardrail evaluation on the input. When
|
4305
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
4306
|
+
# doesn't appear in the response.
|
4307
|
+
# @return [Boolean]
|
4308
|
+
#
|
4309
|
+
# @!attribute [rw] output_enabled
|
4310
|
+
# Specifies whether to enable guardrail evaluation on the output. When
|
4311
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
4312
|
+
# doesn't appear in the response.
|
4313
|
+
# @return [Boolean]
|
4314
|
+
#
|
3948
4315
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailRegexConfig AWS API Documentation
|
3949
4316
|
#
|
3950
4317
|
class GuardrailRegexConfig < Struct.new(
|
3951
4318
|
:name,
|
3952
4319
|
:description,
|
3953
4320
|
:pattern,
|
3954
|
-
:action
|
4321
|
+
:action,
|
4322
|
+
:input_action,
|
4323
|
+
:output_action,
|
4324
|
+
:input_enabled,
|
4325
|
+
:output_enabled)
|
3955
4326
|
SENSITIVE = []
|
3956
4327
|
include Aws::Structure
|
3957
4328
|
end
|
@@ -4084,14 +4455,50 @@ module Aws::Bedrock
|
|
4084
4455
|
# Specifies to deny the topic.
|
4085
4456
|
# @return [String]
|
4086
4457
|
#
|
4458
|
+
# @!attribute [rw] input_action
|
4459
|
+
# The action to take when harmful content is detected in the input.
|
4460
|
+
# Supported values include:
|
4461
|
+
#
|
4462
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
4463
|
+
#
|
4464
|
+
# * `NONE` – Take no action but return detection information in the
|
4465
|
+
# trace response.
|
4466
|
+
# @return [String]
|
4467
|
+
#
|
4468
|
+
# @!attribute [rw] output_action
|
4469
|
+
# The action to take when harmful content is detected in the output.
|
4470
|
+
# Supported values include:
|
4471
|
+
#
|
4472
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
4473
|
+
#
|
4474
|
+
# * `NONE` – Take no action but return detection information in the
|
4475
|
+
# trace response.
|
4476
|
+
# @return [String]
|
4477
|
+
#
|
4478
|
+
# @!attribute [rw] input_enabled
|
4479
|
+
# Indicates whether guardrail evaluation is enabled on the input. When
|
4480
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
4481
|
+
# doesn't appear in the response.
|
4482
|
+
# @return [Boolean]
|
4483
|
+
#
|
4484
|
+
# @!attribute [rw] output_enabled
|
4485
|
+
# Indicates whether guardrail evaluation is enabled on the output.
|
4486
|
+
# When disabled, you aren't charged for the evaluation. The
|
4487
|
+
# evaluation doesn't appear in the response.
|
4488
|
+
# @return [Boolean]
|
4489
|
+
#
|
4087
4490
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailTopic AWS API Documentation
|
4088
4491
|
#
|
4089
4492
|
class GuardrailTopic < Struct.new(
|
4090
4493
|
:name,
|
4091
4494
|
:definition,
|
4092
4495
|
:examples,
|
4093
|
-
:type
|
4094
|
-
|
4496
|
+
:type,
|
4497
|
+
:input_action,
|
4498
|
+
:output_action,
|
4499
|
+
:input_enabled,
|
4500
|
+
:output_enabled)
|
4501
|
+
SENSITIVE = [:name, :definition, :examples, :input_action, :output_action]
|
4095
4502
|
include Aws::Structure
|
4096
4503
|
end
|
4097
4504
|
|
@@ -4114,14 +4521,50 @@ module Aws::Bedrock
|
|
4114
4521
|
# Specifies to deny the topic.
|
4115
4522
|
# @return [String]
|
4116
4523
|
#
|
4524
|
+
# @!attribute [rw] input_action
|
4525
|
+
# Specifies the action to take when harmful content is detected in the
|
4526
|
+
# input. Supported values include:
|
4527
|
+
#
|
4528
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
4529
|
+
#
|
4530
|
+
# * `NONE` – Take no action but return detection information in the
|
4531
|
+
# trace response.
|
4532
|
+
# @return [String]
|
4533
|
+
#
|
4534
|
+
# @!attribute [rw] output_action
|
4535
|
+
# Specifies the action to take when harmful content is detected in the
|
4536
|
+
# output. Supported values include:
|
4537
|
+
#
|
4538
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
4539
|
+
#
|
4540
|
+
# * `NONE` – Take no action but return detection information in the
|
4541
|
+
# trace response.
|
4542
|
+
# @return [String]
|
4543
|
+
#
|
4544
|
+
# @!attribute [rw] input_enabled
|
4545
|
+
# Specifies whether to enable guardrail evaluation on the input. When
|
4546
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
4547
|
+
# doesn't appear in the response.
|
4548
|
+
# @return [Boolean]
|
4549
|
+
#
|
4550
|
+
# @!attribute [rw] output_enabled
|
4551
|
+
# Specifies whether to enable guardrail evaluation on the output. When
|
4552
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
4553
|
+
# doesn't appear in the response.
|
4554
|
+
# @return [Boolean]
|
4555
|
+
#
|
4117
4556
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailTopicConfig AWS API Documentation
|
4118
4557
|
#
|
4119
4558
|
class GuardrailTopicConfig < Struct.new(
|
4120
4559
|
:name,
|
4121
4560
|
:definition,
|
4122
4561
|
:examples,
|
4123
|
-
:type
|
4124
|
-
|
4562
|
+
:type,
|
4563
|
+
:input_action,
|
4564
|
+
:output_action,
|
4565
|
+
:input_enabled,
|
4566
|
+
:output_enabled)
|
4567
|
+
SENSITIVE = [:name, :definition, :examples, :input_action, :output_action]
|
4125
4568
|
include Aws::Structure
|
4126
4569
|
end
|
4127
4570
|
|
@@ -4171,11 +4614,47 @@ module Aws::Bedrock
|
|
4171
4614
|
# Text of the word configured for the guardrail to block.
|
4172
4615
|
# @return [String]
|
4173
4616
|
#
|
4617
|
+
# @!attribute [rw] input_action
|
4618
|
+
# The action to take when harmful content is detected in the input.
|
4619
|
+
# Supported values include:
|
4620
|
+
#
|
4621
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
4622
|
+
#
|
4623
|
+
# * `NONE` – Take no action but return detection information in the
|
4624
|
+
# trace response.
|
4625
|
+
# @return [String]
|
4626
|
+
#
|
4627
|
+
# @!attribute [rw] output_action
|
4628
|
+
# The action to take when harmful content is detected in the output.
|
4629
|
+
# Supported values include:
|
4630
|
+
#
|
4631
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
4632
|
+
#
|
4633
|
+
# * `NONE` – Take no action but return detection information in the
|
4634
|
+
# trace response.
|
4635
|
+
# @return [String]
|
4636
|
+
#
|
4637
|
+
# @!attribute [rw] input_enabled
|
4638
|
+
# Indicates whether guardrail evaluation is enabled on the input. When
|
4639
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
4640
|
+
# doesn't appear in the response.
|
4641
|
+
# @return [Boolean]
|
4642
|
+
#
|
4643
|
+
# @!attribute [rw] output_enabled
|
4644
|
+
# Indicates whether guardrail evaluation is enabled on the output.
|
4645
|
+
# When disabled, you aren't charged for the evaluation. The
|
4646
|
+
# evaluation doesn't appear in the response.
|
4647
|
+
# @return [Boolean]
|
4648
|
+
#
|
4174
4649
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailWord AWS API Documentation
|
4175
4650
|
#
|
4176
4651
|
class GuardrailWord < Struct.new(
|
4177
|
-
:text
|
4178
|
-
|
4652
|
+
:text,
|
4653
|
+
:input_action,
|
4654
|
+
:output_action,
|
4655
|
+
:input_enabled,
|
4656
|
+
:output_enabled)
|
4657
|
+
SENSITIVE = [:input_action, :output_action]
|
4179
4658
|
include Aws::Structure
|
4180
4659
|
end
|
4181
4660
|
|
@@ -4185,11 +4664,47 @@ module Aws::Bedrock
|
|
4185
4664
|
# Text of the word configured for the guardrail to block.
|
4186
4665
|
# @return [String]
|
4187
4666
|
#
|
4667
|
+
# @!attribute [rw] input_action
|
4668
|
+
# Specifies the action to take when harmful content is detected in the
|
4669
|
+
# input. Supported values include:
|
4670
|
+
#
|
4671
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
4672
|
+
#
|
4673
|
+
# * `NONE` – Take no action but return detection information in the
|
4674
|
+
# trace response.
|
4675
|
+
# @return [String]
|
4676
|
+
#
|
4677
|
+
# @!attribute [rw] output_action
|
4678
|
+
# Specifies the action to take when harmful content is detected in the
|
4679
|
+
# output. Supported values include:
|
4680
|
+
#
|
4681
|
+
# * `BLOCK` – Block the content and replace it with blocked messaging.
|
4682
|
+
#
|
4683
|
+
# * `NONE` – Take no action but return detection information in the
|
4684
|
+
# trace response.
|
4685
|
+
# @return [String]
|
4686
|
+
#
|
4687
|
+
# @!attribute [rw] input_enabled
|
4688
|
+
# Specifies whether to enable guardrail evaluation on the intput. When
|
4689
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
4690
|
+
# doesn't appear in the response.
|
4691
|
+
# @return [Boolean]
|
4692
|
+
#
|
4693
|
+
# @!attribute [rw] output_enabled
|
4694
|
+
# Specifies whether to enable guardrail evaluation on the output. When
|
4695
|
+
# disabled, you aren't charged for the evaluation. The evaluation
|
4696
|
+
# doesn't appear in the response.
|
4697
|
+
# @return [Boolean]
|
4698
|
+
#
|
4188
4699
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GuardrailWordConfig AWS API Documentation
|
4189
4700
|
#
|
4190
4701
|
class GuardrailWordConfig < Struct.new(
|
4191
|
-
:text
|
4192
|
-
|
4702
|
+
:text,
|
4703
|
+
:input_action,
|
4704
|
+
:output_action,
|
4705
|
+
:input_enabled,
|
4706
|
+
:output_enabled)
|
4707
|
+
SENSITIVE = [:input_action, :output_action]
|
4193
4708
|
include Aws::Structure
|
4194
4709
|
end
|
4195
4710
|
|