Skip to content

Bedrock  >  Operations  >  get_guardrail

get_guardrail

Operation

get_guardrail async

get_guardrail(input: GetGuardrailInput, plugins: list[Plugin] | None = None) -> GetGuardrailOutput

Gets details about a guardrail. If you don't specify a version, the response returns details for the DRAFT version.

Parameters:

Name Type Description Default
input GetGuardrailInput

An instance of GetGuardrailInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
GetGuardrailOutput

An instance of GetGuardrailOutput.

Input

GetGuardrailInput dataclass

Dataclass for GetGuardrailInput structure.

Attributes

guardrail_identifier class-attribute instance-attribute
guardrail_identifier: str | None = None

The unique identifier of the guardrail for which to get details. This can be an ID or the ARN.

guardrail_version class-attribute instance-attribute
guardrail_version: str | None = None

The version of the guardrail for which to get details. If you don't specify a version, the response returns details for the DRAFT version.

Output

GetGuardrailOutput dataclass

Dataclass for GetGuardrailOutput structure.

Attributes

automated_reasoning_policy class-attribute instance-attribute
automated_reasoning_policy: GuardrailAutomatedReasoningPolicy | None = None

The current Automated Reasoning policy configuration for the guardrail, if any is configured.

blocked_input_messaging class-attribute instance-attribute
blocked_input_messaging: str = field(repr=False)

The message that the guardrail returns when it blocks a prompt.

blocked_outputs_messaging class-attribute instance-attribute
blocked_outputs_messaging: str = field(repr=False)

The message that the guardrail returns when it blocks a model response.

content_policy class-attribute instance-attribute
content_policy: GuardrailContentPolicy | None = None

The content policy that was configured for the guardrail.

contextual_grounding_policy class-attribute instance-attribute
contextual_grounding_policy: GuardrailContextualGroundingPolicy | None = None

The contextual grounding policy used in the guardrail.

created_at instance-attribute
created_at: datetime

The date and time at which the guardrail was created.

cross_region_details class-attribute instance-attribute
cross_region_details: GuardrailCrossRegionDetails | None = None

Details about the system-defined guardrail profile that you're using with your guardrail, including the guardrail profile ID and Amazon Resource Name (ARN).

description class-attribute instance-attribute
description: str | None = field(repr=False, default=None)

The description of the guardrail.

failure_recommendations class-attribute instance-attribute
failure_recommendations: list[str] | None = None

Appears if the status of the guardrail is FAILED. A list of recommendations to carry out before retrying the request.

guardrail_arn instance-attribute
guardrail_arn: str

The ARN of the guardrail.

guardrail_id instance-attribute
guardrail_id: str

The unique identifier of the guardrail.

kms_key_arn class-attribute instance-attribute
kms_key_arn: str | None = None

The ARN of the KMS key that encrypts the guardrail.

name class-attribute instance-attribute
name: str = field(repr=False)

The name of the guardrail.

sensitive_information_policy class-attribute instance-attribute
sensitive_information_policy: GuardrailSensitiveInformationPolicy | None = None

The sensitive information policy that was configured for the guardrail.

status instance-attribute

The status of the guardrail.

status_reasons class-attribute instance-attribute
status_reasons: list[str] | None = None

Appears if the status is FAILED. A list of reasons for why the guardrail failed to be created, updated, versioned, or deleted.

topic_policy class-attribute instance-attribute
topic_policy: GuardrailTopicPolicy | None = None

The topic policy that was configured for the guardrail.

updated_at instance-attribute
updated_at: datetime

The date and time at which the guardrail was updated.

version instance-attribute
version: str

The version of the guardrail.

word_policy class-attribute instance-attribute
word_policy: GuardrailWordPolicy | None = None

The word policy that was configured for the guardrail.