Class v2.DlpServiceClient (3.2.1)

The Cloud Data Loss Prevention (DLP) API is a service that allows clients to detect the presence of Personally Identifiable Information (PII) and other privacy-sensitive data in user-supplied, unstructured data streams, like text blocks or images. The service also includes methods for sensitive data redaction and scheduling of data scans on Google Cloud Platform based data sets.

To learn more about concepts and find how-to guides see https://cloud.google.com/dlp/docs/. v2

Package

@google-cloud/dlp

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of DlpServiceClient.

Parameter
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

dlpServiceStub

dlpServiceStub?: Promise<{
        [name: string]: Function;
    }>;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

activateJobTrigger(request, options)

activateJobTrigger(request?: protos.google.privacy.dlp.v2.IActivateJobTriggerRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.IActivateJobTriggerRequest | undefined, {} | undefined]>;

Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IActivateJobTriggerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.IActivateJobTriggerRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [DlpJob]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the trigger to activate, for example
   *  `projects/dlp-test-project/jobTriggers/53234423`.
   */
  // const name = 'abc123'

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callActivateJobTrigger() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.activateJobTrigger(request);
    console.log(response);
  }

  callActivateJobTrigger();

activateJobTrigger(request, options, callback)

activateJobTrigger(request: protos.google.privacy.dlp.v2.IActivateJobTriggerRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.IActivateJobTriggerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IActivateJobTriggerRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.IActivateJobTriggerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

activateJobTrigger(request, callback)

activateJobTrigger(request: protos.google.privacy.dlp.v2.IActivateJobTriggerRequest, callback: Callback<protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.IActivateJobTriggerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IActivateJobTriggerRequest
callback Callback<protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.IActivateJobTriggerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

cancelDlpJob(request, options)

cancelDlpJob(request?: protos.google.privacy.dlp.v2.ICancelDlpJobRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.ICancelDlpJobRequest | undefined, {} | undefined]>;

Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to cancel the DlpJob, but success is not guaranteed. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICancelDlpJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.ICancelDlpJobRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the DlpJob resource to be cancelled.
   */
  // const name = 'abc123'

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callCancelDlpJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.cancelDlpJob(request);
    console.log(response);
  }

  callCancelDlpJob();

cancelDlpJob(request, options, callback)

cancelDlpJob(request: protos.google.privacy.dlp.v2.ICancelDlpJobRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.ICancelDlpJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICancelDlpJobRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.ICancelDlpJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

cancelDlpJob(request, callback)

cancelDlpJob(request: protos.google.privacy.dlp.v2.ICancelDlpJobRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.ICancelDlpJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICancelDlpJobRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.ICancelDlpJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createDeidentifyTemplate(request, options)

createDeidentifyTemplate(request?: protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest | undefined, {} | undefined]>;

Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [DeidentifyTemplate]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource name.
   *  The format of this value varies depending on the scope of the request
   *  (project or organization) and whether you have specified a processing
   *  location (https://cloud.google.com/dlp/docs/specifying-location):
   *  + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID * + Organizations scope, location specified:
* `organizations/`ORG_ID`/locations/`LOCATION_ID * + Organizations scope, no location specified (defaults to global):
* `organizations/`ORG_ID * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * parent=projects/example-project/locations/europe-west3 */ // const parent = 'abc123' /** * Required. The DeidentifyTemplate to create. */ // const deidentifyTemplate = {} /** * The template id can contain uppercase and lowercase letters, * numbers, and hyphens; that is, it must match the regular * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 * characters. Can be empty to allow the system to generate one. */ // const templateId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; // Instantiates a client const dlpClient = new DlpServiceClient(); async function callCreateDeidentifyTemplate() { // Construct request const request = { parent, deidentifyTemplate, }; // Run request const response = await dlpClient.createDeidentifyTemplate(request); console.log(response); } callCreateDeidentifyTemplate();

createDeidentifyTemplate(request, options, callback)

createDeidentifyTemplate(request: protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createDeidentifyTemplate(request, callback)

createDeidentifyTemplate(request: protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest
callback Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createDlpJob(request, options)

createDlpJob(request?: protos.google.privacy.dlp.v2.ICreateDlpJobRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.ICreateDlpJobRequest | undefined, {} | undefined]>;

Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICreateDlpJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.ICreateDlpJobRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [DlpJob]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource name.
   *  The format of this value varies depending on whether you have specified a
   *  processing
   *  location (https://cloud.google.com/dlp/docs/specifying-location):
   *  + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * parent=projects/example-project/locations/europe-west3 */ // const parent = 'abc123' /** * Set to control what and how to inspect. */ // const inspectJob = {} /** * Set to choose what metric to calculate. */ // const riskJob = {} /** * The job id can contain uppercase and lowercase letters, * numbers, and hyphens; that is, it must match the regular * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 * characters. Can be empty to allow the system to generate one. */ // const jobId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; // Instantiates a client const dlpClient = new DlpServiceClient(); async function callCreateDlpJob() { // Construct request const request = { parent, }; // Run request const response = await dlpClient.createDlpJob(request); console.log(response); } callCreateDlpJob();

createDlpJob(request, options, callback)

createDlpJob(request: protos.google.privacy.dlp.v2.ICreateDlpJobRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.ICreateDlpJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICreateDlpJobRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.ICreateDlpJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createDlpJob(request, callback)

createDlpJob(request: protos.google.privacy.dlp.v2.ICreateDlpJobRequest, callback: Callback<protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.ICreateDlpJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICreateDlpJobRequest
callback Callback<protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.ICreateDlpJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createInspectTemplate(request, options)

createInspectTemplate(request?: protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest | undefined, {} | undefined]>;

Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [InspectTemplate]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource name.
   *  The format of this value varies depending on the scope of the request
   *  (project or organization) and whether you have specified a processing
   *  location (https://cloud.google.com/dlp/docs/specifying-location):
   *  + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID * + Organizations scope, location specified:
* `organizations/`ORG_ID`/locations/`LOCATION_ID * + Organizations scope, no location specified (defaults to global):
* `organizations/`ORG_ID * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * parent=projects/example-project/locations/europe-west3 */ // const parent = 'abc123' /** * Required. The InspectTemplate to create. */ // const inspectTemplate = {} /** * The template id can contain uppercase and lowercase letters, * numbers, and hyphens; that is, it must match the regular * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 * characters. Can be empty to allow the system to generate one. */ // const templateId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; // Instantiates a client const dlpClient = new DlpServiceClient(); async function callCreateInspectTemplate() { // Construct request const request = { parent, inspectTemplate, }; // Run request const response = await dlpClient.createInspectTemplate(request); console.log(response); } callCreateInspectTemplate();

createInspectTemplate(request, options, callback)

createInspectTemplate(request: protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createInspectTemplate(request, callback)

createInspectTemplate(request: protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest, callback: Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest
callback Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createJobTrigger(request, options)

createJobTrigger(request?: protos.google.privacy.dlp.v2.ICreateJobTriggerRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.ICreateJobTriggerRequest | undefined, {} | undefined]>;

Creates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICreateJobTriggerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.ICreateJobTriggerRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [JobTrigger]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource name.
   *  The format of this value varies depending on whether you have specified a
   *  processing
   *  location (https://cloud.google.com/dlp/docs/specifying-location):
   *  + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * parent=projects/example-project/locations/europe-west3 */ // const parent = 'abc123' /** * Required. The JobTrigger to create. */ // const jobTrigger = {} /** * The trigger id can contain uppercase and lowercase letters, * numbers, and hyphens; that is, it must match the regular * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 * characters. Can be empty to allow the system to generate one. */ // const triggerId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; // Instantiates a client const dlpClient = new DlpServiceClient(); async function callCreateJobTrigger() { // Construct request const request = { parent, jobTrigger, }; // Run request const response = await dlpClient.createJobTrigger(request); console.log(response); } callCreateJobTrigger();

createJobTrigger(request, options, callback)

createJobTrigger(request: protos.google.privacy.dlp.v2.ICreateJobTriggerRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.ICreateJobTriggerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICreateJobTriggerRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.ICreateJobTriggerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createJobTrigger(request, callback)

createJobTrigger(request: protos.google.privacy.dlp.v2.ICreateJobTriggerRequest, callback: Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.ICreateJobTriggerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICreateJobTriggerRequest
callback Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.ICreateJobTriggerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createStoredInfoType(request, options)

createStoredInfoType(request?: protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest | undefined, {} | undefined]>;

Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [StoredInfoType]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource name.
   *  The format of this value varies depending on the scope of the request
   *  (project or organization) and whether you have specified a processing
   *  location (https://cloud.google.com/dlp/docs/specifying-location):
   *  + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID * + Organizations scope, location specified:
* `organizations/`ORG_ID`/locations/`LOCATION_ID * + Organizations scope, no location specified (defaults to global):
* `organizations/`ORG_ID * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * parent=projects/example-project/locations/europe-west3 */ // const parent = 'abc123' /** * Required. Configuration of the storedInfoType to create. */ // const config = {} /** * The storedInfoType ID can contain uppercase and lowercase letters, * numbers, and hyphens; that is, it must match the regular * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 * characters. Can be empty to allow the system to generate one. */ // const storedInfoTypeId = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; // Instantiates a client const dlpClient = new DlpServiceClient(); async function callCreateStoredInfoType() { // Construct request const request = { parent, config, }; // Run request const response = await dlpClient.createStoredInfoType(request); console.log(response); } callCreateStoredInfoType();

createStoredInfoType(request, options, callback)

createStoredInfoType(request: protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createStoredInfoType(request, callback)

createStoredInfoType(request: protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, callback: Callback<protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest
callback Callback<protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deidentifyContent(request, options)

deidentifyContent(request?: protos.google.privacy.dlp.v2.IDeidentifyContentRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IDeidentifyContentResponse, protos.google.privacy.dlp.v2.IDeidentifyContentRequest | undefined, {} | undefined]>;

De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn more.

When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeidentifyContentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IDeidentifyContentResponse, protos.google.privacy.dlp.v2.IDeidentifyContentRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [DeidentifyContentResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Parent resource name.
   *  The format of this value varies depending on whether you have specified a
   *  processing
   *  location (https://cloud.google.com/dlp/docs/specifying-location):
   *  + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * parent=projects/example-project/locations/europe-west3 */ // const parent = 'abc123' /** * Configuration for the de-identification of the content item. * Items specified here will override the template referenced by the * deidentify_template_name argument. */ // const deidentifyConfig = {} /** * Configuration for the inspector. * Items specified here will override the template referenced by the * inspect_template_name argument. */ // const inspectConfig = {} /** * The item to de-identify. Will be treated as text. */ // const item = {} /** * Template to use. Any configuration directly specified in * inspect_config will override those set in the template. Singular fields * that are set in this request will replace their corresponding fields in the * template. Repeated fields are appended. Singular sub-messages and groups * are recursively merged. */ // const inspectTemplateName = 'abc123' /** * Template to use. Any configuration directly specified in * deidentify_config will override those set in the template. Singular fields * that are set in this request will replace their corresponding fields in the * template. Repeated fields are appended. Singular sub-messages and groups * are recursively merged. */ // const deidentifyTemplateName = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; // Instantiates a client const dlpClient = new DlpServiceClient(); async function callDeidentifyContent() { // Construct request const request = {}; // Run request const response = await dlpClient.deidentifyContent(request); console.log(response); } callDeidentifyContent();

deidentifyContent(request, options, callback)

deidentifyContent(request: protos.google.privacy.dlp.v2.IDeidentifyContentRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyContentResponse, protos.google.privacy.dlp.v2.IDeidentifyContentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeidentifyContentRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IDeidentifyContentResponse, protos.google.privacy.dlp.v2.IDeidentifyContentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deidentifyContent(request, callback)

deidentifyContent(request: protos.google.privacy.dlp.v2.IDeidentifyContentRequest, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyContentResponse, protos.google.privacy.dlp.v2.IDeidentifyContentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeidentifyContentRequest
callback Callback<protos.google.privacy.dlp.v2.IDeidentifyContentResponse, protos.google.privacy.dlp.v2.IDeidentifyContentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteDeidentifyTemplate(request, options)

deleteDeidentifyTemplate(request?: protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest | undefined, {} | undefined]>;

Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the organization and deidentify template to be deleted,
   *  for example `organizations/433245324/deidentifyTemplates/432452342` or
   *  projects/project-id/deidentifyTemplates/432452342.
   */
  // const name = 'abc123'

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callDeleteDeidentifyTemplate() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.deleteDeidentifyTemplate(request);
    console.log(response);
  }

  callDeleteDeidentifyTemplate();

deleteDeidentifyTemplate(request, options, callback)

deleteDeidentifyTemplate(request: protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteDeidentifyTemplate(request, callback)

deleteDeidentifyTemplate(request: protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteDlpJob(request, options)

deleteDlpJob(request?: protos.google.privacy.dlp.v2.IDeleteDlpJobRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteDlpJobRequest | undefined, {} | undefined]>;

Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be cancelled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeleteDlpJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteDlpJobRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the DlpJob resource to be deleted.
   */
  // const name = 'abc123'

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callDeleteDlpJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.deleteDlpJob(request);
    console.log(response);
  }

  callDeleteDlpJob();

deleteDlpJob(request, options, callback)

deleteDlpJob(request: protos.google.privacy.dlp.v2.IDeleteDlpJobRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteDlpJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeleteDlpJobRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteDlpJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteDlpJob(request, callback)

deleteDlpJob(request: protos.google.privacy.dlp.v2.IDeleteDlpJobRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteDlpJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeleteDlpJobRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteDlpJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteInspectTemplate(request, options)

deleteInspectTemplate(request?: protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest | undefined, {} | undefined]>;

Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the organization and inspectTemplate to be deleted, for
   *  example `organizations/433245324/inspectTemplates/432452342` or
   *  projects/project-id/inspectTemplates/432452342.
   */
  // const name = 'abc123'

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callDeleteInspectTemplate() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.deleteInspectTemplate(request);
    console.log(response);
  }

  callDeleteInspectTemplate();

deleteInspectTemplate(request, options, callback)

deleteInspectTemplate(request: protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteInspectTemplate(request, callback)

deleteInspectTemplate(request: protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteJobTrigger(request, options)

deleteJobTrigger(request?: protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest | undefined, {} | undefined]>;

Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the project and the triggeredJob, for example
   *  `projects/dlp-test-project/jobTriggers/53234423`.
   */
  // const name = 'abc123'

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callDeleteJobTrigger() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.deleteJobTrigger(request);
    console.log(response);
  }

  callDeleteJobTrigger();

deleteJobTrigger(request, options, callback)

deleteJobTrigger(request: protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteJobTrigger(request, callback)

deleteJobTrigger(request: protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteStoredInfoType(request, options)

deleteStoredInfoType(request?: protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest | undefined, {} | undefined]>;

Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the organization and storedInfoType to be deleted, for
   *  example `organizations/433245324/storedInfoTypes/432452342` or
   *  projects/project-id/storedInfoTypes/432452342.
   */
  // const name = 'abc123'

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callDeleteStoredInfoType() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.deleteStoredInfoType(request);
    console.log(response);
  }

  callDeleteStoredInfoType();

deleteStoredInfoType(request, options, callback)

deleteStoredInfoType(request: protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteStoredInfoType(request, callback)

deleteStoredInfoType(request: protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

findingPath(project, location, finding)

findingPath(project: string, location: string, finding: string): string;

Return a fully-qualified finding resource name string.

Parameters
NameDescription
project string
location string
finding string
Returns
TypeDescription
string

{string} Resource name string.

finishDlpJob(request, options)

finishDlpJob(request?: protos.google.privacy.dlp.v2.IFinishDlpJobRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IFinishDlpJobRequest | undefined, {} | undefined]>;

Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run. Early access feature is in a pre-release state and might change or have limited support. For more information, see https://cloud.google.com/products#product-launch-stages.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IFinishDlpJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IFinishDlpJobRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the DlpJob resource to be cancelled.
   */
  // const name = 'abc123'

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callFinishDlpJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.finishDlpJob(request);
    console.log(response);
  }

  callFinishDlpJob();

finishDlpJob(request, options, callback)

finishDlpJob(request: protos.google.privacy.dlp.v2.IFinishDlpJobRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IFinishDlpJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IFinishDlpJobRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IFinishDlpJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

finishDlpJob(request, callback)

finishDlpJob(request: protos.google.privacy.dlp.v2.IFinishDlpJobRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IFinishDlpJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IFinishDlpJobRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.privacy.dlp.v2.IFinishDlpJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getDeidentifyTemplate(request, options)

getDeidentifyTemplate(request?: protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest | undefined, {} | undefined]>;

Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [DeidentifyTemplate]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the organization and deidentify template to be read, for
   *  example `organizations/433245324/deidentifyTemplates/432452342` or
   *  projects/project-id/deidentifyTemplates/432452342.
   */
  // const name = 'abc123'

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callGetDeidentifyTemplate() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.getDeidentifyTemplate(request);
    console.log(response);
  }

  callGetDeidentifyTemplate();

getDeidentifyTemplate(request, options, callback)

getDeidentifyTemplate(request: protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getDeidentifyTemplate(request, callback)

getDeidentifyTemplate(request: protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest
callback Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getDlpJob(request, options)

getDlpJob(request?: protos.google.privacy.dlp.v2.IGetDlpJobRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.IGetDlpJobRequest | undefined, {} | undefined]>;

Gets the latest state of a long-running DlpJob. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IGetDlpJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.IGetDlpJobRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [DlpJob]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the DlpJob resource.
   */
  // const name = 'abc123'

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callGetDlpJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.getDlpJob(request);
    console.log(response);
  }

  callGetDlpJob();

getDlpJob(request, options, callback)

getDlpJob(request: protos.google.privacy.dlp.v2.IGetDlpJobRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.IGetDlpJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IGetDlpJobRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.IGetDlpJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getDlpJob(request, callback)

getDlpJob(request: protos.google.privacy.dlp.v2.IGetDlpJobRequest, callback: Callback<protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.IGetDlpJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IGetDlpJobRequest
callback Callback<protos.google.privacy.dlp.v2.IDlpJob, protos.google.privacy.dlp.v2.IGetDlpJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getInspectTemplate(request, options)

getInspectTemplate(request?: protos.google.privacy.dlp.v2.IGetInspectTemplateRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IGetInspectTemplateRequest | undefined, {} | undefined]>;

Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IGetInspectTemplateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IGetInspectTemplateRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [InspectTemplate]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the organization and inspectTemplate to be read, for
   *  example `organizations/433245324/inspectTemplates/432452342` or
   *  projects/project-id/inspectTemplates/432452342.
   */
  // const name = 'abc123'

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callGetInspectTemplate() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.getInspectTemplate(request);
    console.log(response);
  }

  callGetInspectTemplate();

getInspectTemplate(request, options, callback)

getInspectTemplate(request: protos.google.privacy.dlp.v2.IGetInspectTemplateRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IGetInspectTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IGetInspectTemplateRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IGetInspectTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getInspectTemplate(request, callback)

getInspectTemplate(request: protos.google.privacy.dlp.v2.IGetInspectTemplateRequest, callback: Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IGetInspectTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IGetInspectTemplateRequest
callback Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IGetInspectTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getJobTrigger(request, options)

getJobTrigger(request?: protos.google.privacy.dlp.v2.IGetJobTriggerRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.IGetJobTriggerRequest | undefined, {} | undefined]>;

Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IGetJobTriggerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.IGetJobTriggerRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [JobTrigger]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the project and the triggeredJob, for example
   *  `projects/dlp-test-project/jobTriggers/53234423`.
   */
  // const name = 'abc123'

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callGetJobTrigger() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.getJobTrigger(request);
    console.log(response);
  }

  callGetJobTrigger();

getJobTrigger(request, options, callback)

getJobTrigger(request: protos.google.privacy.dlp.v2.IGetJobTriggerRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.IGetJobTriggerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IGetJobTriggerRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.IGetJobTriggerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getJobTrigger(request, callback)

getJobTrigger(request: protos.google.privacy.dlp.v2.IGetJobTriggerRequest, callback: Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.IGetJobTriggerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IGetJobTriggerRequest
callback Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.IGetJobTriggerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

getStoredInfoType(request, options)

getStoredInfoType(request?: protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest | undefined, {} | undefined]>;

Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [StoredInfoType]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the organization and storedInfoType to be read, for
   *  example `organizations/433245324/storedInfoTypes/432452342` or
   *  projects/project-id/storedInfoTypes/432452342.
   */
  // const name = 'abc123'

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callGetStoredInfoType() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.getStoredInfoType(request);
    console.log(response);
  }

  callGetStoredInfoType();

getStoredInfoType(request, options, callback)

getStoredInfoType(request: protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getStoredInfoType(request, callback)

getStoredInfoType(request: protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest, callback: Callback<protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest
callback Callback<protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

hybridInspectDlpJob(request, options)

hybridInspectDlpJob(request?: protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IHybridInspectResponse, protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest | undefined, {} | undefined]>;

Inspect hybrid content and store findings to a job. To review the findings inspect the job. Inspection will occur asynchronously. Early access feature is in a pre-release state and might change or have limited support. For more information, see https://cloud.google.com/products#product-launch-stages.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IHybridInspectResponse, protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [HybridInspectResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the job to execute a hybrid inspect on, for example
   *  `projects/dlp-test-project/dlpJob/53234423`.
   */
  // const name = 'abc123'
  /**
   *  The item to inspect.
   */
  // const hybridItem = {}

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callHybridInspectDlpJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.hybridInspectDlpJob(request);
    console.log(response);
  }

  callHybridInspectDlpJob();

hybridInspectDlpJob(request, options, callback)

hybridInspectDlpJob(request: protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IHybridInspectResponse, protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IHybridInspectResponse, protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

hybridInspectDlpJob(request, callback)

hybridInspectDlpJob(request: protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest, callback: Callback<protos.google.privacy.dlp.v2.IHybridInspectResponse, protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest
callback Callback<protos.google.privacy.dlp.v2.IHybridInspectResponse, protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

hybridInspectJobTrigger(request, options)

hybridInspectJobTrigger(request?: protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IHybridInspectResponse, protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest | undefined, {} | undefined]>;

Inspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger. Early access feature is in a pre-release state and might change or have limited support. For more information, see https://cloud.google.com/products#product-launch-stages.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IHybridInspectResponse, protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [HybridInspectResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the trigger to execute a hybrid inspect on, for example
   *  `projects/dlp-test-project/jobTriggers/53234423`.
   */
  // const name = 'abc123'
  /**
   *  The item to inspect.
   */
  // const hybridItem = {}

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callHybridInspectJobTrigger() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.hybridInspectJobTrigger(request);
    console.log(response);
  }

  callHybridInspectJobTrigger();

hybridInspectJobTrigger(request, options, callback)

hybridInspectJobTrigger(request: protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IHybridInspectResponse, protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IHybridInspectResponse, protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

hybridInspectJobTrigger(request, callback)

hybridInspectJobTrigger(request: protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, callback: Callback<protos.google.privacy.dlp.v2.IHybridInspectResponse, protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest
callback Callback<protos.google.privacy.dlp.v2.IHybridInspectResponse, protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

inspectContent(request, options)

inspectContent(request?: protos.google.privacy.dlp.v2.IInspectContentRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IInspectContentResponse, protos.google.privacy.dlp.v2.IInspectContentRequest | undefined, {} | undefined]>;

Finds potentially sensitive info in content. This method has limits on input size, processing time, and output size.

When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.

For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and https://cloud.google.com/dlp/docs/inspecting-text,

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IInspectContentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IInspectContentResponse, protos.google.privacy.dlp.v2.IInspectContentRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [InspectContentResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Parent resource name.
   *  The format of this value varies depending on whether you have specified a
   *  processing
   *  location (https://cloud.google.com/dlp/docs/specifying-location):
   *  + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * parent=projects/example-project/locations/europe-west3 */ // const parent = 'abc123' /** * Configuration for the inspector. What specified here will override * the template referenced by the inspect_template_name argument. */ // const inspectConfig = {} /** * The item to inspect. */ // const item = {} /** * Template to use. Any configuration directly specified in * inspect_config will override those set in the template. Singular fields * that are set in this request will replace their corresponding fields in the * template. Repeated fields are appended. Singular sub-messages and groups * are recursively merged. */ // const inspectTemplateName = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; // Instantiates a client const dlpClient = new DlpServiceClient(); async function callInspectContent() { // Construct request const request = {}; // Run request const response = await dlpClient.inspectContent(request); console.log(response); } callInspectContent();

inspectContent(request, options, callback)

inspectContent(request: protos.google.privacy.dlp.v2.IInspectContentRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IInspectContentResponse, protos.google.privacy.dlp.v2.IInspectContentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IInspectContentRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IInspectContentResponse, protos.google.privacy.dlp.v2.IInspectContentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

inspectContent(request, callback)

inspectContent(request: protos.google.privacy.dlp.v2.IInspectContentRequest, callback: Callback<protos.google.privacy.dlp.v2.IInspectContentResponse, protos.google.privacy.dlp.v2.IInspectContentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IInspectContentRequest
callback Callback<protos.google.privacy.dlp.v2.IInspectContentResponse, protos.google.privacy.dlp.v2.IInspectContentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listDeidentifyTemplates(request, options)

listDeidentifyTemplates(request?: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IDeidentifyTemplate[], protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest | null, protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse]>;

Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IDeidentifyTemplate[], protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest | null, protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [DeidentifyTemplate]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listDeidentifyTemplatesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listDeidentifyTemplates(request, options, callback)

listDeidentifyTemplates(request: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, options: CallOptions, callback: PaginationCallback<protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse | null | undefined, protos.google.privacy.dlp.v2.IDeidentifyTemplate>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest
options CallOptions
callback PaginationCallback<protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse | null | undefined, protos.google.privacy.dlp.v2.IDeidentifyTemplate>
Returns
TypeDescription
void

listDeidentifyTemplates(request, callback)

listDeidentifyTemplates(request: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, callback: PaginationCallback<protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse | null | undefined, protos.google.privacy.dlp.v2.IDeidentifyTemplate>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest
callback PaginationCallback<protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse | null | undefined, protos.google.privacy.dlp.v2.IDeidentifyTemplate>
Returns
TypeDescription
void

listDeidentifyTemplatesAsync(request, options)

listDeidentifyTemplatesAsync(request?: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, options?: CallOptions): AsyncIterable<protos.google.privacy.dlp.v2.IDeidentifyTemplate>;

Equivalent to listDeidentifyTemplates, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.privacy.dlp.v2.IDeidentifyTemplate>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [DeidentifyTemplate]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource name.
   *  The format of this value varies depending on the scope of the request
   *  (project or organization) and whether you have specified a processing
   *  location (https://cloud.google.com/dlp/docs/specifying-location):
   *  + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID * + Organizations scope, location specified:
* `organizations/`ORG_ID`/locations/`LOCATION_ID * + Organizations scope, no location specified (defaults to global):
* `organizations/`ORG_ID * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * parent=projects/example-project/locations/europe-west3 */ // const parent = 'abc123' /** * Page token to continue retrieval. Comes from previous call * to `ListDeidentifyTemplates`. */ // const pageToken = 'abc123' /** * Size of the page, can be limited by server. If zero server returns * a page of max size 100. */ // const pageSize = 1234 /** * Comma separated list of fields to order by, * followed by `asc` or `desc` postfix. This list is case-insensitive, * default sorting order is ascending, redundant space characters are * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: * - `create_time`: corresponds to time the template was created. * - `update_time`: corresponds to time the template was last updated. * - `name`: corresponds to template's name. * - `display_name`: corresponds to template's display name. */ // const orderBy = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; // Instantiates a client const dlpClient = new DlpServiceClient(); async function callListDeidentifyTemplates() { // Construct request const request = { parent, }; // Run request const iterable = await dlpClient.listDeidentifyTemplatesAsync(request); for await (const response of iterable) { console.log(response); } } callListDeidentifyTemplates();

listDeidentifyTemplatesStream(request, options)

listDeidentifyTemplatesStream(request?: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [DeidentifyTemplate] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listDeidentifyTemplatesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listDlpJobs(request, options)

listDlpJobs(request?: protos.google.privacy.dlp.v2.IListDlpJobsRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IDlpJob[], protos.google.privacy.dlp.v2.IListDlpJobsRequest | null, protos.google.privacy.dlp.v2.IListDlpJobsResponse]>;

Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListDlpJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IDlpJob[], protos.google.privacy.dlp.v2.IListDlpJobsRequest | null, protos.google.privacy.dlp.v2.IListDlpJobsResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [DlpJob]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listDlpJobsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listDlpJobs(request, options, callback)

listDlpJobs(request: protos.google.privacy.dlp.v2.IListDlpJobsRequest, options: CallOptions, callback: PaginationCallback<protos.google.privacy.dlp.v2.IListDlpJobsRequest, protos.google.privacy.dlp.v2.IListDlpJobsResponse | null | undefined, protos.google.privacy.dlp.v2.IDlpJob>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListDlpJobsRequest
options CallOptions
callback PaginationCallback<protos.google.privacy.dlp.v2.IListDlpJobsRequest, protos.google.privacy.dlp.v2.IListDlpJobsResponse | null | undefined, protos.google.privacy.dlp.v2.IDlpJob>
Returns
TypeDescription
void

listDlpJobs(request, callback)

listDlpJobs(request: protos.google.privacy.dlp.v2.IListDlpJobsRequest, callback: PaginationCallback<protos.google.privacy.dlp.v2.IListDlpJobsRequest, protos.google.privacy.dlp.v2.IListDlpJobsResponse | null | undefined, protos.google.privacy.dlp.v2.IDlpJob>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListDlpJobsRequest
callback PaginationCallback<protos.google.privacy.dlp.v2.IListDlpJobsRequest, protos.google.privacy.dlp.v2.IListDlpJobsResponse | null | undefined, protos.google.privacy.dlp.v2.IDlpJob>
Returns
TypeDescription
void

listDlpJobsAsync(request, options)

listDlpJobsAsync(request?: protos.google.privacy.dlp.v2.IListDlpJobsRequest, options?: CallOptions): AsyncIterable<protos.google.privacy.dlp.v2.IDlpJob>;

Equivalent to listDlpJobs, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListDlpJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.privacy.dlp.v2.IDlpJob>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [DlpJob]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource name.
   *  The format of this value varies depending on whether you have specified a
   *  processing
   *  location (https://cloud.google.com/dlp/docs/specifying-location):
   *  + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * parent=projects/example-project/locations/europe-west3 */ // const parent = 'abc123' /** * Allows filtering. * Supported syntax: * * Filter expressions are made up of one or more restrictions. * * Restrictions can be combined by `AND` or `OR` logical operators. A * sequence of restrictions implicitly uses `AND`. * * A restriction has the form of `{field} {operator} {value}`. * * Supported fields/values for inspect jobs: * - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY * - `trigger_name` - The resource name of the trigger that created job. * - 'end_time` - Corresponds to time the job finished. * - 'start_time` - Corresponds to time the job finished. * * Supported fields for risk analysis jobs: * - `state` - RUNNING|CANCELED|FINISHED|FAILED * - 'end_time` - Corresponds to time the job finished. * - 'start_time` - Corresponds to time the job finished. * * The operator must be `=` or `!=`. * Examples: * * inspected_storage = cloud_storage AND state = done * * inspected_storage = cloud_storage OR inspected_storage = bigquery * * inspected_storage = cloud_storage AND (state = done OR state = canceled) * * end_time > \"2017-12-12T00:00:00+00:00\" * The length of this field should be no more than 500 characters. */ // const filter = 'abc123' /** * The standard list page size. */ // const pageSize = 1234 /** * The standard list page token. */ // const pageToken = 'abc123' /** * The type of job. Defaults to `DlpJobType.INSPECT` */ // const type = {} /** * Comma separated list of fields to order by, * followed by `asc` or `desc` postfix. This list is case-insensitive, * default sorting order is ascending, redundant space characters are * insignificant. * Example: `name asc, end_time asc, create_time desc` * Supported fields are: * - `create_time`: corresponds to time the job was created. * - `end_time`: corresponds to time the job ended. * - `name`: corresponds to job's name. * - `state`: corresponds to `state` */ // const orderBy = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; // Instantiates a client const dlpClient = new DlpServiceClient(); async function callListDlpJobs() { // Construct request const request = { parent, }; // Run request const iterable = await dlpClient.listDlpJobsAsync(request); for await (const response of iterable) { console.log(response); } } callListDlpJobs();

listDlpJobsStream(request, options)

listDlpJobsStream(request?: protos.google.privacy.dlp.v2.IListDlpJobsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListDlpJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [DlpJob] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listDlpJobsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listInfoTypes(request, options)

listInfoTypes(request?: protos.google.privacy.dlp.v2.IListInfoTypesRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IListInfoTypesResponse, protos.google.privacy.dlp.v2.IListInfoTypesRequest | undefined, {} | undefined]>;

Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListInfoTypesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IListInfoTypesResponse, protos.google.privacy.dlp.v2.IListInfoTypesRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [ListInfoTypesResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The parent resource name.
   *  The format of this value is as follows:
   *      locations/LOCATION_ID
   */
  // const parent = 'abc123'
  /**
   *  BCP-47 language code for localized infoType friendly
   *  names. If omitted, or if localized strings are not available,
   *  en-US strings will be returned.
   */
  // const languageCode = 'abc123'
  /**
   *  filter to only return infoTypes supported by certain parts of the
   *  API. Defaults to supported_by=INSPECT.
   */
  // const filter = 'abc123'

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callListInfoTypes() {
    // Construct request
    const request = {};

    // Run request
    const response = await dlpClient.listInfoTypes(request);
    console.log(response);
  }

  callListInfoTypes();

listInfoTypes(request, options, callback)

listInfoTypes(request: protos.google.privacy.dlp.v2.IListInfoTypesRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IListInfoTypesResponse, protos.google.privacy.dlp.v2.IListInfoTypesRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListInfoTypesRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IListInfoTypesResponse, protos.google.privacy.dlp.v2.IListInfoTypesRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listInfoTypes(request, callback)

listInfoTypes(request: protos.google.privacy.dlp.v2.IListInfoTypesRequest, callback: Callback<protos.google.privacy.dlp.v2.IListInfoTypesResponse, protos.google.privacy.dlp.v2.IListInfoTypesRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListInfoTypesRequest
callback Callback<protos.google.privacy.dlp.v2.IListInfoTypesResponse, protos.google.privacy.dlp.v2.IListInfoTypesRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listInspectTemplates(request, options)

listInspectTemplates(request?: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IInspectTemplate[], protos.google.privacy.dlp.v2.IListInspectTemplatesRequest | null, protos.google.privacy.dlp.v2.IListInspectTemplatesResponse]>;

Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListInspectTemplatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IInspectTemplate[], protos.google.privacy.dlp.v2.IListInspectTemplatesRequest | null, protos.google.privacy.dlp.v2.IListInspectTemplatesResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [InspectTemplate]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listInspectTemplatesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listInspectTemplates(request, options, callback)

listInspectTemplates(request: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, options: CallOptions, callback: PaginationCallback<protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, protos.google.privacy.dlp.v2.IListInspectTemplatesResponse | null | undefined, protos.google.privacy.dlp.v2.IInspectTemplate>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListInspectTemplatesRequest
options CallOptions
callback PaginationCallback<protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, protos.google.privacy.dlp.v2.IListInspectTemplatesResponse | null | undefined, protos.google.privacy.dlp.v2.IInspectTemplate>
Returns
TypeDescription
void

listInspectTemplates(request, callback)

listInspectTemplates(request: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, callback: PaginationCallback<protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, protos.google.privacy.dlp.v2.IListInspectTemplatesResponse | null | undefined, protos.google.privacy.dlp.v2.IInspectTemplate>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListInspectTemplatesRequest
callback PaginationCallback<protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, protos.google.privacy.dlp.v2.IListInspectTemplatesResponse | null | undefined, protos.google.privacy.dlp.v2.IInspectTemplate>
Returns
TypeDescription
void

listInspectTemplatesAsync(request, options)

listInspectTemplatesAsync(request?: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, options?: CallOptions): AsyncIterable<protos.google.privacy.dlp.v2.IInspectTemplate>;

Equivalent to listInspectTemplates, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListInspectTemplatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.privacy.dlp.v2.IInspectTemplate>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [InspectTemplate]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource name.
   *  The format of this value varies depending on the scope of the request
   *  (project or organization) and whether you have specified a processing
   *  location (https://cloud.google.com/dlp/docs/specifying-location):
   *  + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID * + Organizations scope, location specified:
* `organizations/`ORG_ID`/locations/`LOCATION_ID * + Organizations scope, no location specified (defaults to global):
* `organizations/`ORG_ID * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * parent=projects/example-project/locations/europe-west3 */ // const parent = 'abc123' /** * Page token to continue retrieval. Comes from previous call * to `ListInspectTemplates`. */ // const pageToken = 'abc123' /** * Size of the page, can be limited by server. If zero server returns * a page of max size 100. */ // const pageSize = 1234 /** * Comma separated list of fields to order by, * followed by `asc` or `desc` postfix. This list is case-insensitive, * default sorting order is ascending, redundant space characters are * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: * - `create_time`: corresponds to time the template was created. * - `update_time`: corresponds to time the template was last updated. * - `name`: corresponds to template's name. * - `display_name`: corresponds to template's display name. */ // const orderBy = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; // Instantiates a client const dlpClient = new DlpServiceClient(); async function callListInspectTemplates() { // Construct request const request = { parent, }; // Run request const iterable = await dlpClient.listInspectTemplatesAsync(request); for await (const response of iterable) { console.log(response); } } callListInspectTemplates();

listInspectTemplatesStream(request, options)

listInspectTemplatesStream(request?: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListInspectTemplatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [InspectTemplate] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listInspectTemplatesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listJobTriggers(request, options)

listJobTriggers(request?: protos.google.privacy.dlp.v2.IListJobTriggersRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IJobTrigger[], protos.google.privacy.dlp.v2.IListJobTriggersRequest | null, protos.google.privacy.dlp.v2.IListJobTriggersResponse]>;

Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListJobTriggersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IJobTrigger[], protos.google.privacy.dlp.v2.IListJobTriggersRequest | null, protos.google.privacy.dlp.v2.IListJobTriggersResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [JobTrigger]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listJobTriggersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listJobTriggers(request, options, callback)

listJobTriggers(request: protos.google.privacy.dlp.v2.IListJobTriggersRequest, options: CallOptions, callback: PaginationCallback<protos.google.privacy.dlp.v2.IListJobTriggersRequest, protos.google.privacy.dlp.v2.IListJobTriggersResponse | null | undefined, protos.google.privacy.dlp.v2.IJobTrigger>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListJobTriggersRequest
options CallOptions
callback PaginationCallback<protos.google.privacy.dlp.v2.IListJobTriggersRequest, protos.google.privacy.dlp.v2.IListJobTriggersResponse | null | undefined, protos.google.privacy.dlp.v2.IJobTrigger>
Returns
TypeDescription
void

listJobTriggers(request, callback)

listJobTriggers(request: protos.google.privacy.dlp.v2.IListJobTriggersRequest, callback: PaginationCallback<protos.google.privacy.dlp.v2.IListJobTriggersRequest, protos.google.privacy.dlp.v2.IListJobTriggersResponse | null | undefined, protos.google.privacy.dlp.v2.IJobTrigger>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListJobTriggersRequest
callback PaginationCallback<protos.google.privacy.dlp.v2.IListJobTriggersRequest, protos.google.privacy.dlp.v2.IListJobTriggersResponse | null | undefined, protos.google.privacy.dlp.v2.IJobTrigger>
Returns
TypeDescription
void

listJobTriggersAsync(request, options)

listJobTriggersAsync(request?: protos.google.privacy.dlp.v2.IListJobTriggersRequest, options?: CallOptions): AsyncIterable<protos.google.privacy.dlp.v2.IJobTrigger>;

Equivalent to listJobTriggers, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListJobTriggersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.privacy.dlp.v2.IJobTrigger>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [JobTrigger]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource name.
   *  The format of this value varies depending on whether you have specified a
   *  processing
   *  location (https://cloud.google.com/dlp/docs/specifying-location):
   *  + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * parent=projects/example-project/locations/europe-west3 */ // const parent = 'abc123' /** * Page token to continue retrieval. Comes from previous call * to ListJobTriggers. `order_by` field must not * change for subsequent calls. */ // const pageToken = 'abc123' /** * Size of the page, can be limited by a server. */ // const pageSize = 1234 /** * Comma separated list of triggeredJob fields to order by, * followed by `asc` or `desc` postfix. This list is case-insensitive, * default sorting order is ascending, redundant space characters are * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: * - `create_time`: corresponds to time the JobTrigger was created. * - `update_time`: corresponds to time the JobTrigger was last updated. * - `last_run_time`: corresponds to the last time the JobTrigger ran. * - `name`: corresponds to JobTrigger's name. * - `display_name`: corresponds to JobTrigger's display name. * - `status`: corresponds to JobTrigger's status. */ // const orderBy = 'abc123' /** * Allows filtering. * Supported syntax: * * Filter expressions are made up of one or more restrictions. * * Restrictions can be combined by `AND` or `OR` logical operators. A * sequence of restrictions implicitly uses `AND`. * * A restriction has the form of `{field} {operator} {value}`. * * Supported fields/values for inspect jobs: * - `status` - HEALTHY|PAUSED|CANCELLED * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY * - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by * quotation marks. Nanoseconds are ignored. * - 'error_count' - Number of errors that have occurred while running. * * The operator must be `=` or `!=` for status and inspected_storage. * Examples: * * inspected_storage = cloud_storage AND status = HEALTHY * * inspected_storage = cloud_storage OR inspected_storage = bigquery * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) * * last_run_time > \"2017-12-12T00:00:00+00:00\" * The length of this field should be no more than 500 characters. */ // const filter = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; // Instantiates a client const dlpClient = new DlpServiceClient(); async function callListJobTriggers() { // Construct request const request = { parent, }; // Run request const iterable = await dlpClient.listJobTriggersAsync(request); for await (const response of iterable) { console.log(response); } } callListJobTriggers();

listJobTriggersStream(request, options)

listJobTriggersStream(request?: protos.google.privacy.dlp.v2.IListJobTriggersRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListJobTriggersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [JobTrigger] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listJobTriggersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listStoredInfoTypes(request, options)

listStoredInfoTypes(request?: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IStoredInfoType[], protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest | null, protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse]>;

Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IStoredInfoType[], protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest | null, protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [StoredInfoType]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listStoredInfoTypesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listStoredInfoTypes(request, options, callback)

listStoredInfoTypes(request: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, options: CallOptions, callback: PaginationCallback<protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse | null | undefined, protos.google.privacy.dlp.v2.IStoredInfoType>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest
options CallOptions
callback PaginationCallback<protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse | null | undefined, protos.google.privacy.dlp.v2.IStoredInfoType>
Returns
TypeDescription
void

listStoredInfoTypes(request, callback)

listStoredInfoTypes(request: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, callback: PaginationCallback<protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse | null | undefined, protos.google.privacy.dlp.v2.IStoredInfoType>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest
callback PaginationCallback<protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse | null | undefined, protos.google.privacy.dlp.v2.IStoredInfoType>
Returns
TypeDescription
void

listStoredInfoTypesAsync(request, options)

listStoredInfoTypesAsync(request?: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, options?: CallOptions): AsyncIterable<protos.google.privacy.dlp.v2.IStoredInfoType>;

Equivalent to listStoredInfoTypes, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.privacy.dlp.v2.IStoredInfoType>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [StoredInfoType]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource name.
   *  The format of this value varies depending on the scope of the request
   *  (project or organization) and whether you have specified a processing
   *  location (https://cloud.google.com/dlp/docs/specifying-location):
   *  + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID * + Organizations scope, location specified:
* `organizations/`ORG_ID`/locations/`LOCATION_ID * + Organizations scope, no location specified (defaults to global):
* `organizations/`ORG_ID * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * parent=projects/example-project/locations/europe-west3 */ // const parent = 'abc123' /** * Page token to continue retrieval. Comes from previous call * to `ListStoredInfoTypes`. */ // const pageToken = 'abc123' /** * Size of the page, can be limited by server. If zero server returns * a page of max size 100. */ // const pageSize = 1234 /** * Comma separated list of fields to order by, * followed by `asc` or `desc` postfix. This list is case-insensitive, * default sorting order is ascending, redundant space characters are * insignificant. * Example: `name asc, display_name, create_time desc` * Supported fields are: * - `create_time`: corresponds to time the most recent version of the * resource was created. * - `state`: corresponds to the state of the resource. * - `name`: corresponds to resource name. * - `display_name`: corresponds to info type's display name. */ // const orderBy = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; // Instantiates a client const dlpClient = new DlpServiceClient(); async function callListStoredInfoTypes() { // Construct request const request = { parent, }; // Run request const iterable = await dlpClient.listStoredInfoTypesAsync(request); for await (const response of iterable) { console.log(response); } } callListStoredInfoTypes();

listStoredInfoTypesStream(request, options)

listStoredInfoTypesStream(request?: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [StoredInfoType] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listStoredInfoTypesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

matchDeidentifyTemplateFromOrganizationDeidentifyTemplateName(organizationDeidentifyTemplateName)

matchDeidentifyTemplateFromOrganizationDeidentifyTemplateName(organizationDeidentifyTemplateName: string): string | number;

Parse the deidentify_template from OrganizationDeidentifyTemplate resource.

Parameter
NameDescription
organizationDeidentifyTemplateName string

A fully-qualified path representing organization_deidentify_template resource.

Returns
TypeDescription
string | number

{string} A string representing the deidentify_template.

matchDeidentifyTemplateFromOrganizationLocationDeidentifyTemplateName(organizationLocationDeidentifyTemplateName)

matchDeidentifyTemplateFromOrganizationLocationDeidentifyTemplateName(organizationLocationDeidentifyTemplateName: string): string | number;

Parse the deidentify_template from OrganizationLocationDeidentifyTemplate resource.

Parameter
NameDescription
organizationLocationDeidentifyTemplateName string

A fully-qualified path representing organization_location_deidentify_template resource.

Returns
TypeDescription
string | number

{string} A string representing the deidentify_template.

matchDeidentifyTemplateFromProjectDeidentifyTemplateName(projectDeidentifyTemplateName)

matchDeidentifyTemplateFromProjectDeidentifyTemplateName(projectDeidentifyTemplateName: string): string | number;

Parse the deidentify_template from ProjectDeidentifyTemplate resource.

Parameter
NameDescription
projectDeidentifyTemplateName string

A fully-qualified path representing project_deidentify_template resource.

Returns
TypeDescription
string | number

{string} A string representing the deidentify_template.

matchDeidentifyTemplateFromProjectLocationDeidentifyTemplateName(projectLocationDeidentifyTemplateName)

matchDeidentifyTemplateFromProjectLocationDeidentifyTemplateName(projectLocationDeidentifyTemplateName: string): string | number;

Parse the deidentify_template from ProjectLocationDeidentifyTemplate resource.

Parameter
NameDescription
projectLocationDeidentifyTemplateName string

A fully-qualified path representing project_location_deidentify_template resource.

Returns
TypeDescription
string | number

{string} A string representing the deidentify_template.

matchDlpJobFromProjectDlpJobName(projectDlpJobName)

matchDlpJobFromProjectDlpJobName(projectDlpJobName: string): string | number;

Parse the dlp_job from ProjectDlpJob resource.

Parameter
NameDescription
projectDlpJobName string

A fully-qualified path representing project_dlp_job resource.

Returns
TypeDescription
string | number

{string} A string representing the dlp_job.

matchDlpJobFromProjectLocationDlpJobName(projectLocationDlpJobName)

matchDlpJobFromProjectLocationDlpJobName(projectLocationDlpJobName: string): string | number;

Parse the dlp_job from ProjectLocationDlpJob resource.

Parameter
NameDescription
projectLocationDlpJobName string

A fully-qualified path representing project_location_dlp_job resource.

Returns
TypeDescription
string | number

{string} A string representing the dlp_job.

matchFindingFromFindingName(findingName)

matchFindingFromFindingName(findingName: string): string | number;

Parse the finding from Finding resource.

Parameter
NameDescription
findingName string

A fully-qualified path representing Finding resource.

Returns
TypeDescription
string | number

{string} A string representing the finding.

matchInspectTemplateFromOrganizationInspectTemplateName(organizationInspectTemplateName)

matchInspectTemplateFromOrganizationInspectTemplateName(organizationInspectTemplateName: string): string | number;

Parse the inspect_template from OrganizationInspectTemplate resource.

Parameter
NameDescription
organizationInspectTemplateName string

A fully-qualified path representing organization_inspect_template resource.

Returns
TypeDescription
string | number

{string} A string representing the inspect_template.

matchInspectTemplateFromOrganizationLocationInspectTemplateName(organizationLocationInspectTemplateName)

matchInspectTemplateFromOrganizationLocationInspectTemplateName(organizationLocationInspectTemplateName: string): string | number;

Parse the inspect_template from OrganizationLocationInspectTemplate resource.

Parameter
NameDescription
organizationLocationInspectTemplateName string

A fully-qualified path representing organization_location_inspect_template resource.

Returns
TypeDescription
string | number

{string} A string representing the inspect_template.

matchInspectTemplateFromProjectInspectTemplateName(projectInspectTemplateName)

matchInspectTemplateFromProjectInspectTemplateName(projectInspectTemplateName: string): string | number;

Parse the inspect_template from ProjectInspectTemplate resource.

Parameter
NameDescription
projectInspectTemplateName string

A fully-qualified path representing project_inspect_template resource.

Returns
TypeDescription
string | number

{string} A string representing the inspect_template.

matchInspectTemplateFromProjectLocationInspectTemplateName(projectLocationInspectTemplateName)

matchInspectTemplateFromProjectLocationInspectTemplateName(projectLocationInspectTemplateName: string): string | number;

Parse the inspect_template from ProjectLocationInspectTemplate resource.

Parameter
NameDescription
projectLocationInspectTemplateName string

A fully-qualified path representing project_location_inspect_template resource.

Returns
TypeDescription
string | number

{string} A string representing the inspect_template.

matchJobTriggerFromProjectJobTriggerName(projectJobTriggerName)

matchJobTriggerFromProjectJobTriggerName(projectJobTriggerName: string): string | number;

Parse the job_trigger from ProjectJobTrigger resource.

Parameter
NameDescription
projectJobTriggerName string

A fully-qualified path representing project_job_trigger resource.

Returns
TypeDescription
string | number

{string} A string representing the job_trigger.

matchJobTriggerFromProjectLocationJobTriggerName(projectLocationJobTriggerName)

matchJobTriggerFromProjectLocationJobTriggerName(projectLocationJobTriggerName: string): string | number;

Parse the job_trigger from ProjectLocationJobTrigger resource.

Parameter
NameDescription
projectLocationJobTriggerName string

A fully-qualified path representing project_location_job_trigger resource.

Returns
TypeDescription
string | number

{string} A string representing the job_trigger.

matchLocationFromFindingName(findingName)

matchLocationFromFindingName(findingName: string): string | number;

Parse the location from Finding resource.

Parameter
NameDescription
findingName string

A fully-qualified path representing Finding resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromOrganizationLocationDeidentifyTemplateName(organizationLocationDeidentifyTemplateName)

matchLocationFromOrganizationLocationDeidentifyTemplateName(organizationLocationDeidentifyTemplateName: string): string | number;

Parse the location from OrganizationLocationDeidentifyTemplate resource.

Parameter
NameDescription
organizationLocationDeidentifyTemplateName string

A fully-qualified path representing organization_location_deidentify_template resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromOrganizationLocationInspectTemplateName(organizationLocationInspectTemplateName)

matchLocationFromOrganizationLocationInspectTemplateName(organizationLocationInspectTemplateName: string): string | number;

Parse the location from OrganizationLocationInspectTemplate resource.

Parameter
NameDescription
organizationLocationInspectTemplateName string

A fully-qualified path representing organization_location_inspect_template resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromOrganizationLocationStoredInfoTypeName(organizationLocationStoredInfoTypeName)

matchLocationFromOrganizationLocationStoredInfoTypeName(organizationLocationStoredInfoTypeName: string): string | number;

Parse the location from OrganizationLocationStoredInfoType resource.

Parameter
NameDescription
organizationLocationStoredInfoTypeName string

A fully-qualified path representing organization_location_stored_info_type resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationDeidentifyTemplateName(projectLocationDeidentifyTemplateName)

matchLocationFromProjectLocationDeidentifyTemplateName(projectLocationDeidentifyTemplateName: string): string | number;

Parse the location from ProjectLocationDeidentifyTemplate resource.

Parameter
NameDescription
projectLocationDeidentifyTemplateName string

A fully-qualified path representing project_location_deidentify_template resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationDlpJobName(projectLocationDlpJobName)

matchLocationFromProjectLocationDlpJobName(projectLocationDlpJobName: string): string | number;

Parse the location from ProjectLocationDlpJob resource.

Parameter
NameDescription
projectLocationDlpJobName string

A fully-qualified path representing project_location_dlp_job resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationInspectTemplateName(projectLocationInspectTemplateName)

matchLocationFromProjectLocationInspectTemplateName(projectLocationInspectTemplateName: string): string | number;

Parse the location from ProjectLocationInspectTemplate resource.

Parameter
NameDescription
projectLocationInspectTemplateName string

A fully-qualified path representing project_location_inspect_template resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationJobTriggerName(projectLocationJobTriggerName)

matchLocationFromProjectLocationJobTriggerName(projectLocationJobTriggerName: string): string | number;

Parse the location from ProjectLocationJobTrigger resource.

Parameter
NameDescription
projectLocationJobTriggerName string

A fully-qualified path representing project_location_job_trigger resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationStoredInfoTypeName(projectLocationStoredInfoTypeName)

matchLocationFromProjectLocationStoredInfoTypeName(projectLocationStoredInfoTypeName: string): string | number;

Parse the location from ProjectLocationStoredInfoType resource.

Parameter
NameDescription
projectLocationStoredInfoTypeName string

A fully-qualified path representing project_location_stored_info_type resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchOrganizationFromOrganizationDeidentifyTemplateName(organizationDeidentifyTemplateName)

matchOrganizationFromOrganizationDeidentifyTemplateName(organizationDeidentifyTemplateName: string): string | number;

Parse the organization from OrganizationDeidentifyTemplate resource.

Parameter
NameDescription
organizationDeidentifyTemplateName string

A fully-qualified path representing organization_deidentify_template resource.

Returns
TypeDescription
string | number

{string} A string representing the organization.

matchOrganizationFromOrganizationInspectTemplateName(organizationInspectTemplateName)

matchOrganizationFromOrganizationInspectTemplateName(organizationInspectTemplateName: string): string | number;

Parse the organization from OrganizationInspectTemplate resource.

Parameter
NameDescription
organizationInspectTemplateName string

A fully-qualified path representing organization_inspect_template resource.

Returns
TypeDescription
string | number

{string} A string representing the organization.

matchOrganizationFromOrganizationLocationDeidentifyTemplateName(organizationLocationDeidentifyTemplateName)

matchOrganizationFromOrganizationLocationDeidentifyTemplateName(organizationLocationDeidentifyTemplateName: string): string | number;

Parse the organization from OrganizationLocationDeidentifyTemplate resource.

Parameter
NameDescription
organizationLocationDeidentifyTemplateName string

A fully-qualified path representing organization_location_deidentify_template resource.

Returns
TypeDescription
string | number

{string} A string representing the organization.

matchOrganizationFromOrganizationLocationInspectTemplateName(organizationLocationInspectTemplateName)

matchOrganizationFromOrganizationLocationInspectTemplateName(organizationLocationInspectTemplateName: string): string | number;

Parse the organization from OrganizationLocationInspectTemplate resource.

Parameter
NameDescription
organizationLocationInspectTemplateName string

A fully-qualified path representing organization_location_inspect_template resource.

Returns
TypeDescription
string | number

{string} A string representing the organization.

matchOrganizationFromOrganizationLocationStoredInfoTypeName(organizationLocationStoredInfoTypeName)

matchOrganizationFromOrganizationLocationStoredInfoTypeName(organizationLocationStoredInfoTypeName: string): string | number;

Parse the organization from OrganizationLocationStoredInfoType resource.

Parameter
NameDescription
organizationLocationStoredInfoTypeName string

A fully-qualified path representing organization_location_stored_info_type resource.

Returns
TypeDescription
string | number

{string} A string representing the organization.

matchOrganizationFromOrganizationName(organizationName)

matchOrganizationFromOrganizationName(organizationName: string): string | number;

Parse the organization from Organization resource.

Parameter
NameDescription
organizationName string

A fully-qualified path representing Organization resource.

Returns
TypeDescription
string | number

{string} A string representing the organization.

matchOrganizationFromOrganizationStoredInfoTypeName(organizationStoredInfoTypeName)

matchOrganizationFromOrganizationStoredInfoTypeName(organizationStoredInfoTypeName: string): string | number;

Parse the organization from OrganizationStoredInfoType resource.

Parameter
NameDescription
organizationStoredInfoTypeName string

A fully-qualified path representing organization_stored_info_type resource.

Returns
TypeDescription
string | number

{string} A string representing the organization.

matchProjectFromFindingName(findingName)

matchProjectFromFindingName(findingName: string): string | number;

Parse the project from Finding resource.

Parameter
NameDescription
findingName string

A fully-qualified path representing Finding resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectDeidentifyTemplateName(projectDeidentifyTemplateName)

matchProjectFromProjectDeidentifyTemplateName(projectDeidentifyTemplateName: string): string | number;

Parse the project from ProjectDeidentifyTemplate resource.

Parameter
NameDescription
projectDeidentifyTemplateName string

A fully-qualified path representing project_deidentify_template resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectDlpContentName(projectDlpContentName)

matchProjectFromProjectDlpContentName(projectDlpContentName: string): string | number;

Parse the project from ProjectDlpContent resource.

Parameter
NameDescription
projectDlpContentName string

A fully-qualified path representing project_dlpContent resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectDlpJobName(projectDlpJobName)

matchProjectFromProjectDlpJobName(projectDlpJobName: string): string | number;

Parse the project from ProjectDlpJob resource.

Parameter
NameDescription
projectDlpJobName string

A fully-qualified path representing project_dlp_job resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectInspectTemplateName(projectInspectTemplateName)

matchProjectFromProjectInspectTemplateName(projectInspectTemplateName: string): string | number;

Parse the project from ProjectInspectTemplate resource.

Parameter
NameDescription
projectInspectTemplateName string

A fully-qualified path representing project_inspect_template resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectJobTriggerName(projectJobTriggerName)

matchProjectFromProjectJobTriggerName(projectJobTriggerName: string): string | number;

Parse the project from ProjectJobTrigger resource.

Parameter
NameDescription
projectJobTriggerName string

A fully-qualified path representing project_job_trigger resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationDeidentifyTemplateName(projectLocationDeidentifyTemplateName)

matchProjectFromProjectLocationDeidentifyTemplateName(projectLocationDeidentifyTemplateName: string): string | number;

Parse the project from ProjectLocationDeidentifyTemplate resource.

Parameter
NameDescription
projectLocationDeidentifyTemplateName string

A fully-qualified path representing project_location_deidentify_template resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationDlpJobName(projectLocationDlpJobName)

matchProjectFromProjectLocationDlpJobName(projectLocationDlpJobName: string): string | number;

Parse the project from ProjectLocationDlpJob resource.

Parameter
NameDescription
projectLocationDlpJobName string

A fully-qualified path representing project_location_dlp_job resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationInspectTemplateName(projectLocationInspectTemplateName)

matchProjectFromProjectLocationInspectTemplateName(projectLocationInspectTemplateName: string): string | number;

Parse the project from ProjectLocationInspectTemplate resource.

Parameter
NameDescription
projectLocationInspectTemplateName string

A fully-qualified path representing project_location_inspect_template resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationJobTriggerName(projectLocationJobTriggerName)

matchProjectFromProjectLocationJobTriggerName(projectLocationJobTriggerName: string): string | number;

Parse the project from ProjectLocationJobTrigger resource.

Parameter
NameDescription
projectLocationJobTriggerName string

A fully-qualified path representing project_location_job_trigger resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationStoredInfoTypeName(projectLocationStoredInfoTypeName)

matchProjectFromProjectLocationStoredInfoTypeName(projectLocationStoredInfoTypeName: string): string | number;

Parse the project from ProjectLocationStoredInfoType resource.

Parameter
NameDescription
projectLocationStoredInfoTypeName string

A fully-qualified path representing project_location_stored_info_type resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
NameDescription
projectName string

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectStoredInfoTypeName(projectStoredInfoTypeName)

matchProjectFromProjectStoredInfoTypeName(projectStoredInfoTypeName: string): string | number;

Parse the project from ProjectStoredInfoType resource.

Parameter
NameDescription
projectStoredInfoTypeName string

A fully-qualified path representing project_stored_info_type resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchStoredInfoTypeFromOrganizationLocationStoredInfoTypeName(organizationLocationStoredInfoTypeName)

matchStoredInfoTypeFromOrganizationLocationStoredInfoTypeName(organizationLocationStoredInfoTypeName: string): string | number;

Parse the stored_info_type from OrganizationLocationStoredInfoType resource.

Parameter
NameDescription
organizationLocationStoredInfoTypeName string

A fully-qualified path representing organization_location_stored_info_type resource.

Returns
TypeDescription
string | number

{string} A string representing the stored_info_type.

matchStoredInfoTypeFromOrganizationStoredInfoTypeName(organizationStoredInfoTypeName)

matchStoredInfoTypeFromOrganizationStoredInfoTypeName(organizationStoredInfoTypeName: string): string | number;

Parse the stored_info_type from OrganizationStoredInfoType resource.

Parameter
NameDescription
organizationStoredInfoTypeName string

A fully-qualified path representing organization_stored_info_type resource.

Returns
TypeDescription
string | number

{string} A string representing the stored_info_type.

matchStoredInfoTypeFromProjectLocationStoredInfoTypeName(projectLocationStoredInfoTypeName)

matchStoredInfoTypeFromProjectLocationStoredInfoTypeName(projectLocationStoredInfoTypeName: string): string | number;

Parse the stored_info_type from ProjectLocationStoredInfoType resource.

Parameter
NameDescription
projectLocationStoredInfoTypeName string

A fully-qualified path representing project_location_stored_info_type resource.

Returns
TypeDescription
string | number

{string} A string representing the stored_info_type.

matchStoredInfoTypeFromProjectStoredInfoTypeName(projectStoredInfoTypeName)

matchStoredInfoTypeFromProjectStoredInfoTypeName(projectStoredInfoTypeName: string): string | number;

Parse the stored_info_type from ProjectStoredInfoType resource.

Parameter
NameDescription
projectStoredInfoTypeName string

A fully-qualified path representing project_stored_info_type resource.

Returns
TypeDescription
string | number

{string} A string representing the stored_info_type.

organizationDeidentifyTemplatePath(organization, deidentifyTemplate)

organizationDeidentifyTemplatePath(organization: string, deidentifyTemplate: string): string;

Return a fully-qualified organizationDeidentifyTemplate resource name string.

Parameters
NameDescription
organization string
deidentifyTemplate string
Returns
TypeDescription
string

{string} Resource name string.

organizationInspectTemplatePath(organization, inspectTemplate)

organizationInspectTemplatePath(organization: string, inspectTemplate: string): string;

Return a fully-qualified organizationInspectTemplate resource name string.

Parameters
NameDescription
organization string
inspectTemplate string
Returns
TypeDescription
string

{string} Resource name string.

organizationLocationDeidentifyTemplatePath(organization, location, deidentifyTemplate)

organizationLocationDeidentifyTemplatePath(organization: string, location: string, deidentifyTemplate: string): string;

Return a fully-qualified organizationLocationDeidentifyTemplate resource name string.

Parameters
NameDescription
organization string
location string
deidentifyTemplate string
Returns
TypeDescription
string

{string} Resource name string.

organizationLocationInspectTemplatePath(organization, location, inspectTemplate)

organizationLocationInspectTemplatePath(organization: string, location: string, inspectTemplate: string): string;

Return a fully-qualified organizationLocationInspectTemplate resource name string.

Parameters
NameDescription
organization string
location string
inspectTemplate string
Returns
TypeDescription
string

{string} Resource name string.

organizationLocationStoredInfoTypePath(organization, location, storedInfoType)

organizationLocationStoredInfoTypePath(organization: string, location: string, storedInfoType: string): string;

Return a fully-qualified organizationLocationStoredInfoType resource name string.

Parameters
NameDescription
organization string
location string
storedInfoType string
Returns
TypeDescription
string

{string} Resource name string.

organizationPath(organization)

organizationPath(organization: string): string;

Return a fully-qualified organization resource name string.

Parameter
NameDescription
organization string
Returns
TypeDescription
string

{string} Resource name string.

organizationStoredInfoTypePath(organization, storedInfoType)

organizationStoredInfoTypePath(organization: string, storedInfoType: string): string;

Return a fully-qualified organizationStoredInfoType resource name string.

Parameters
NameDescription
organization string
storedInfoType string
Returns
TypeDescription
string

{string} Resource name string.

projectDeidentifyTemplatePath(project, deidentifyTemplate)

projectDeidentifyTemplatePath(project: string, deidentifyTemplate: string): string;

Return a fully-qualified projectDeidentifyTemplate resource name string.

Parameters
NameDescription
project string
deidentifyTemplate string
Returns
TypeDescription
string

{string} Resource name string.

projectDlpContentPath(project)

projectDlpContentPath(project: string): string;

Return a fully-qualified projectDlpContent resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.

projectDlpJobPath(project, dlpJob)

projectDlpJobPath(project: string, dlpJob: string): string;

Return a fully-qualified projectDlpJob resource name string.

Parameters
NameDescription
project string
dlpJob string
Returns
TypeDescription
string

{string} Resource name string.

projectInspectTemplatePath(project, inspectTemplate)

projectInspectTemplatePath(project: string, inspectTemplate: string): string;

Return a fully-qualified projectInspectTemplate resource name string.

Parameters
NameDescription
project string
inspectTemplate string
Returns
TypeDescription
string

{string} Resource name string.

projectJobTriggerPath(project, jobTrigger)

projectJobTriggerPath(project: string, jobTrigger: string): string;

Return a fully-qualified projectJobTrigger resource name string.

Parameters
NameDescription
project string
jobTrigger string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationDeidentifyTemplatePath(project, location, deidentifyTemplate)

projectLocationDeidentifyTemplatePath(project: string, location: string, deidentifyTemplate: string): string;

Return a fully-qualified projectLocationDeidentifyTemplate resource name string.

Parameters
NameDescription
project string
location string
deidentifyTemplate string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationDlpJobPath(project, location, dlpJob)

projectLocationDlpJobPath(project: string, location: string, dlpJob: string): string;

Return a fully-qualified projectLocationDlpJob resource name string.

Parameters
NameDescription
project string
location string
dlpJob string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationInspectTemplatePath(project, location, inspectTemplate)

projectLocationInspectTemplatePath(project: string, location: string, inspectTemplate: string): string;

Return a fully-qualified projectLocationInspectTemplate resource name string.

Parameters
NameDescription
project string
location string
inspectTemplate string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationJobTriggerPath(project, location, jobTrigger)

projectLocationJobTriggerPath(project: string, location: string, jobTrigger: string): string;

Return a fully-qualified projectLocationJobTrigger resource name string.

Parameters
NameDescription
project string
location string
jobTrigger string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationStoredInfoTypePath(project, location, storedInfoType)

projectLocationStoredInfoTypePath(project: string, location: string, storedInfoType: string): string;

Return a fully-qualified projectLocationStoredInfoType resource name string.

Parameters
NameDescription
project string
location string
storedInfoType string
Returns
TypeDescription
string

{string} Resource name string.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.

projectStoredInfoTypePath(project, storedInfoType)

projectStoredInfoTypePath(project: string, storedInfoType: string): string;

Return a fully-qualified projectStoredInfoType resource name string.

Parameters
NameDescription
project string
storedInfoType string
Returns
TypeDescription
string

{string} Resource name string.

redactImage(request, options)

redactImage(request?: protos.google.privacy.dlp.v2.IRedactImageRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IRedactImageResponse, protos.google.privacy.dlp.v2.IRedactImageRequest | undefined, {} | undefined]>;

Redacts potentially sensitive info from an image. This method has limits on input size, processing time, and output size. See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to learn more.

When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IRedactImageRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IRedactImageResponse, protos.google.privacy.dlp.v2.IRedactImageRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [RedactImageResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Parent resource name.
   *  The format of this value varies depending on whether you have specified a
   *  processing
   *  location (https://cloud.google.com/dlp/docs/specifying-location):
   *  + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * parent=projects/example-project/locations/europe-west3 */ // const parent = 'abc123' /** * Configuration for the inspector. */ // const inspectConfig = {} /** * The configuration for specifying what content to redact from images. */ // const imageRedactionConfigs = 1234 /** * Whether the response should include findings along with the redacted * image. */ // const includeFindings = true /** * The content must be PNG, JPEG, SVG or BMP. */ // const byteItem = {} // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; // Instantiates a client const dlpClient = new DlpServiceClient(); async function callRedactImage() { // Construct request const request = {}; // Run request const response = await dlpClient.redactImage(request); console.log(response); } callRedactImage();

redactImage(request, options, callback)

redactImage(request: protos.google.privacy.dlp.v2.IRedactImageRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IRedactImageResponse, protos.google.privacy.dlp.v2.IRedactImageRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IRedactImageRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IRedactImageResponse, protos.google.privacy.dlp.v2.IRedactImageRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

redactImage(request, callback)

redactImage(request: protos.google.privacy.dlp.v2.IRedactImageRequest, callback: Callback<protos.google.privacy.dlp.v2.IRedactImageResponse, protos.google.privacy.dlp.v2.IRedactImageRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IRedactImageRequest
callback Callback<protos.google.privacy.dlp.v2.IRedactImageResponse, protos.google.privacy.dlp.v2.IRedactImageRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

reidentifyContent(request, options)

reidentifyContent(request?: protos.google.privacy.dlp.v2.IReidentifyContentRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IReidentifyContentResponse, protos.google.privacy.dlp.v2.IReidentifyContentRequest | undefined, {} | undefined]>;

Re-identifies content that has been de-identified. See https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IReidentifyContentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IReidentifyContentResponse, protos.google.privacy.dlp.v2.IReidentifyContentRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [ReidentifyContentResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent resource name.
   *  The format of this value varies depending on whether you have specified a
   *  processing
   *  location (https://cloud.google.com/dlp/docs/specifying-location):
   *  + Projects scope, location specified:
* `projects/`PROJECT_ID`/locations/`LOCATION_ID * + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: * parent=projects/example-project/locations/europe-west3 */ // const parent = 'abc123' /** * Configuration for the re-identification of the content item. * This field shares the same proto message type that is used for * de-identification, however its usage here is for the reversal of the * previous de-identification. Re-identification is performed by examining * the transformations used to de-identify the items and executing the * reverse. This requires that only reversible transformations * be provided here. The reversible transformations are: * - `CryptoDeterministicConfig` * - `CryptoReplaceFfxFpeConfig` */ // const reidentifyConfig = {} /** * Configuration for the inspector. */ // const inspectConfig = {} /** * The item to re-identify. Will be treated as text. */ // const item = {} /** * Template to use. Any configuration directly specified in * `inspect_config` will override those set in the template. Singular fields * that are set in this request will replace their corresponding fields in the * template. Repeated fields are appended. Singular sub-messages and groups * are recursively merged. */ // const inspectTemplateName = 'abc123' /** * Template to use. References an instance of `DeidentifyTemplate`. * Any configuration directly specified in `reidentify_config` or * `inspect_config` will override those set in the template. The * `DeidentifyTemplate` used must include only reversible transformations. * Singular fields that are set in this request will replace their * corresponding fields in the template. Repeated fields are appended. * Singular sub-messages and groups are recursively merged. */ // const reidentifyTemplateName = 'abc123' // Imports the Dlp library const {DlpServiceClient} = require('@google-cloud/dlp').v2; // Instantiates a client const dlpClient = new DlpServiceClient(); async function callReidentifyContent() { // Construct request const request = { parent, }; // Run request const response = await dlpClient.reidentifyContent(request); console.log(response); } callReidentifyContent();

reidentifyContent(request, options, callback)

reidentifyContent(request: protos.google.privacy.dlp.v2.IReidentifyContentRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IReidentifyContentResponse, protos.google.privacy.dlp.v2.IReidentifyContentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IReidentifyContentRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IReidentifyContentResponse, protos.google.privacy.dlp.v2.IReidentifyContentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

reidentifyContent(request, callback)

reidentifyContent(request: protos.google.privacy.dlp.v2.IReidentifyContentRequest, callback: Callback<protos.google.privacy.dlp.v2.IReidentifyContentResponse, protos.google.privacy.dlp.v2.IReidentifyContentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IReidentifyContentRequest
callback Callback<protos.google.privacy.dlp.v2.IReidentifyContentResponse, protos.google.privacy.dlp.v2.IReidentifyContentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateDeidentifyTemplate(request, options)

updateDeidentifyTemplate(request?: protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest | undefined, {} | undefined]>;

Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [DeidentifyTemplate]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of organization and deidentify template to be updated, for
   *  example `organizations/433245324/deidentifyTemplates/432452342` or
   *  projects/project-id/deidentifyTemplates/432452342.
   */
  // const name = 'abc123'
  /**
   *  New DeidentifyTemplate value.
   */
  // const deidentifyTemplate = {}
  /**
   *  Mask to control which fields get updated.
   */
  // const updateMask = {}

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callUpdateDeidentifyTemplate() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.updateDeidentifyTemplate(request);
    console.log(response);
  }

  callUpdateDeidentifyTemplate();

updateDeidentifyTemplate(request, options, callback)

updateDeidentifyTemplate(request: protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateDeidentifyTemplate(request, callback)

updateDeidentifyTemplate(request: protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest, callback: Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest
callback Callback<protos.google.privacy.dlp.v2.IDeidentifyTemplate, protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateInspectTemplate(request, options)

updateInspectTemplate(request?: protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest | undefined, {} | undefined]>;

Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [InspectTemplate]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of organization and inspectTemplate to be updated, for
   *  example `organizations/433245324/inspectTemplates/432452342` or
   *  projects/project-id/inspectTemplates/432452342.
   */
  // const name = 'abc123'
  /**
   *  New InspectTemplate value.
   */
  // const inspectTemplate = {}
  /**
   *  Mask to control which fields get updated.
   */
  // const updateMask = {}

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callUpdateInspectTemplate() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.updateInspectTemplate(request);
    console.log(response);
  }

  callUpdateInspectTemplate();

updateInspectTemplate(request, options, callback)

updateInspectTemplate(request: protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateInspectTemplate(request, callback)

updateInspectTemplate(request: protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest, callback: Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest
callback Callback<protos.google.privacy.dlp.v2.IInspectTemplate, protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateJobTrigger(request, options)

updateJobTrigger(request?: protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest | undefined, {} | undefined]>;

Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [JobTrigger]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the project and the triggeredJob, for example
   *  `projects/dlp-test-project/jobTriggers/53234423`.
   */
  // const name = 'abc123'
  /**
   *  New JobTrigger value.
   */
  // const jobTrigger = {}
  /**
   *  Mask to control which fields get updated.
   */
  // const updateMask = {}

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callUpdateJobTrigger() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.updateJobTrigger(request);
    console.log(response);
  }

  callUpdateJobTrigger();

updateJobTrigger(request, options, callback)

updateJobTrigger(request: protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateJobTrigger(request, callback)

updateJobTrigger(request: protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest, callback: Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest
callback Callback<protos.google.privacy.dlp.v2.IJobTrigger, protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateStoredInfoType(request, options)

updateStoredInfoType(request?: protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest, options?: CallOptions): Promise<[protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest | undefined, {} | undefined]>;

Updates the stored infoType by creating a new version. The existing version will continue to be used until the new version is ready. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.

Parameters
NameDescription
request protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [StoredInfoType]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of organization and storedInfoType to be updated, for
   *  example `organizations/433245324/storedInfoTypes/432452342` or
   *  projects/project-id/storedInfoTypes/432452342.
   */
  // const name = 'abc123'
  /**
   *  Updated configuration for the storedInfoType. If not provided, a new
   *  version of the storedInfoType will be created with the existing
   *  configuration.
   */
  // const config = {}
  /**
   *  Mask to control which fields get updated.
   */
  // const updateMask = {}

  // Imports the Dlp library
  const {DlpServiceClient} = require('@google-cloud/dlp').v2;

  // Instantiates a client
  const dlpClient = new DlpServiceClient();

  async function callUpdateStoredInfoType() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await dlpClient.updateStoredInfoType(request);
    console.log(response);
  }

  callUpdateStoredInfoType();

updateStoredInfoType(request, options, callback)

updateStoredInfoType(request: protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest, options: CallOptions, callback: Callback<protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest
options CallOptions
callback Callback<protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateStoredInfoType(request, callback)

updateStoredInfoType(request: protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest, callback: Callback<protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest
callback Callback<protos.google.privacy.dlp.v2.IStoredInfoType, protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void