Skip to content
v2.277.0

SensitiveDataConfigurationProperty Struct ​

Configuration for detecting and redacting sensitive data in content.

Use this to control whether sensitive data is detected only or both detected and redacted, specify the scope of detection (standard output, custom output, or both), and configure specific PII entity types to detect along with how they should be masked when redacted.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';
const sensitiveDataConfigurationProperty: bedrock.CfnDataAutomationProject.SensitiveDataConfigurationProperty = {
  detectionMode: 'detectionMode',
  detectionScope: ['detectionScope'],
  piiEntitiesConfiguration: {
    piiEntityTypes: ['piiEntityTypes'],
    redactionMaskMode: 'redactionMaskMode',
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

sensitive_data_configuration_property = bedrock.CfnDataAutomationProject.SensitiveDataConfigurationProperty(
    detection_mode="detectionMode",
    detection_scope=["detectionScope"],
    pii_entities_configuration=bedrock.CfnDataAutomationProject.PIIEntitiesConfigurationProperty(
        pii_entity_types=["piiEntityTypes"],
        redaction_mask_mode="redactionMaskMode"
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.*;

SensitiveDataConfigurationProperty sensitiveDataConfigurationProperty = SensitiveDataConfigurationProperty.builder()
        .detectionMode("detectionMode")
        .detectionScope(List.of("detectionScope"))
        .piiEntitiesConfiguration(PIIEntitiesConfigurationProperty.builder()
                .piiEntityTypes(List.of("piiEntityTypes"))
                .redactionMaskMode("redactionMaskMode")
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock;

var sensitiveDataConfigurationProperty = new SensitiveDataConfigurationProperty {
    DetectionMode = "detectionMode",
    DetectionScope = new [] { "detectionScope" },
    PiiEntitiesConfiguration = new PIIEntitiesConfigurationProperty {
        PiiEntityTypes = new [] { "piiEntityTypes" },
        RedactionMaskMode = "redactionMaskMode"
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

sensitiveDataConfigurationProperty := &SensitiveDataConfigurationProperty{
	DetectionMode: jsii.String("detectionMode"),
	DetectionScope: []*string{
		jsii.String("detectionScope"),
	},
	PiiEntitiesConfiguration: &PIIEntitiesConfigurationProperty{
		PiiEntityTypes: []*string{
			jsii.String("piiEntityTypes"),
		},
		RedactionMaskMode: jsii.String("redactionMaskMode"),
	},
}

Properties ​

detectionModeoptionalstringdetection_modeoptionalstrdetectionModeoptionalStringDetectionModeoptionalstringDetectionModeoptional*string#
Specifies the mode for handling sensitive data detection.
notes

Set to DETECTION to only identify sensitive data without modifying content - this produces one output file per detection scope containing detection information with original unredacted content. Set to DETECTION_AND_REDACTION to both identify and mask sensitive data - this produces two output files per detection scope: one unredacted file with detection information and one redacted file with masking applied to sensitive content. For example, if detectionScope includes both STANDARD and CUSTOM with DETECTION_AND_REDACTION mode, four output files will be generated (two for standard output and two for custom output).

detectionScopeoptionalstring[]detection_scopeoptionaltyping.List[str]detectionScopeoptionalList<String>DetectionScopeoptionalstring[]DetectionScopeoptional*[]*string#
Defines which BDA output types to apply sensitive data detection to.
notes

Specify STANDARD to detect sensitive data in standard output, CUSTOM to detect in custom output (blueprint-based extraction), or both to apply detection to both output types. If not specified, defaults to both STANDARD and CUSTOM. The number of output files generated depends on both the detection mode and the scopes selected - each scope specified will produce its own set of output files according to the detection mode configured.

piiEntitiesConfigurationoptionalIResolvable | CfnDataAutomationProject.PIIEntitiesConfigurationPropertypii_entities_configurationoptionaltyping.Union[IResolvable, PIIEntitiesConfigurationProperty]piiEntitiesConfigurationoptionalIResolvablePiiEntitiesConfigurationoptionalIResolvablePiiEntitiesConfigurationoptionalinterface{}#
Configuration for detecting and redacting Personally Identifiable Information (PII) entities.