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.
The action to apply a guardrail.
For troubleshooting some of the common errors you might encounter when using the ApplyGuardrail
API, see Troubleshooting
Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide
For .NET Core this operation is only available in asynchronous form. Please refer to ApplyGuardrailAsync.
Namespace: Amazon.BedrockRuntime
Assembly: AWSSDK.BedrockRuntime.dll
Version: 3.x.y.z
public virtual ApplyGuardrailResponse ApplyGuardrail( ApplyGuardrailRequest request )
Container for the necessary parameters to execute the ApplyGuardrail service method.
Exception | Condition |
---|---|
AccessDeniedException | The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide |
InternalServerException | An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide |
ResourceNotFoundException | The specified resource ARN was not found. For troubleshooting this error, see ResourceNotFound in the Amazon Bedrock User Guide |
ServiceQuotaExceededException | Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later. |
ThrottlingException | Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide |
ValidationException | The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide |
.NET Framework:
Supported in: 4.5 and newer, 3.5