AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the CreateGuardrail operation. Creates a guardrail to block topics and to implement safeguards for your generative AI applications.
You can configure the following policies in a guardrail to avoid undesirable and harmful content, filter out denied topics and words, and remove sensitive information for privacy protection.
Content filters - Adjust filter strengths to block input prompts or model responses containing harmful content.
Denied topics - Define a set of topics that are undesirable in the context of your application. These topics will be blocked if detected in user queries or model responses.
Word filters - Configure filters to block undesirable words, phrases, and profanity. Such words can include offensive terms, competitor names etc.
Sensitive information filters - Block or mask sensitive information such as personally identifiable information (PII) or custom regex in user inputs and model responses.
In addition to the above policies, you can also configure the messages to be returned to the user if a user input or model response is in violation of the policies defined in the guardrail.
For more information, see Amazon Bedrock Guardrails in the Amazon Bedrock User Guide.
Namespace: Amazon.Bedrock.Model
Assembly: AWSSDK.Bedrock.dll
Version: 3.x.y.z
public class CreateGuardrailRequest : AmazonBedrockRequest IAmazonWebServiceRequest
The CreateGuardrailRequest type exposes the following members
Name | Description | |
---|---|---|
![]() |
CreateGuardrailRequest() |
Name | Type | Description | |
---|---|---|---|
![]() |
BlockedInputMessaging | System.String |
Gets and sets the property BlockedInputMessaging. The message to return when the guardrail blocks a prompt. |
![]() |
BlockedOutputsMessaging | System.String |
Gets and sets the property BlockedOutputsMessaging. The message to return when the guardrail blocks a model response. |
![]() |
ClientRequestToken | System.String |
Gets and sets the property ClientRequestToken. A unique, case-sensitive identifier to ensure that the API request completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency in the Amazon S3 User Guide. |
![]() |
ContentPolicyConfig | Amazon.Bedrock.Model.GuardrailContentPolicyConfig |
Gets and sets the property ContentPolicyConfig. The content filter policies to configure for the guardrail. |
![]() |
ContextualGroundingPolicyConfig | Amazon.Bedrock.Model.GuardrailContextualGroundingPolicyConfig |
Gets and sets the property ContextualGroundingPolicyConfig. The contextual grounding policy configuration used to create a guardrail. |
![]() |
CrossRegionConfig | Amazon.Bedrock.Model.GuardrailCrossRegionConfig |
Gets and sets the property CrossRegionConfig. The system-defined guardrail profile that you're using with your guardrail. Guardrail profiles define the destination Amazon Web Services Regions where guardrail inference requests can be automatically routed. For more information, see the Amazon Bedrock User Guide. |
![]() |
Description | System.String |
Gets and sets the property Description. A description of the guardrail. |
![]() |
KmsKeyId | System.String |
Gets and sets the property KmsKeyId. The ARN of the KMS key that you use to encrypt the guardrail. |
![]() |
Name | System.String |
Gets and sets the property Name. The name to give the guardrail. |
![]() |
SensitiveInformationPolicyConfig | Amazon.Bedrock.Model.GuardrailSensitiveInformationPolicyConfig |
Gets and sets the property SensitiveInformationPolicyConfig. The sensitive information policy to configure for the guardrail. |
![]() |
Tags | System.Collections.Generic.List<Amazon.Bedrock.Model.Tag> |
Gets and sets the property Tags. The tags that you want to attach to the guardrail. |
![]() |
TopicPolicyConfig | Amazon.Bedrock.Model.GuardrailTopicPolicyConfig |
Gets and sets the property TopicPolicyConfig. The topic policies to configure for the guardrail. |
![]() |
WordPolicyConfig | Amazon.Bedrock.Model.GuardrailWordPolicyConfig |
Gets and sets the property WordPolicyConfig. The word policy you configure for the guardrail. |
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5