Skip to content
v2.274.0

Experimental

@aws-cdk/aws-bedrock-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

FinancePIIType Class ​

Types of PII in the domain of Finance.

Example ​

ts
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,
});

Properties ​

CREDIT_DEBIT_CARD_CVVFinancePIITypecredit_debit_card_cvvFinancePIITypeCREDIT_DEBIT_CARD_CVVFinancePIITypeCREDIT_DEBIT_CARD_CVVFinancePIITypeCREDIT_DEBIT_CARD_CVVFinancePIITyperequiredstatic#
A three-digit card verification code (CVV) that is present on VISA, MasterCard, and Discover credit and debit cards.

For American Express credit or debit cards, the CVV is a four-digit numeric code.

CREDIT_DEBIT_CARD_EXPIRYFinancePIITypecredit_debit_card_expiryFinancePIITypeCREDIT_DEBIT_CARD_EXPIRYFinancePIITypeCREDIT_DEBIT_CARD_EXPIRYFinancePIITypeCREDIT_DEBIT_CARD_EXPIRYFinancePIITyperequiredstatic#
The expiration date for a credit or debit card.

This number is usually four digits long and is often formatted as month/year or MM/YY. Guardrails recognizes expiration dates such as 01/21, 01/2021, and Jan 2021.

CREDIT_DEBIT_CARD_NUMBERFinancePIITypecredit_debit_card_numberFinancePIITypeCREDIT_DEBIT_CARD_NUMBERFinancePIITypeCREDIT_DEBIT_CARD_NUMBERFinancePIITypeCREDIT_DEBIT_CARD_NUMBERFinancePIITyperequiredstatic#
The number for a credit or debit card.

These numbers can vary from 13 to 16 digits in length.

INTERNATIONAL_BANK_ACCOUNT_NUMBERFinancePIITypeinternational_bank_account_numberFinancePIITypeINTERNATIONAL_BANK_ACCOUNT_NUMBERFinancePIITypeINTERNATIONAL_BANK_ACCOUNT_NUMBERFinancePIITypeINTERNATIONAL_BANK_ACCOUNT_NUMBERFinancePIITyperequiredstatic#
An International Bank Account Number (IBAN).

It has specific formats in each country.

A four-digit personal identification number (PIN) with which you can access your bank account.
SWIFT_CODEFinancePIITypeswift_codeFinancePIITypeSWIFT_CODEFinancePIITypeSWIFT_CODEFinancePIITypeSWIFT_CODEFinancePIITyperequiredstatic#
A SWIFT code is a standard format of Bank Identifier Code (BIC) used to specify a particular bank or branch.

Banks use these codes for money transfers such as international wire transfers. SWIFT codes consist of eight or 11 characters.

valuestringvaluestrvalueStringValuestringValue*stringrequired#
The string value of the PII type.

Methods ​

toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns the string representation of the PII type.
returns

Returns: The string value of the PII type.