get_guardrail¶
Operation¶
get_guardrail
¶
get_guardrail(request: GetGuardrailInput | GetGuardrailInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetGuardrailInputDict]) -> 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 |
|---|---|---|---|
request
|
GetGuardrailInput | GetGuardrailInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[GetGuardrailInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
GetGuardrailOutput
|
An instance of |
get_guardrail
async
¶
get_guardrail(request: GetGuardrailInput | GetGuardrailInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetGuardrailInputDict]) -> 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 |
|---|---|---|---|
request
|
GetGuardrailInput | GetGuardrailInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[GetGuardrailInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
GetGuardrailOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
Output¶
GetGuardrailOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for GetGuardrailOutput structure.
Attributes¶
automated_reasoning_policy
class-attribute
instance-attribute
¶
automated_reasoning_policy: GuardrailAutomatedReasoningPolicy | None = ...
The current Automated Reasoning policy configuration for the guardrail, if any is configured.
blocked_input_messaging
instance-attribute
¶
blocked_input_messaging: str
The message that the guardrail returns when it blocks a prompt.
blocked_outputs_messaging
instance-attribute
¶
blocked_outputs_messaging: str
The message that the guardrail returns when it blocks a model response.
content_policy
class-attribute
instance-attribute
¶
content_policy: GuardrailContentPolicy | None = ...
The content policy that was configured for the guardrail.
contextual_grounding_policy
class-attribute
instance-attribute
¶
contextual_grounding_policy: GuardrailContextualGroundingPolicy | 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 = ...
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 = ...
The description of the guardrail.
failure_recommendations
class-attribute
instance-attribute
¶
Appears if the status of the guardrail is FAILED. A list of
recommendations to carry out before retrying the request.
kms_key_arn
class-attribute
instance-attribute
¶
kms_key_arn: str | None = ...
The ARN of the KMS key that encrypts the guardrail.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.
sensitive_information_policy
class-attribute
instance-attribute
¶
sensitive_information_policy: GuardrailSensitiveInformationPolicy | None = ...
The sensitive information policy that was configured for the guardrail.
status_reasons
class-attribute
instance-attribute
¶
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 = ...
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.
word_policy
class-attribute
instance-attribute
¶
word_policy: GuardrailWordPolicy | None = ...
The word policy that was configured for the guardrail.