Class PIIType
(experimental) Abstract base class for all PII types.
Inheritance
PIIType
Namespace: Amazon.CDK.AWS.Bedrock.Alpha
Assembly: Amazon.CDK.AWS.Bedrock.Alpha.dll
Syntax (csharp)
public abstract class PIIType : DeputyBase
Syntax (vb)
Public MustInherit Class PIIType Inherits DeputyBase
Remarks
Stability: Experimental
ExampleMetadata: fixture=default infused
Examples
var guardrail = new Guardrail(this, "bedrockGuardrails", new GuardrailProps {
GuardrailName = "my-BedrockGuardrails"
});
// Add PII filter for addresses with input/output actions
guardrail.AddPIIFilter(new PIIFilter {
Type = GeneralPIIType.ADDRESS,
Action = GuardrailAction.BLOCK,
// below props are optional
InputAction = GuardrailAction.BLOCK,
InputEnabled = true,
OutputAction = GuardrailAction.ANONYMIZE,
OutputEnabled = true
});
// Add PII filter for credit card numbers with input/output actions
guardrail.AddPIIFilter(new PIIFilter {
Type = FinancePIIType.CREDIT_DEBIT_CARD_NUMBER,
Action = GuardrailAction.BLOCK,
// below props are optional
InputAction = GuardrailAction.BLOCK,
InputEnabled = true,
OutputAction = GuardrailAction.ANONYMIZE,
OutputEnabled = true
});
// Add PII filter for email addresses
guardrail.AddPIIFilter(new PIIFilter {
Type = GeneralPIIType.EMAIL,
Action = GuardrailAction.ANONYMIZE
});
// Add PII filter for US Social Security Numbers
guardrail.AddPIIFilter(new PIIFilter {
Type = USASpecificPIIType.US_SOCIAL_SECURITY_NUMBER,
Action = GuardrailAction.BLOCK
});
// Add PII filter for IP addresses
guardrail.AddPIIFilter(new PIIFilter {
Type = InformationTechnologyPIIType.IP_ADDRESS,
Action = GuardrailAction.ANONYMIZE
});
Synopsis
Constructors
PIIType(string) | (experimental) The string value of the PII type. |
Properties
Value | (experimental) The string value of the PII type. |
Methods
ToString() | (experimental) Returns the string representation of the PII type. |
Constructors
PIIType(string)
(experimental) The string value of the PII type.
protected PIIType(string value)
Parameters
- value string
Remarks
Stability: Experimental
Properties
Value
(experimental) The string value of the PII type.
public virtual string Value { get; }
Property Value
Remarks
Stability: Experimental
Methods
ToString()
(experimental) Returns the string representation of the PII type.
public override string ToString()
Returns
The string value of the PII type.
Remarks
Stability: Experimental