Apply Guardrail
bedrockruntime_apply_guardrail | R Documentation |
The action to apply a guardrail¶
Description¶
The action to apply a guardrail.
Usage¶
Arguments¶
guardrailIdentifier
[required] The guardrail identifier used in the request to apply the guardrail.
guardrailVersion
[required] The guardrail version used in the request to apply the guardrail.
source
[required] The source of data used in the request to apply the guardrail.
content
[required] The content details used in the request to apply the guardrail.
Value¶
A list with the following syntax:
list(
usage = list(
topicPolicyUnits = 123,
contentPolicyUnits = 123,
wordPolicyUnits = 123,
sensitiveInformationPolicyUnits = 123,
sensitiveInformationPolicyFreeUnits = 123,
contextualGroundingPolicyUnits = 123
),
action = "NONE"|"GUARDRAIL_INTERVENED",
outputs = list(
list(
text = "string"
)
),
assessments = list(
list(
topicPolicy = list(
topics = list(
list(
name = "string",
type = "DENY",
action = "BLOCKED"
)
)
),
contentPolicy = list(
filters = list(
list(
type = "INSULTS"|"HATE"|"SEXUAL"|"VIOLENCE"|"MISCONDUCT"|"PROMPT_ATTACK",
confidence = "NONE"|"LOW"|"MEDIUM"|"HIGH",
action = "BLOCKED"
)
)
),
wordPolicy = list(
customWords = list(
list(
match = "string",
action = "BLOCKED"
)
),
managedWordLists = list(
list(
match = "string",
type = "PROFANITY",
action = "BLOCKED"
)
)
),
sensitiveInformationPolicy = list(
piiEntities = list(
list(
match = "string",
type = "ADDRESS"|"AGE"|"AWS_ACCESS_KEY"|"AWS_SECRET_KEY"|"CA_HEALTH_NUMBER"|"CA_SOCIAL_INSURANCE_NUMBER"|"CREDIT_DEBIT_CARD_CVV"|"CREDIT_DEBIT_CARD_EXPIRY"|"CREDIT_DEBIT_CARD_NUMBER"|"DRIVER_ID"|"EMAIL"|"INTERNATIONAL_BANK_ACCOUNT_NUMBER"|"IP_ADDRESS"|"LICENSE_PLATE"|"MAC_ADDRESS"|"NAME"|"PASSWORD"|"PHONE"|"PIN"|"SWIFT_CODE"|"UK_NATIONAL_HEALTH_SERVICE_NUMBER"|"UK_NATIONAL_INSURANCE_NUMBER"|"UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER"|"URL"|"USERNAME"|"US_BANK_ACCOUNT_NUMBER"|"US_BANK_ROUTING_NUMBER"|"US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER"|"US_PASSPORT_NUMBER"|"US_SOCIAL_SECURITY_NUMBER"|"VEHICLE_IDENTIFICATION_NUMBER",
action = "ANONYMIZED"|"BLOCKED"
)
),
regexes = list(
list(
name = "string",
match = "string",
regex = "string",
action = "ANONYMIZED"|"BLOCKED"
)
)
),
contextualGroundingPolicy = list(
filters = list(
list(
type = "GROUNDING"|"RELEVANCE",
threshold = 123.0,
score = 123.0,
action = "BLOCKED"|"NONE"
)
)
)
)
)
)