AWS SDK Version 3 for .NET
API Reference

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.

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.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.Bedrock.AmazonBedrockRequest
      Amazon.Bedrock.Model.CreateGuardrailRequest

Namespace: Amazon.Bedrock.Model
Assembly: AWSSDK.Bedrock.dll
Version: 3.x.y.z

Syntax

C#
public class CreateGuardrailRequest : AmazonBedrockRequest
         IAmazonWebServiceRequest

The CreateGuardrailRequest type exposes the following members

Constructors

NameDescription
Public Method CreateGuardrailRequest()

Properties

NameTypeDescription
Public Property BlockedInputMessaging System.String

Gets and sets the property BlockedInputMessaging.

The message to return when the guardrail blocks a prompt.

Public Property BlockedOutputsMessaging System.String

Gets and sets the property BlockedOutputsMessaging.

The message to return when the guardrail blocks a model response.

Public Property 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.

Public Property ContentPolicyConfig Amazon.Bedrock.Model.GuardrailContentPolicyConfig

Gets and sets the property ContentPolicyConfig.

The content filter policies to configure for the guardrail.

Public Property ContextualGroundingPolicyConfig Amazon.Bedrock.Model.GuardrailContextualGroundingPolicyConfig

Gets and sets the property ContextualGroundingPolicyConfig.

The contextual grounding policy configuration used to create a guardrail.

Public Property 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.

Public Property Description System.String

Gets and sets the property Description.

A description of the guardrail.

Public Property KmsKeyId System.String

Gets and sets the property KmsKeyId.

The ARN of the KMS key that you use to encrypt the guardrail.

Public Property Name System.String

Gets and sets the property Name.

The name to give the guardrail.

Public Property SensitiveInformationPolicyConfig Amazon.Bedrock.Model.GuardrailSensitiveInformationPolicyConfig

Gets and sets the property SensitiveInformationPolicyConfig.

The sensitive information policy to configure for the guardrail.

Public Property 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.

Public Property TopicPolicyConfig Amazon.Bedrock.Model.GuardrailTopicPolicyConfig

Gets and sets the property TopicPolicyConfig.

The topic policies to configure for the guardrail.

Public Property WordPolicyConfig Amazon.Bedrock.Model.GuardrailWordPolicyConfig

Gets and sets the property WordPolicyConfig.

The word policy you configure for the guardrail.

Version Information

.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