class PIIType
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Bedrock.Alpha.PIIType |
![]() | github.com/aws/aws-cdk-go/awsbedrockalpha/v2#PIIType |
![]() | software.amazon.awscdk.services.bedrock.alpha.PIIType |
![]() | aws_cdk.aws_bedrock_alpha.PIIType |
![]() | @aws-cdk/aws-bedrock-alpha » PIIType |
Implemented by
Canada
, Finance
, General
, Information
, UKSpecific
, USASpecific
Abstract base class for all PII types.
Example
const guardrail = new bedrock.Guardrail(this, 'bedrockGuardrails', {
guardrailName: 'my-BedrockGuardrails',
});
// Add PII filter for addresses with input/output actions
guardrail.addPIIFilter({
type: bedrock.GeneralPIIType.ADDRESS,
action: bedrock.GuardrailAction.BLOCK,
// below props are optional
inputAction: bedrock.GuardrailAction.BLOCK,
inputEnabled: true,
outputAction: bedrock.GuardrailAction.ANONYMIZE,
outputEnabled: true,
});
// Add PII filter for credit card numbers with input/output actions
guardrail.addPIIFilter({
type: bedrock.FinancePIIType.CREDIT_DEBIT_CARD_NUMBER,
action: bedrock.GuardrailAction.BLOCK,
// below props are optional
inputAction: bedrock.GuardrailAction.BLOCK,
inputEnabled: true,
outputAction: bedrock.GuardrailAction.ANONYMIZE,
outputEnabled: true,
});
// Add PII filter for email addresses
guardrail.addPIIFilter({
type: bedrock.GeneralPIIType.EMAIL,
action: bedrock.GuardrailAction.ANONYMIZE,
});
// Add PII filter for US Social Security Numbers
guardrail.addPIIFilter({
type: bedrock.USASpecificPIIType.US_SOCIAL_SECURITY_NUMBER,
action: bedrock.GuardrailAction.BLOCK,
});
// Add PII filter for IP addresses
guardrail.addPIIFilter({
type: bedrock.InformationTechnologyPIIType.IP_ADDRESS,
action: bedrock.GuardrailAction.ANONYMIZE,
});
Initializer (protected)
super(value: string)
Parameters
- value
string
The string value of the PII type.
Properties
Name | Type | Description |
---|---|---|
value | string | The string value of the PII type. |
value
Type:
string
The string value of the PII type.
Methods
Name | Description |
---|---|
to | Returns the string representation of the PII type. |
toString()
public toString(): string
Returns
string
Returns the string representation of the PII type.