GuardrailArgs class
The set of arguments for Guardrail. The set of arguments for Guardrail.
Constructors
-
GuardrailArgs({Input<
GuardrailAction?> ? action, required Input<String> app, Input<GuardrailCodeCallback?> ? codeCallback, Input<GuardrailContentFilter?> ? contentFilter, Input<String?> ? deletionPolicy, Input<String?> ? description, required Input<String> displayName, Input<bool?> ? enabled, required Input<String> guardrailId, Input<GuardrailLlmPolicy?> ? llmPolicy, Input<GuardrailLlmPromptSecurity?> ? llmPromptSecurity, required Input<String> location, Input<GuardrailModelSafety?> ? modelSafety, Input<String?> ? project}) -
Creates a new GuardrailArgs.
actionAction that is taken when a certain precondition is met.appResource ID segment making up resourcename. It identifies the resource within its parent collection as described in https://google.aip.dev/122.codeCallbackGuardrail that blocks the conversation based on the code callbackscontentFilterGuardrail that bans certain content from being used in the conversation.deletionPolicyWhether Terraform will be prevented from destroying the resource. Defaults to DELETE.descriptionDescription of the guardrail.displayNameDisplay name of the guardrail.enabledWhether the guardrail is enabled.guardrailIdThe ID to use for the guardrail, which will become the final component ofllmPolicyGuardrail that blocks the conversation if the LLM response is consideredllmPromptSecurityGuardrail that blocks the conversation if the input is considered unsafelocationResource ID segment making up resourcename. It identifies the resource within its parent collection as described in https://google.aip.dev/122.modelSafetyModel safety settings overrides. When this is set, it will override theprojectThe ID of the project in which the resource belongs.const -
GuardrailArgs.fromMap(Map<
String, dynamic> map) -
factory
Properties
-
action
→ Input<
GuardrailAction?> ? -
Action that is taken when a certain precondition is met.
Structure is documented below.
final
-
app
→ Input<
String> -
Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.final -
codeCallback
→ Input<
GuardrailCodeCallback?> ? -
Guardrail that blocks the conversation based on the code callbacks
provided.
Structure is documented below.
final
-
contentFilter
→ Input<
GuardrailContentFilter?> ? -
Guardrail that bans certain content from being used in the conversation.
Structure is documented below.
final
-
deletionPolicy
→ Input<
String?> ? -
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
When a 'terraform destroy' or 'pulumi up' would delete the resource,
the command will fail if this field is set to "PREVENT" in Terraform state.
When set to "ABANDON", the command will remove the resource from Terraform
management without updating or deleting the resource in the API.
When set to "DELETE", deleting the resource is allowed.
final
-
description
→ Input<
String?> ? -
Description of the guardrail.
final
-
displayName
→ Input<
String> -
Display name of the guardrail.
final
-
enabled
→ Input<
bool?> ? -
Whether the guardrail is enabled.
final
-
guardrailId
→ Input<
String> -
The ID to use for the guardrail, which will become the final component of
the guardrail's resource name. If not provided, a unique ID will be
automatically assigned for the guardrail.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
llmPolicy
→ Input<
GuardrailLlmPolicy?> ? -
Guardrail that blocks the conversation if the LLM response is considered
violating the policy based on the LLM classification.
Structure is documented below.
final
-
llmPromptSecurity
→ Input<
GuardrailLlmPromptSecurity?> ? -
Guardrail that blocks the conversation if the input is considered unsafe
based on the LLM classification.
Structure is documented below.
final
-
location
→ Input<
String> -
Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.final -
modelSafety
→ Input<
GuardrailModelSafety?> ? -
Model safety settings overrides. When this is set, it will override the
default settings and trigger the guardrail if the response is considered
unsafe.
Structure is documented below.
final
-
project
→ Input<
String?> ? -
The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited