Class CustomDataIdentifier
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.logs.DataIdentifier
software.amazon.awscdk.services.logs.CustomDataIdentifier
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)",
date="2024-05-08T21:35:09.585Z")
@Stability(Stable)
public class CustomDataIdentifier
extends DataIdentifier
A custom data identifier.
Include a custom data identifier name and regular expression in the JSON policy used to define the data protection policy.
Example:
import software.amazon.awscdk.services.kinesisfirehose.alpha.*; import software.amazon.awscdk.services.kinesisfirehose.destinations.alpha.*; LogGroup logGroupDestination = LogGroup.Builder.create(this, "LogGroupLambdaAudit") .logGroupName("auditDestinationForCDK") .build(); Bucket bucket = new Bucket(this, "audit-bucket"); S3Bucket s3Destination = new S3Bucket(bucket); DeliveryStream deliveryStream = DeliveryStream.Builder.create(this, "Delivery Stream") .destinations(List.of(s3Destination)) .build(); DataProtectionPolicy dataProtectionPolicy = DataProtectionPolicy.Builder.create() .name("data protection policy") .description("policy description") .identifiers(List.of(DataIdentifier.DRIVERSLICENSE_US, // managed data identifier new DataIdentifier("EmailAddress"), // forward compatibility for new managed data identifiers new CustomDataIdentifier("EmployeeId", "EmployeeId-\\d{9}"))) // custom data identifier .logGroupAuditDestination(logGroupDestination) .s3BucketAuditDestination(bucket) .deliveryStreamNameAuditDestination(deliveryStream.getDeliveryStreamName()) .build(); LogGroup.Builder.create(this, "LogGroupLambda") .logGroupName("cdkIntegLogGroup") .dataProtectionPolicy(dataProtectionPolicy) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Field Summary
Fields inherited from class software.amazon.awscdk.services.logs.DataIdentifier
ADDRESS, AWSSECRETKEY, BANKACCOUNTNUMBER_DE, BANKACCOUNTNUMBER_ES, BANKACCOUNTNUMBER_FR, BANKACCOUNTNUMBER_GB, BANKACCOUNTNUMBER_IT, BANKACCOUNTNUMBER_US, CEPCODE_BR, CNPJ_BR, CPFCODE_BR, CREDITCARDEXPIRATION, CREDITCARDNUMBER, CREDITCARDSECURITYCODE, DRIVERSLICENSE_AT, DRIVERSLICENSE_AU, DRIVERSLICENSE_BE, DRIVERSLICENSE_BG, DRIVERSLICENSE_CA, DRIVERSLICENSE_CY, DRIVERSLICENSE_CZ, DRIVERSLICENSE_DE, DRIVERSLICENSE_DK, DRIVERSLICENSE_EE, DRIVERSLICENSE_ES, DRIVERSLICENSE_FI, DRIVERSLICENSE_FR, DRIVERSLICENSE_GB, DRIVERSLICENSE_GR, DRIVERSLICENSE_HR, DRIVERSLICENSE_HU, DRIVERSLICENSE_IE, DRIVERSLICENSE_IT, DRIVERSLICENSE_LT, DRIVERSLICENSE_LU, DRIVERSLICENSE_LV, DRIVERSLICENSE_MT, DRIVERSLICENSE_NL, DRIVERSLICENSE_PL, DRIVERSLICENSE_PT, DRIVERSLICENSE_RO, DRIVERSLICENSE_SE, DRIVERSLICENSE_SI, DRIVERSLICENSE_SK, DRIVERSLICENSE_US, DRUGENFORCEMENTAGENCYNUMBER_US, ELECTORALROLLNUMBER_GB, EMAILADDRESS, HEALTHCAREPROCEDURECODE_US, HEALTHINSURANCECARDNUMBER_EU, HEALTHINSURANCECLAIMNUMBER_US, HEALTHINSURANCENUMBER_FR, INDIVIDUALTAXIDENTIFICATIONNUMBER_US, INSEECODE_FR, IPADDRESS, LATLONG, MEDICAREBENEFICIARYNUMBER_US, NAME, NATIONALDRUGCODE_US, NATIONALIDENTIFICATIONNUMBER_DE, NATIONALIDENTIFICATIONNUMBER_ES, NATIONALIDENTIFICATIONNUMBER_IT, NATIONALINSURANCENUMBER_GB, NATIONALPROVIDERID_US, NHSNUMBER_GB, NIENUMBER_ES, NIFNUMBER_ES, OPENSSHPRIVATEKEY, PASSPORTNUMBER_CA, PASSPORTNUMBER_DE, PASSPORTNUMBER_ES, PASSPORTNUMBER_FR, PASSPORTNUMBER_GB, PASSPORTNUMBER_IT, PASSPORTNUMBER_US, PERMANENTRESIDENCENUMBER_CA, PERSONALHEALTHNUMBER_CA, PGPPRIVATEKEY, PHONENUMBER_BR, PHONENUMBER_DE, PHONENUMBER_ES, PHONENUMBER_FR, PHONENUMBER_GB, PHONENUMBER_IT, PHONENUMBER_US, PKCSPRIVATEKEY, POSTALCODE_CA, PUTTYPRIVATEKEY, RGNUMBER_BR, SOCIALINSURANCENUMBER_CA, SSN_ES, SSN_US, TAXID_DE, TAXID_ES, TAXID_FR, TAXID_GB, VEHICLEIDENTIFICATIONNUMBER, ZIPCODE_US
-
Constructor Summary
ModifierConstructorDescriptionCustomDataIdentifier
(String name, String regex) Create a custom data identifier.protected
CustomDataIdentifier
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CustomDataIdentifier
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
CustomDataIdentifier
protected CustomDataIdentifier(software.amazon.jsii.JsiiObjectRef objRef) -
CustomDataIdentifier
protected CustomDataIdentifier(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CustomDataIdentifier
Create a custom data identifier.- Parameters:
name
-- the name of the custom data identifier.
regex
-- the regular expresssion to detect and mask log events for.
-
-
Method Details
-
toString
String representation of a CustomDataIdentifier.- Overrides:
toString
in classDataIdentifier
- Returns:
- the name and RegEx of the custom data identifier
-
getName
- the name of the custom data identifier.
This cannot share the same name as a managed data identifier.
- Overrides:
getName
in classDataIdentifier
-
getRegex
- the regular expresssion to detect and mask log events for.
-