MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / deidentifyWithMask

Function deidentifyWithMask

dlp/deidentifyWithMask.js:46–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 const item = {value: string};
45
46 async function deidentifyWithMask() {
47 const request = {
48 parent: `projects/${projectId}/locations/global`,
49 deidentifyConfig: {
50 infoTypeTransformations: {
51 transformations: [
52 {
53 primitiveTransformation: {
54 characterMaskConfig: {
55 maskingCharacter: maskingCharacter,
56 numberToMask: numberToMask,
57 },
58 },
59 },
60 ],
61 },
62 },
63 item: item,
64 };
65
66 // Run deidentification request
67 const [response] = await dlp.deidentifyContent(request);
68 const deidentifiedItem = response.item;
69 console.log(deidentifiedItem.value);
70 }
71
72 deidentifyWithMask();
73 // [END dlp_deidentify_masking]

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected