DlpServiceClient

DlpServiceClient

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/.

Constructor

new DlpServiceClient(optionsopt)

Construct an instance of DlpServiceClient.

Parameters:
Name Type Attributes Description
options object <optional>

The configuration object. See the subsequent parameters for more details.

Properties
Name Type Attributes Description
credentials object <optional>

Credentials object.

Properties
Name Type Attributes Description
client_email string <optional>
private_key string <optional>
email string <optional>

Account email address. Required when using a .pem or .p12 keyFilename.

keyFilename string <optional>

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option below is not necessary. NOTE: .pem and .p12 require you to specify options.email as well.

port number <optional>

The port on which to connect to the remote host.

projectId string <optional>

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

apiEndpoint string <optional>

The domain name of the API remote host.

Members

(static) apiEndpoint

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

(static) port

The port for this API service.

(static) scopes

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

(static) servicePath

The DNS address for this API service.

Methods

activateJobTrigger(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the trigger to activate, for example projects/dlp-test-project/jobTriggers/53234423.

options object <optional>

Call options. See CallOptions for more details.

cancelDlpJob(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the DlpJob resource to be cancelled.

options object <optional>

Call options. See CallOptions for more details.

close()

Terminate the GRPC channel and close the client.

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

createDeidentifyTemplate(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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:

  • 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
deidentifyTemplate google.privacy.dlp.v2.DeidentifyTemplate

Required. The DeidentifyTemplate to create.

templateId string

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.

locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

createDlpJob(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Parent resource name.

The format of this value varies depending on whether you have specified a processing 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
inspectJob google.privacy.dlp.v2.InspectJobConfig

Set to control what and how to inspect.

riskJob google.privacy.dlp.v2.RiskAnalysisJobConfig

Set to choose what metric to calculate.

jobId string

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.

locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

createInspectTemplate(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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:

  • 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
inspectTemplate google.privacy.dlp.v2.InspectTemplate

Required. The InspectTemplate to create.

templateId string

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.

locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

createJobTrigger(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Parent resource name.

The format of this value varies depending on whether you have specified a processing 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
jobTrigger google.privacy.dlp.v2.JobTrigger

Required. The JobTrigger to create.

triggerId string

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.

locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

createStoredInfoType(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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:

  • 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
config google.privacy.dlp.v2.StoredInfoTypeConfig

Required. Configuration of the storedInfoType to create.

storedInfoTypeId string

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.

locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

deidentifyContent(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Parent resource name.

The format of this value varies depending on whether you have specified a processing 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
deidentifyConfig google.privacy.dlp.v2.DeidentifyConfig

Configuration for the de-identification of the content item. Items specified here will override the template referenced by the deidentify_template_name argument.

inspectConfig google.privacy.dlp.v2.InspectConfig

Configuration for the inspector. Items specified here will override the template referenced by the inspect_template_name argument.

item google.privacy.dlp.v2.ContentItem

The item to de-identify. Will be treated as text.

inspectTemplateName string

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.

deidentifyTemplateName string

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.

locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

deleteDeidentifyTemplate(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the organization and deidentify template to be deleted, for example organizations/433245324/deidentifyTemplates/432452342 or projects/project-id/deidentifyTemplates/432452342.

options object <optional>

Call options. See CallOptions for more details.

deleteDlpJob(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the DlpJob resource to be deleted.

options object <optional>

Call options. See CallOptions for more details.

deleteInspectTemplate(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the organization and inspectTemplate to be deleted, for example organizations/433245324/inspectTemplates/432452342 or projects/project-id/inspectTemplates/432452342.

options object <optional>

Call options. See CallOptions for more details.

deleteJobTrigger(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the project and the triggeredJob, for example projects/dlp-test-project/jobTriggers/53234423.

options object <optional>

Call options. See CallOptions for more details.

deleteStoredInfoType(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the organization and storedInfoType to be deleted, for example organizations/433245324/storedInfoTypes/432452342 or projects/project-id/storedInfoTypes/432452342.

options object <optional>

Call options. See CallOptions for more details.

findingPath(project, location, finding) → {string}

Return a fully-qualified finding resource name string.

Parameters:
Name Type Description
project string
location string
finding string

finishDlpJob(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the DlpJob resource to be cancelled.

options object <optional>

Call options. See CallOptions for more details.

getDeidentifyTemplate(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the organization and deidentify template to be read, for example organizations/433245324/deidentifyTemplates/432452342 or projects/project-id/deidentifyTemplates/432452342.

options object <optional>

Call options. See CallOptions for more details.

getDlpJob(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the DlpJob resource.

options object <optional>

Call options. See CallOptions for more details.

getInspectTemplate(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the organization and inspectTemplate to be read, for example organizations/433245324/inspectTemplates/432452342 or projects/project-id/inspectTemplates/432452342.

options object <optional>

Call options. See CallOptions for more details.

getJobTrigger(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the project and the triggeredJob, for example projects/dlp-test-project/jobTriggers/53234423.

options object <optional>

Call options. See CallOptions for more details.

getProjectId(callback)

Return the project ID used by this class.

Parameters:
Name Type Description
callback function

the callback to be called with the current project Id.

getStoredInfoType(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the organization and storedInfoType to be read, for example organizations/433245324/storedInfoTypes/432452342 or projects/project-id/storedInfoTypes/432452342.

options object <optional>

Call options. See CallOptions for more details.

hybridInspectDlpJob(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the job to execute a hybrid inspect on, for example projects/dlp-test-project/dlpJob/53234423.

hybridItem google.privacy.dlp.v2.HybridContentItem

The item to inspect.

options object <optional>

Call options. See CallOptions for more details.

hybridInspectJobTrigger(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the trigger to execute a hybrid inspect on, for example projects/dlp-test-project/jobTriggers/53234423.

hybridItem google.privacy.dlp.v2.HybridContentItem

The item to inspect.

options object <optional>

Call options. See CallOptions for more details.

initialize() → {Promise}

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.

inspectContent(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Parent resource name.

The format of this value varies depending on whether you have specified a processing 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
inspectConfig google.privacy.dlp.v2.InspectConfig

Configuration for the inspector. What specified here will override the template referenced by the inspect_template_name argument.

item google.privacy.dlp.v2.ContentItem

The item to inspect.

inspectTemplateName string

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.

locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

listDeidentifyTemplates(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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:

  • 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
pageToken string

Page token to continue retrieval. Comes from previous call to ListDeidentifyTemplates.

pageSize number

Size of the page, can be limited by server. If zero server returns a page of max size 100.

orderBy string

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.
locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

listDeidentifyTemplatesAsync(request, optionsopt) → {Object}

Equivalent to listDeidentifyTemplates, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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:

  • 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
pageToken string

Page token to continue retrieval. Comes from previous call to ListDeidentifyTemplates.

pageSize number

Size of the page, can be limited by server. If zero server returns a page of max size 100.

orderBy string

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.
locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

listDeidentifyTemplatesStream(request, optionsopt) → {Stream}

Equivalent to listDeidentifyTemplates, but returns a NodeJS Stream object.

This fetches the paged responses for listDeidentifyTemplates continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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:

  • 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
pageToken string

Page token to continue retrieval. Comes from previous call to ListDeidentifyTemplates.

pageSize number

Size of the page, can be limited by server. If zero server returns a page of max size 100.

orderBy string

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.
locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

See:

listDlpJobs(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Parent resource name.

The format of this value varies depending on whether you have specified a processing 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
filter string

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.

pageSize number

The standard list page size.

pageToken string

The standard list page token.

type google.privacy.dlp.v2.DlpJobType

The type of job. Defaults to DlpJobType.INSPECT

orderBy string

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
locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

listDlpJobsAsync(request, optionsopt) → {Object}

Equivalent to listDlpJobs, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Parent resource name.

The format of this value varies depending on whether you have specified a processing 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
filter string

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.

pageSize number

The standard list page size.

pageToken string

The standard list page token.

type google.privacy.dlp.v2.DlpJobType

The type of job. Defaults to DlpJobType.INSPECT

orderBy string

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
locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

listDlpJobsStream(request, optionsopt) → {Stream}

Equivalent to listDlpJobs, but returns a NodeJS Stream object.

This fetches the paged responses for listDlpJobs continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Parent resource name.

The format of this value varies depending on whether you have specified a processing 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
filter string

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.

pageSize number

The standard list page size.

pageToken string

The standard list page token.

type google.privacy.dlp.v2.DlpJobType

The type of job. Defaults to DlpJobType.INSPECT

orderBy string

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
locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

See:

listInfoTypes(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

The parent resource name.

The format of this value is as follows:

  locations/<var>LOCATION_ID</var>
languageCode string

BCP-47 language code for localized infoType friendly names. If omitted, or if localized strings are not available, en-US strings will be returned.

filter string

filter to only return infoTypes supported by certain parts of the API. Defaults to supported_by=INSPECT.

locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

listInspectTemplates(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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:

  • 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
pageToken string

Page token to continue retrieval. Comes from previous call to ListInspectTemplates.

pageSize number

Size of the page, can be limited by server. If zero server returns a page of max size 100.

orderBy string

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.
locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

listInspectTemplatesAsync(request, optionsopt) → {Object}

Equivalent to listInspectTemplates, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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:

  • 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
pageToken string

Page token to continue retrieval. Comes from previous call to ListInspectTemplates.

pageSize number

Size of the page, can be limited by server. If zero server returns a page of max size 100.

orderBy string

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.
locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

listInspectTemplatesStream(request, optionsopt) → {Stream}

Equivalent to listInspectTemplates, but returns a NodeJS Stream object.

This fetches the paged responses for listInspectTemplates continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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:

  • 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
pageToken string

Page token to continue retrieval. Comes from previous call to ListInspectTemplates.

pageSize number

Size of the page, can be limited by server. If zero server returns a page of max size 100.

orderBy string

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.
locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

See:

listJobTriggers(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Parent resource name.

The format of this value varies depending on whether you have specified a processing 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
pageToken string

Page token to continue retrieval. Comes from previous call to ListJobTriggers. order_by field must not change for subsequent calls.

pageSize number

Size of the page, can be limited by a server.

orderBy string

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.
filter string

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.

locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

listJobTriggersAsync(request, optionsopt) → {Object}

Equivalent to listJobTriggers, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Parent resource name.

The format of this value varies depending on whether you have specified a processing 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
pageToken string

Page token to continue retrieval. Comes from previous call to ListJobTriggers. order_by field must not change for subsequent calls.

pageSize number

Size of the page, can be limited by a server.

orderBy string

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.
filter string

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.

locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

listJobTriggersStream(request, optionsopt) → {Stream}

Equivalent to listJobTriggers, but returns a NodeJS Stream object.

This fetches the paged responses for listJobTriggers continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Parent resource name.

The format of this value varies depending on whether you have specified a processing 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
pageToken string

Page token to continue retrieval. Comes from previous call to ListJobTriggers. order_by field must not change for subsequent calls.

pageSize number

Size of the page, can be limited by a server.

orderBy string

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.
filter string

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.

locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

See:

listStoredInfoTypes(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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:

  • 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
pageToken string

Page token to continue retrieval. Comes from previous call to ListStoredInfoTypes.

pageSize number

Size of the page, can be limited by server. If zero server returns a page of max size 100.

orderBy string

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.
locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

listStoredInfoTypesAsync(request, optionsopt) → {Object}

Equivalent to listStoredInfoTypes, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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:

  • 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
pageToken string

Page token to continue retrieval. Comes from previous call to ListStoredInfoTypes.

pageSize number

Size of the page, can be limited by server. If zero server returns a page of max size 100.

orderBy string

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.
locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

listStoredInfoTypesStream(request, optionsopt) → {Stream}

Equivalent to listStoredInfoTypes, but returns a NodeJS Stream object.

This fetches the paged responses for listStoredInfoTypes continuously and invokes the callback registered for 'data' event for each element in the responses.

The returned object has 'end' method when no more elements are required.

autoPaginate option will be ignored.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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:

  • 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
pageToken string

Page token to continue retrieval. Comes from previous call to ListStoredInfoTypes.

pageSize number

Size of the page, can be limited by server. If zero server returns a page of max size 100.

orderBy string

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.
locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

See:

matchDeidentifyTemplateFromOrganizationDeidentifyTemplateName(organizationDeidentifyTemplateName) → {string}

Parse the deidentify_template from OrganizationDeidentifyTemplate resource.

Parameters:
Name Type Description
organizationDeidentifyTemplateName string

A fully-qualified path representing organization_deidentify_template resource.

matchDeidentifyTemplateFromOrganizationLocationDeidentifyTemplateName(organizationLocationDeidentifyTemplateName) → {string}

Parse the deidentify_template from OrganizationLocationDeidentifyTemplate resource.

Parameters:
Name Type Description
organizationLocationDeidentifyTemplateName string

A fully-qualified path representing organization_location_deidentify_template resource.

matchDeidentifyTemplateFromProjectDeidentifyTemplateName(projectDeidentifyTemplateName) → {string}

Parse the deidentify_template from ProjectDeidentifyTemplate resource.

Parameters:
Name Type Description
projectDeidentifyTemplateName string

A fully-qualified path representing project_deidentify_template resource.

matchDeidentifyTemplateFromProjectLocationDeidentifyTemplateName(projectLocationDeidentifyTemplateName) → {string}

Parse the deidentify_template from ProjectLocationDeidentifyTemplate resource.

Parameters:
Name Type Description
projectLocationDeidentifyTemplateName string

A fully-qualified path representing project_location_deidentify_template resource.

matchDlpJobFromProjectDlpJobName(projectDlpJobName) → {string}

Parse the dlp_job from ProjectDlpJob resource.

Parameters:
Name Type Description
projectDlpJobName string

A fully-qualified path representing project_dlp_job resource.

matchDlpJobFromProjectLocationDlpJobName(projectLocationDlpJobName) → {string}

Parse the dlp_job from ProjectLocationDlpJob resource.

Parameters:
Name Type Description
projectLocationDlpJobName string

A fully-qualified path representing project_location_dlp_job resource.

matchFindingFromFindingName(findingName) → {string}

Parse the finding from Finding resource.

Parameters:
Name Type Description
findingName string

A fully-qualified path representing Finding resource.

matchInspectTemplateFromOrganizationInspectTemplateName(organizationInspectTemplateName) → {string}

Parse the inspect_template from OrganizationInspectTemplate resource.

Parameters:
Name Type Description
organizationInspectTemplateName string

A fully-qualified path representing organization_inspect_template resource.

matchInspectTemplateFromOrganizationLocationInspectTemplateName(organizationLocationInspectTemplateName) → {string}

Parse the inspect_template from OrganizationLocationInspectTemplate resource.

Parameters:
Name Type Description
organizationLocationInspectTemplateName string

A fully-qualified path representing organization_location_inspect_template resource.

matchInspectTemplateFromProjectInspectTemplateName(projectInspectTemplateName) → {string}

Parse the inspect_template from ProjectInspectTemplate resource.

Parameters:
Name Type Description
projectInspectTemplateName string

A fully-qualified path representing project_inspect_template resource.

matchInspectTemplateFromProjectLocationInspectTemplateName(projectLocationInspectTemplateName) → {string}

Parse the inspect_template from ProjectLocationInspectTemplate resource.

Parameters:
Name Type Description
projectLocationInspectTemplateName string

A fully-qualified path representing project_location_inspect_template resource.

matchJobTriggerFromProjectJobTriggerName(projectJobTriggerName) → {string}

Parse the job_trigger from ProjectJobTrigger resource.

Parameters:
Name Type Description
projectJobTriggerName string

A fully-qualified path representing project_job_trigger resource.

matchJobTriggerFromProjectLocationJobTriggerName(projectLocationJobTriggerName) → {string}

Parse the job_trigger from ProjectLocationJobTrigger resource.

Parameters:
Name Type Description
projectLocationJobTriggerName string

A fully-qualified path representing project_location_job_trigger resource.

matchLocationFromFindingName(findingName) → {string}

Parse the location from Finding resource.

Parameters:
Name Type Description
findingName string

A fully-qualified path representing Finding resource.

matchLocationFromOrganizationLocationDeidentifyTemplateName(organizationLocationDeidentifyTemplateName) → {string}

Parse the location from OrganizationLocationDeidentifyTemplate resource.

Parameters:
Name Type Description
organizationLocationDeidentifyTemplateName string

A fully-qualified path representing organization_location_deidentify_template resource.

matchLocationFromOrganizationLocationInspectTemplateName(organizationLocationInspectTemplateName) → {string}

Parse the location from OrganizationLocationInspectTemplate resource.

Parameters:
Name Type Description
organizationLocationInspectTemplateName string

A fully-qualified path representing organization_location_inspect_template resource.

matchLocationFromOrganizationLocationStoredInfoTypeName(organizationLocationStoredInfoTypeName) → {string}

Parse the location from OrganizationLocationStoredInfoType resource.

Parameters:
Name Type Description
organizationLocationStoredInfoTypeName string

A fully-qualified path representing organization_location_stored_info_type resource.

matchLocationFromProjectLocationDeidentifyTemplateName(projectLocationDeidentifyTemplateName) → {string}

Parse the location from ProjectLocationDeidentifyTemplate resource.

Parameters:
Name Type Description
projectLocationDeidentifyTemplateName string

A fully-qualified path representing project_location_deidentify_template resource.

matchLocationFromProjectLocationDlpJobName(projectLocationDlpJobName) → {string}

Parse the location from ProjectLocationDlpJob resource.

Parameters:
Name Type Description
projectLocationDlpJobName string

A fully-qualified path representing project_location_dlp_job resource.

matchLocationFromProjectLocationInspectTemplateName(projectLocationInspectTemplateName) → {string}

Parse the location from ProjectLocationInspectTemplate resource.

Parameters:
Name Type Description
projectLocationInspectTemplateName string

A fully-qualified path representing project_location_inspect_template resource.

matchLocationFromProjectLocationJobTriggerName(projectLocationJobTriggerName) → {string}

Parse the location from ProjectLocationJobTrigger resource.

Parameters:
Name Type Description
projectLocationJobTriggerName string

A fully-qualified path representing project_location_job_trigger resource.

matchLocationFromProjectLocationStoredInfoTypeName(projectLocationStoredInfoTypeName) → {string}

Parse the location from ProjectLocationStoredInfoType resource.

Parameters:
Name Type Description
projectLocationStoredInfoTypeName string

A fully-qualified path representing project_location_stored_info_type resource.

matchOrganizationFromOrganizationDeidentifyTemplateName(organizationDeidentifyTemplateName) → {string}

Parse the organization from OrganizationDeidentifyTemplate resource.

Parameters:
Name Type Description
organizationDeidentifyTemplateName string

A fully-qualified path representing organization_deidentify_template resource.

matchOrganizationFromOrganizationInspectTemplateName(organizationInspectTemplateName) → {string}

Parse the organization from OrganizationInspectTemplate resource.

Parameters:
Name Type Description
organizationInspectTemplateName string

A fully-qualified path representing organization_inspect_template resource.

matchOrganizationFromOrganizationLocationDeidentifyTemplateName(organizationLocationDeidentifyTemplateName) → {string}

Parse the organization from OrganizationLocationDeidentifyTemplate resource.

Parameters:
Name Type Description
organizationLocationDeidentifyTemplateName string

A fully-qualified path representing organization_location_deidentify_template resource.

matchOrganizationFromOrganizationLocationInspectTemplateName(organizationLocationInspectTemplateName) → {string}

Parse the organization from OrganizationLocationInspectTemplate resource.

Parameters:
Name Type Description
organizationLocationInspectTemplateName string

A fully-qualified path representing organization_location_inspect_template resource.

matchOrganizationFromOrganizationLocationStoredInfoTypeName(organizationLocationStoredInfoTypeName) → {string}

Parse the organization from OrganizationLocationStoredInfoType resource.

Parameters:
Name Type Description
organizationLocationStoredInfoTypeName string

A fully-qualified path representing organization_location_stored_info_type resource.

matchOrganizationFromOrganizationName(organizationName) → {string}

Parse the organization from Organization resource.

Parameters:
Name Type Description
organizationName string

A fully-qualified path representing Organization resource.

matchOrganizationFromOrganizationStoredInfoTypeName(organizationStoredInfoTypeName) → {string}

Parse the organization from OrganizationStoredInfoType resource.

Parameters:
Name Type Description
organizationStoredInfoTypeName string

A fully-qualified path representing organization_stored_info_type resource.

matchProjectFromFindingName(findingName) → {string}

Parse the project from Finding resource.

Parameters:
Name Type Description
findingName string

A fully-qualified path representing Finding resource.

matchProjectFromProjectDeidentifyTemplateName(projectDeidentifyTemplateName) → {string}

Parse the project from ProjectDeidentifyTemplate resource.

Parameters:
Name Type Description
projectDeidentifyTemplateName string

A fully-qualified path representing project_deidentify_template resource.

matchProjectFromProjectDlpContentName(projectDlpContentName) → {string}

Parse the project from ProjectDlpContent resource.

Parameters:
Name Type Description
projectDlpContentName string

A fully-qualified path representing project_dlpContent resource.

matchProjectFromProjectDlpJobName(projectDlpJobName) → {string}

Parse the project from ProjectDlpJob resource.

Parameters:
Name Type Description
projectDlpJobName string

A fully-qualified path representing project_dlp_job resource.

matchProjectFromProjectInspectTemplateName(projectInspectTemplateName) → {string}

Parse the project from ProjectInspectTemplate resource.

Parameters:
Name Type Description
projectInspectTemplateName string

A fully-qualified path representing project_inspect_template resource.

matchProjectFromProjectJobTriggerName(projectJobTriggerName) → {string}

Parse the project from ProjectJobTrigger resource.

Parameters:
Name Type Description
projectJobTriggerName string

A fully-qualified path representing project_job_trigger resource.

matchProjectFromProjectLocationDeidentifyTemplateName(projectLocationDeidentifyTemplateName) → {string}

Parse the project from ProjectLocationDeidentifyTemplate resource.

Parameters:
Name Type Description
projectLocationDeidentifyTemplateName string

A fully-qualified path representing project_location_deidentify_template resource.

matchProjectFromProjectLocationDlpJobName(projectLocationDlpJobName) → {string}

Parse the project from ProjectLocationDlpJob resource.

Parameters:
Name Type Description
projectLocationDlpJobName string

A fully-qualified path representing project_location_dlp_job resource.

matchProjectFromProjectLocationInspectTemplateName(projectLocationInspectTemplateName) → {string}

Parse the project from ProjectLocationInspectTemplate resource.

Parameters:
Name Type Description
projectLocationInspectTemplateName string

A fully-qualified path representing project_location_inspect_template resource.

matchProjectFromProjectLocationJobTriggerName(projectLocationJobTriggerName) → {string}

Parse the project from ProjectLocationJobTrigger resource.

Parameters:
Name Type Description
projectLocationJobTriggerName string

A fully-qualified path representing project_location_job_trigger resource.

matchProjectFromProjectLocationStoredInfoTypeName(projectLocationStoredInfoTypeName) → {string}

Parse the project from ProjectLocationStoredInfoType resource.

Parameters:
Name Type Description
projectLocationStoredInfoTypeName string

A fully-qualified path representing project_location_stored_info_type resource.

matchProjectFromProjectName(projectName) → {string}

Parse the project from Project resource.

Parameters:
Name Type Description
projectName string

A fully-qualified path representing Project resource.

matchProjectFromProjectStoredInfoTypeName(projectStoredInfoTypeName) → {string}

Parse the project from ProjectStoredInfoType resource.

Parameters:
Name Type Description
projectStoredInfoTypeName string

A fully-qualified path representing project_stored_info_type resource.

matchStoredInfoTypeFromOrganizationLocationStoredInfoTypeName(organizationLocationStoredInfoTypeName) → {string}

Parse the stored_info_type from OrganizationLocationStoredInfoType resource.

Parameters:
Name Type Description
organizationLocationStoredInfoTypeName string

A fully-qualified path representing organization_location_stored_info_type resource.

matchStoredInfoTypeFromOrganizationStoredInfoTypeName(organizationStoredInfoTypeName) → {string}

Parse the stored_info_type from OrganizationStoredInfoType resource.

Parameters:
Name Type Description
organizationStoredInfoTypeName string

A fully-qualified path representing organization_stored_info_type resource.

matchStoredInfoTypeFromProjectLocationStoredInfoTypeName(projectLocationStoredInfoTypeName) → {string}

Parse the stored_info_type from ProjectLocationStoredInfoType resource.

Parameters:
Name Type Description
projectLocationStoredInfoTypeName string

A fully-qualified path representing project_location_stored_info_type resource.

matchStoredInfoTypeFromProjectStoredInfoTypeName(projectStoredInfoTypeName) → {string}

Parse the stored_info_type from ProjectStoredInfoType resource.

Parameters:
Name Type Description
projectStoredInfoTypeName string

A fully-qualified path representing project_stored_info_type resource.

organizationDeidentifyTemplatePath(organization, deidentify_template) → {string}

Return a fully-qualified organizationDeidentifyTemplate resource name string.

Parameters:
Name Type Description
organization string
deidentify_template string

organizationInspectTemplatePath(organization, inspect_template) → {string}

Return a fully-qualified organizationInspectTemplate resource name string.

Parameters:
Name Type Description
organization string
inspect_template string

organizationLocationDeidentifyTemplatePath(organization, location, deidentify_template) → {string}

Return a fully-qualified organizationLocationDeidentifyTemplate resource name string.

Parameters:
Name Type Description
organization string
location string
deidentify_template string

organizationLocationInspectTemplatePath(organization, location, inspect_template) → {string}

Return a fully-qualified organizationLocationInspectTemplate resource name string.

Parameters:
Name Type Description
organization string
location string
inspect_template string

organizationLocationStoredInfoTypePath(organization, location, stored_info_type) → {string}

Return a fully-qualified organizationLocationStoredInfoType resource name string.

Parameters:
Name Type Description
organization string
location string
stored_info_type string

organizationPath(organization) → {string}

Return a fully-qualified organization resource name string.

Parameters:
Name Type Description
organization string

organizationStoredInfoTypePath(organization, stored_info_type) → {string}

Return a fully-qualified organizationStoredInfoType resource name string.

Parameters:
Name Type Description
organization string
stored_info_type string

projectDeidentifyTemplatePath(project, deidentify_template) → {string}

Return a fully-qualified projectDeidentifyTemplate resource name string.

Parameters:
Name Type Description
project string
deidentify_template string

projectDlpContentPath(project) → {string}

Return a fully-qualified projectDlpContent resource name string.

Parameters:
Name Type Description
project string

projectDlpJobPath(project, dlp_job) → {string}

Return a fully-qualified projectDlpJob resource name string.

Parameters:
Name Type Description
project string
dlp_job string

projectInspectTemplatePath(project, inspect_template) → {string}

Return a fully-qualified projectInspectTemplate resource name string.

Parameters:
Name Type Description
project string
inspect_template string

projectJobTriggerPath(project, job_trigger) → {string}

Return a fully-qualified projectJobTrigger resource name string.

Parameters:
Name Type Description
project string
job_trigger string

projectLocationDeidentifyTemplatePath(project, location, deidentify_template) → {string}

Return a fully-qualified projectLocationDeidentifyTemplate resource name string.

Parameters:
Name Type Description
project string
location string
deidentify_template string

projectLocationDlpJobPath(project, location, dlp_job) → {string}

Return a fully-qualified projectLocationDlpJob resource name string.

Parameters:
Name Type Description
project string
location string
dlp_job string

projectLocationInspectTemplatePath(project, location, inspect_template) → {string}

Return a fully-qualified projectLocationInspectTemplate resource name string.

Parameters:
Name Type Description
project string
location string
inspect_template string

projectLocationJobTriggerPath(project, location, job_trigger) → {string}

Return a fully-qualified projectLocationJobTrigger resource name string.

Parameters:
Name Type Description
project string
location string
job_trigger string

projectLocationStoredInfoTypePath(project, location, stored_info_type) → {string}

Return a fully-qualified projectLocationStoredInfoType resource name string.

Parameters:
Name Type Description
project string
location string
stored_info_type string

projectPath(project) → {string}

Return a fully-qualified project resource name string.

Parameters:
Name Type Description
project string

projectStoredInfoTypePath(project, stored_info_type) → {string}

Return a fully-qualified projectStoredInfoType resource name string.

Parameters:
Name Type Description
project string
stored_info_type string

redactImage(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Parent resource name.

The format of this value varies depending on whether you have specified a processing 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
locationId string

Deprecated. This field has no effect.

inspectConfig google.privacy.dlp.v2.InspectConfig

Configuration for the inspector.

imageRedactionConfigs Array.<number>

The configuration for specifying what content to redact from images.

includeFindings boolean

Whether the response should include findings along with the redacted image.

byteItem google.privacy.dlp.v2.ByteContentItem

The content must be PNG, JPEG, SVG or BMP.

options object <optional>

Call options. See CallOptions for more details.

reidentifyContent(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Parent resource name.

The format of this value varies depending on whether you have specified a processing 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
reidentifyConfig google.privacy.dlp.v2.DeidentifyConfig

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
inspectConfig google.privacy.dlp.v2.InspectConfig

Configuration for the inspector.

item google.privacy.dlp.v2.ContentItem

The item to re-identify. Will be treated as text.

inspectTemplateName string

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.

reidentifyTemplateName string

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.

locationId string

Deprecated. This field has no effect.

options object <optional>

Call options. See CallOptions for more details.

updateDeidentifyTemplate(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of organization and deidentify template to be updated, for example organizations/433245324/deidentifyTemplates/432452342 or projects/project-id/deidentifyTemplates/432452342.

deidentifyTemplate google.privacy.dlp.v2.DeidentifyTemplate

New DeidentifyTemplate value.

updateMask google.protobuf.FieldMask

Mask to control which fields get updated.

options object <optional>

Call options. See CallOptions for more details.

updateInspectTemplate(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of organization and inspectTemplate to be updated, for example organizations/433245324/inspectTemplates/432452342 or projects/project-id/inspectTemplates/432452342.

inspectTemplate google.privacy.dlp.v2.InspectTemplate

New InspectTemplate value.

updateMask google.protobuf.FieldMask

Mask to control which fields get updated.

options object <optional>

Call options. See CallOptions for more details.

updateJobTrigger(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of the project and the triggeredJob, for example projects/dlp-test-project/jobTriggers/53234423.

jobTrigger google.privacy.dlp.v2.JobTrigger

New JobTrigger value.

updateMask google.protobuf.FieldMask

Mask to control which fields get updated.

options object <optional>

Call options. See CallOptions for more details.

updateStoredInfoType(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. Resource name of organization and storedInfoType to be updated, for example organizations/433245324/storedInfoTypes/432452342 or projects/project-id/storedInfoTypes/432452342.

config google.privacy.dlp.v2.StoredInfoTypeConfig

Updated configuration for the storedInfoType. If not provided, a new version of the storedInfoType will be created with the existing configuration.

updateMask google.protobuf.FieldMask

Mask to control which fields get updated.

options object <optional>

Call options. See CallOptions for more details.