Skip to content

ContainsPiiEntities

Source: src/AWS/Comprehend/ContainsPiiEntities.ts

Runtime binding for comprehend:ContainsPiiEntities — check whether the input text contains personally identifiable information, returning the PII entity-type labels present (without offsets; use DetectPiiEntities to locate them).

The binding takes no arguments and grants the action on * (the action has no resource-level IAM).

// init
const containsPiiEntities = yield* AWS.Comprehend.ContainsPiiEntities();
// runtime
const result = yield* containsPiiEntities({
Text: "My name is Jane Doe and my email is jane@example.com.",
LanguageCode: "en",
});
// result.Labels: [{ Name: "NAME" }, { Name: "EMAIL" }]