Class GuardrailAttributes.Builder
java.lang.Object
software.amazon.awscdk.services.bedrock.alpha.GuardrailAttributes.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GuardrailAttributes>
- Enclosing interface:
GuardrailAttributes
@Stability(Experimental)
public static final class GuardrailAttributes.Builder
extends Object
implements software.amazon.jsii.Builder<GuardrailAttributes>
A builder for
GuardrailAttributes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.guardrailArn
(String guardrailArn) Sets the value ofGuardrailAttributes.getGuardrailArn()
guardrailVersion
(String guardrailVersion) Sets the value ofGuardrailAttributes.getGuardrailVersion()
Sets the value ofGuardrailAttributes.getKmsKey()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
guardrailArn
Sets the value ofGuardrailAttributes.getGuardrailArn()
- Parameters:
guardrailArn
- The ARN of the guardrail. This parameter is required. At least one of guardrailArn or guardrailId must be defined in order to initialize a guardrail ref.- Returns:
this
-
guardrailVersion
@Stability(Experimental) public GuardrailAttributes.Builder guardrailVersion(String guardrailVersion) Sets the value ofGuardrailAttributes.getGuardrailVersion()
- Parameters:
guardrailVersion
- The version of the guardrail.- Returns:
this
-
kmsKey
Sets the value ofGuardrailAttributes.getKmsKey()
- Parameters:
kmsKey
- The KMS key of the guardrail if custom encryption is configured.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<GuardrailAttributes>
- Returns:
- a new instance of
GuardrailAttributes
- Throws:
NullPointerException
- if any required attribute was not provided
-