Class RedactionLambda.Builder

    • Method Detail

      • create

        @Stability(Stable)
        public static RedactionLambda.Builder create​(software.constructs.Construct scope,
                                                     String id)
        Parameters:
        scope - This parameter is required.
        id - This parameter is required.
        Returns:
        a new instance of RedactionLambda.Builder.
      • confidenceThreshold

        @Stability(Stable)
        public RedactionLambda.Builder confidenceThreshold​(String confidenceThreshold)
        The minimum prediction confidence score above which PII classification and detection would be considered as final answer.

        Valid range (0.5 to 1.0).

        Default: '0.5'

        Parameters:
        confidenceThreshold - The minimum prediction confidence score above which PII classification and detection would be considered as final answer. This parameter is required.
        Returns:
        this
      • containsPiiEntitiesThreadCount

        @Stability(Stable)
        public RedactionLambda.Builder containsPiiEntitiesThreadCount​(String containsPiiEntitiesThreadCount)
        Number of threads to use for calling Comprehend's ContainsPiiEntities API.

        This controls the number of simultaneous calls that will be made from this Lambda.

        Default: '20'

        Parameters:
        containsPiiEntitiesThreadCount - Number of threads to use for calling Comprehend's ContainsPiiEntities API. This parameter is required.
        Returns:
        this
      • defaultLanguageCode

        @Stability(Stable)
        public RedactionLambda.Builder defaultLanguageCode​(String defaultLanguageCode)
        Default language of the text to be processed.

        This code will be used for interacting with Comprehend.

        Default: 'en'

        Parameters:
        defaultLanguageCode - Default language of the text to be processed. This parameter is required.
        Returns:
        this
      • detectPiiEntitiesThreadCount

        @Stability(Stable)
        public RedactionLambda.Builder detectPiiEntitiesThreadCount​(String detectPiiEntitiesThreadCount)
        Number of threads to use for calling Comprehend's DetectPiiEntities API.

        This controls the number of simultaneous calls that will be made from this Lambda.

        Default: '8'

        Parameters:
        detectPiiEntitiesThreadCount - Number of threads to use for calling Comprehend's DetectPiiEntities API. This parameter is required.
        Returns:
        this
      • documentMaxSize

        @Stability(Stable)
        public RedactionLambda.Builder documentMaxSize​(String documentMaxSize)
        Default maximum document size (in bytes) that this function can process otherwise will throw exception for too large document size.

        Default: '102400'

        Parameters:
        documentMaxSize - Default maximum document size (in bytes) that this function can process otherwise will throw exception for too large document size. This parameter is required.
        Returns:
        this
      • documentMaxSizeContainsPiiEntities

        @Stability(Stable)
        public RedactionLambda.Builder documentMaxSizeContainsPiiEntities​(String documentMaxSizeContainsPiiEntities)
        Maximum document size (in bytes) to be used for making calls to Comprehend's ContainsPiiEntities API.

        Default: '50000'

        Parameters:
        documentMaxSizeContainsPiiEntities - Maximum document size (in bytes) to be used for making calls to Comprehend's ContainsPiiEntities API. This parameter is required.
        Returns:
        this
      • documentMaxSizeDetectPiiEntities

        @Stability(Stable)
        public RedactionLambda.Builder documentMaxSizeDetectPiiEntities​(String documentMaxSizeDetectPiiEntities)
        Maximum document size (in bytes) to be used for making calls to Comprehend's DetectPiiEntities API.

        Default: '5000'

        Parameters:
        documentMaxSizeDetectPiiEntities - Maximum document size (in bytes) to be used for making calls to Comprehend's DetectPiiEntities API. This parameter is required.
        Returns:
        this
      • isPartialObjectSupported

        @Stability(Stable)
        public RedactionLambda.Builder isPartialObjectSupported​(String isPartialObjectSupported)
        Whether to support partial objects or not.

        Accessing partial object through http headers such byte-range can corrupt the object and/or affect PII detection accuracy.

        Default: 'false'

        Parameters:
        isPartialObjectSupported - Whether to support partial objects or not. This parameter is required.
        Returns:
        this
      • logLevel

        @Stability(Stable)
        public RedactionLambda.Builder logLevel​(String logLevel)
        Log level for Lambda function logging, e.g., ERROR, INFO, DEBUG, etc.

        Default: 'INFO'

        Parameters:
        logLevel - Log level for Lambda function logging, e.g., ERROR, INFO, DEBUG, etc. This parameter is required.
        Returns:
        this
      • maskCharacter

        @Stability(Stable)
        public RedactionLambda.Builder maskCharacter​(String maskCharacter)
        A character that replaces each character in the redacted PII entity.

        Default: '*'

        Parameters:
        maskCharacter - A character that replaces each character in the redacted PII entity. This parameter is required.
        Returns:
        this
      • maskMode

        @Stability(Stable)
        public RedactionLambda.Builder maskMode​(String maskMode)
        Specifies whether the PII entity is redacted with the mask character or the entity type.

        Valid values - REPLACE_WITH_PII_ENTITY_TYPE and MASK.

        Parameters:
        maskMode - Specifies whether the PII entity is redacted with the mask character or the entity type. This parameter is required.
        Returns:
        this
      • maxCharsOverlap

        @Stability(Stable)
        public RedactionLambda.Builder maxCharsOverlap​(String maxCharsOverlap)
        Maximum characters to overlap among segments of a document in case chunking is needed because of maximum document size limit.

        Default: '200'

        Parameters:
        maxCharsOverlap - Maximum characters to overlap among segments of a document in case chunking is needed because of maximum document size limit. This parameter is required.
        Returns:
        this
      • piiEntityTypes

        @Stability(Stable)
        public RedactionLambda.Builder piiEntityTypes​(String piiEntityTypes)
        List of comma separated PII entity types to be considered for redaction.

        Refer Comprehend's documentation page for list of supported PII entity types.

        Default: 'ALL'

        Parameters:
        piiEntityTypes - List of comma separated PII entity types to be considered for redaction. This parameter is required.
        Returns:
        this
      • publishCloudWatchMetrics

        @Stability(Stable)
        public RedactionLambda.Builder publishCloudWatchMetrics​(String publishCloudWatchMetrics)
        True if publish metrics to Cloudwatch, false otherwise.

        See README.md for details on CloudWatch metrics.

        Default: 'true'

        Parameters:
        publishCloudWatchMetrics - True if publish metrics to Cloudwatch, false otherwise. This parameter is required.
        Returns:
        this
      • semanticVersion

        @Stability(Stable)
        public RedactionLambda.Builder semanticVersion​(String semanticVersion)
        The version of the serverless application.

        Default: '1.0.2'

        Parameters:
        semanticVersion - The version of the serverless application. This parameter is required.
        Returns:
        this
      • subsegmentOverlappingTokens

        @Stability(Stable)
        public RedactionLambda.Builder subsegmentOverlappingTokens​(String subsegmentOverlappingTokens)
        Number of tokens/words to overlap among segments of a document in case chunking is needed because of maximum document size limit.

        Default: '20'

        Parameters:
        subsegmentOverlappingTokens - Number of tokens/words to overlap among segments of a document in case chunking is needed because of maximum document size limit. This parameter is required.
        Returns:
        this
      • unsupportedFileHandling

        @Stability(Stable)
        public RedactionLambda.Builder unsupportedFileHandling​(String unsupportedFileHandling)
        Handling logic for Unsupported files.

        Valid values are PASS and FAIL.

        Default: 'FAIL'

        Parameters:
        unsupportedFileHandling - Handling logic for Unsupported files. This parameter is required.
        Returns:
        this