GuardRailConfiguration

pydantic model openapi_client.models.guard_rail_configuration.GuardRailConfiguration

Nested guard rail policy/configuration object as stored on the DynamoDB item (Configuration attribute). Used by GET /ai/guard-rails/default; GET /ai/guard-rails/{id} flattens these fields onto the top-level response.

Fields:
field blocked_message: Optional[StrictStr] = None (alias 'BlockedMessage')

The message to display when content is blocked.

field filters_config: Optional[List[GuardRailFilterConfig]] = None (alias 'FiltersConfig')

Configuration for content filters.

field denied_topics: Optional[List[DeniedTopic]] = None (alias 'DeniedTopics')

List of topics that are denied.

field sensitive_information_filters: Optional[SensitiveInformationFilters] = None (alias 'SensitiveInformationFilters')
field custom_word_filters: Optional[CustomWordFilters] = None (alias 'CustomWordFilters')
field enable_contextual_grounding_check: Optional[StrictBool] = None (alias 'EnableContextualGroundingCheck')

Whether to enable contextual grounding check.

field grounding_threshold: Optional[Union[StrictFloat, StrictInt]] = None (alias 'GroundingThreshold')

The threshold for grounding check.

field relevance_threshold: Optional[Union[StrictFloat, StrictInt]] = None (alias 'RelevanceThreshold')

The threshold for relevance check.

field automated_reasoning_policies: Optional[Annotated[List[StrictStr], Field(max_length=2)]] = None (alias 'AutomatedReasoningPolicies')

Automated Reasoning policy ARNs attached to this guard rail.

field policies_confidence_threshold: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = None (alias 'PoliciesConfidenceThreshold')

Confidence threshold for Automated Reasoning policies.

to_str()

Returns the string representation of the model using alias

Return type:

str

to_json()

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str)

Create an instance of GuardRailConfiguration from a JSON string

Return type:

Optional[Self]

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

Return type:

Dict[str, Any]

classmethod from_dict(obj)

Create an instance of GuardRailConfiguration from a dict

Return type:

Optional[Self]