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
|
- Source:
Members
(static) apiEndpoint
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
- Source:
(static) port
The port for this API service.
- Source:
(static) scopes
The scopes needed to make gRPC calls for every method defined in this service.
- Source:
(static) servicePath
The DNS address for this API service.
- Source:
Methods
cancelDlpJob(request, optionsopt, callbackopt) → {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
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedName = client.dlpJobPath('[PROJECT]', '[DLP_JOB]');
client.cancelDlpJob({name: formattedName}).catch(err => {
console.error(err);
});
createDeidentifyTemplate(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing DeidentifyTemplate. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedParent = client.organizationPath('[ORGANIZATION]');
client.createDeidentifyTemplate({parent: formattedParent})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
createDlpJob(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing DlpJob. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedParent = client.projectPath('[PROJECT]');
client.createDlpJob({parent: formattedParent})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
createInspectTemplate(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing InspectTemplate. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedParent = client.organizationPath('[ORGANIZATION]');
client.createInspectTemplate({parent: formattedParent})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
createJobTrigger(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing JobTrigger. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedParent = client.projectPath('[PROJECT]');
client.createJobTrigger({parent: formattedParent})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
createStoredInfoType(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing StoredInfoType. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedParent = client.organizationPath('[ORGANIZATION]');
client.createStoredInfoType({parent: formattedParent})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
deidentifyContent(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing DeidentifyContentResponse. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedParent = client.projectPath('[PROJECT]');
client.deidentifyContent({parent: formattedParent})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
deleteDeidentifyTemplate(request, optionsopt, callbackopt) → {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
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedName = client.organizationDeidentifyTemplatePath('[ORGANIZATION]', '[DEIDENTIFY_TEMPLATE]');
client.deleteDeidentifyTemplate({name: formattedName}).catch(err => {
console.error(err);
});
deleteDlpJob(request, optionsopt, callbackopt) → {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
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedName = client.dlpJobPath('[PROJECT]', '[DLP_JOB]');
client.deleteDlpJob({name: formattedName}).catch(err => {
console.error(err);
});
deleteInspectTemplate(request, optionsopt, callbackopt) → {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
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedName = client.organizationInspectTemplatePath('[ORGANIZATION]', '[INSPECT_TEMPLATE]');
client.deleteInspectTemplate({name: formattedName}).catch(err => {
console.error(err);
});
deleteJobTrigger(request, optionsopt, callbackopt) → {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
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const name = '';
client.deleteJobTrigger({name: name}).catch(err => {
console.error(err);
});
deleteStoredInfoType(request, optionsopt, callbackopt) → {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
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedName = client.organizationStoredInfoTypePath('[ORGANIZATION]', '[STORED_INFO_TYPE]');
client.deleteStoredInfoType({name: formattedName}).catch(err => {
console.error(err);
});
dlpJobPath(project, dlpJob) → {String}
Return a fully-qualified dlp_job resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
String | |
dlpJob |
String |
- Source:
getDeidentifyTemplate(request, optionsopt, callbackopt) → {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
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing DeidentifyTemplate. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedName = client.organizationDeidentifyTemplatePath('[ORGANIZATION]', '[DEIDENTIFY_TEMPLATE]');
client.getDeidentifyTemplate({name: formattedName})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
getDlpJob(request, optionsopt, callbackopt) → {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
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing DlpJob. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedName = client.dlpJobPath('[PROJECT]', '[DLP_JOB]');
client.getDlpJob({name: formattedName})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
getInspectTemplate(request, optionsopt, callbackopt) → {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
|
|||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing InspectTemplate. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
client.getInspectTemplate({})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
getJobTrigger(request, optionsopt, callbackopt) → {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
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing JobTrigger. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedName = client.projectJobTriggerPath('[PROJECT]', '[JOB_TRIGGER]');
client.getJobTrigger({name: formattedName})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
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. |
- Source:
getStoredInfoType(request, optionsopt, callbackopt) → {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
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing StoredInfoType. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedName = client.organizationStoredInfoTypePath('[ORGANIZATION]', '[STORED_INFO_TYPE]');
client.getStoredInfoType({name: formattedName})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
inspectContent(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing InspectContentResponse. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedParent = client.projectPath('[PROJECT]');
client.inspectContent({parent: formattedParent})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
listDeidentifyTemplates(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is Array of DeidentifyTemplate. When autoPaginate: false is specified through options, it contains the result in a single response. If the response indicates the next page exists, the third parameter is set to be used for the next request object. The fourth parameter keeps the raw response object of an object representing ListDeidentifyTemplatesResponse. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
// Iterate over all elements.
const formattedParent = client.organizationPath('[ORGANIZATION]');
client.listDeidentifyTemplates({parent: formattedParent})
.then(responses => {
const resources = responses[0];
for (const resource of resources) {
// doThingsWith(resource)
}
})
.catch(err => {
console.error(err);
});
// Or obtain the paged response.
const formattedParent = client.organizationPath('[ORGANIZATION]');
const options = {autoPaginate: false};
const callback = responses => {
// The actual resources in a response.
const resources = responses[0];
// The next request if the response shows that there are more responses.
const nextRequest = responses[1];
// The actual response object, if necessary.
// const rawResponse = responses[2];
for (const resource of resources) {
// doThingsWith(resource);
}
if (nextRequest) {
// Fetch the next page.
return client.listDeidentifyTemplates(nextRequest, options).then(callback);
}
}
client.listDeidentifyTemplates({parent: formattedParent}, options)
.then(callback)
.catch(err => {
console.error(err);
});
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
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedParent = client.organizationPath('[ORGANIZATION]');
client.listDeidentifyTemplatesStream({parent: formattedParent})
.on('data', element => {
// doThingsWith(element)
}).on('error', err => {
console.log(err);
});
listDlpJobs(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is Array of DlpJob. When autoPaginate: false is specified through options, it contains the result in a single response. If the response indicates the next page exists, the third parameter is set to be used for the next request object. The fourth parameter keeps the raw response object of an object representing ListDlpJobsResponse. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
// Iterate over all elements.
const formattedParent = client.projectPath('[PROJECT]');
client.listDlpJobs({parent: formattedParent})
.then(responses => {
const resources = responses[0];
for (const resource of resources) {
// doThingsWith(resource)
}
})
.catch(err => {
console.error(err);
});
// Or obtain the paged response.
const formattedParent = client.projectPath('[PROJECT]');
const options = {autoPaginate: false};
const callback = responses => {
// The actual resources in a response.
const resources = responses[0];
// The next request if the response shows that there are more responses.
const nextRequest = responses[1];
// The actual response object, if necessary.
// const rawResponse = responses[2];
for (const resource of resources) {
// doThingsWith(resource);
}
if (nextRequest) {
// Fetch the next page.
return client.listDlpJobs(nextRequest, options).then(callback);
}
}
client.listDlpJobs({parent: formattedParent}, options)
.then(callback)
.catch(err => {
console.error(err);
});
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
|
|||||||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedParent = client.projectPath('[PROJECT]');
client.listDlpJobsStream({parent: formattedParent})
.on('data', element => {
// doThingsWith(element)
}).on('error', err => {
console.log(err);
});
listInfoTypes(request, optionsopt, callbackopt) → {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
|
|||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing ListInfoTypesResponse. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
client.listInfoTypes({})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
listInspectTemplates(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is Array of InspectTemplate. When autoPaginate: false is specified through options, it contains the result in a single response. If the response indicates the next page exists, the third parameter is set to be used for the next request object. The fourth parameter keeps the raw response object of an object representing ListInspectTemplatesResponse. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
// Iterate over all elements.
const formattedParent = client.organizationPath('[ORGANIZATION]');
client.listInspectTemplates({parent: formattedParent})
.then(responses => {
const resources = responses[0];
for (const resource of resources) {
// doThingsWith(resource)
}
})
.catch(err => {
console.error(err);
});
// Or obtain the paged response.
const formattedParent = client.organizationPath('[ORGANIZATION]');
const options = {autoPaginate: false};
const callback = responses => {
// The actual resources in a response.
const resources = responses[0];
// The next request if the response shows that there are more responses.
const nextRequest = responses[1];
// The actual response object, if necessary.
// const rawResponse = responses[2];
for (const resource of resources) {
// doThingsWith(resource);
}
if (nextRequest) {
// Fetch the next page.
return client.listInspectTemplates(nextRequest, options).then(callback);
}
}
client.listInspectTemplates({parent: formattedParent}, options)
.then(callback)
.catch(err => {
console.error(err);
});
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
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedParent = client.organizationPath('[ORGANIZATION]');
client.listInspectTemplatesStream({parent: formattedParent})
.on('data', element => {
// doThingsWith(element)
}).on('error', err => {
console.log(err);
});
listJobTriggers(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is Array of JobTrigger. When autoPaginate: false is specified through options, it contains the result in a single response. If the response indicates the next page exists, the third parameter is set to be used for the next request object. The fourth parameter keeps the raw response object of an object representing ListJobTriggersResponse. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
// Iterate over all elements.
const formattedParent = client.projectPath('[PROJECT]');
client.listJobTriggers({parent: formattedParent})
.then(responses => {
const resources = responses[0];
for (const resource of resources) {
// doThingsWith(resource)
}
})
.catch(err => {
console.error(err);
});
// Or obtain the paged response.
const formattedParent = client.projectPath('[PROJECT]');
const options = {autoPaginate: false};
const callback = responses => {
// The actual resources in a response.
const resources = responses[0];
// The next request if the response shows that there are more responses.
const nextRequest = responses[1];
// The actual response object, if necessary.
// const rawResponse = responses[2];
for (const resource of resources) {
// doThingsWith(resource);
}
if (nextRequest) {
// Fetch the next page.
return client.listJobTriggers(nextRequest, options).then(callback);
}
}
client.listJobTriggers({parent: formattedParent}, options)
.then(callback)
.catch(err => {
console.error(err);
});
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
|
|||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedParent = client.projectPath('[PROJECT]');
client.listJobTriggersStream({parent: formattedParent})
.on('data', element => {
// doThingsWith(element)
}).on('error', err => {
console.log(err);
});
listStoredInfoTypes(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is Array of StoredInfoType. When autoPaginate: false is specified through options, it contains the result in a single response. If the response indicates the next page exists, the third parameter is set to be used for the next request object. The fourth parameter keeps the raw response object of an object representing ListStoredInfoTypesResponse. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
// Iterate over all elements.
const formattedParent = client.organizationPath('[ORGANIZATION]');
client.listStoredInfoTypes({parent: formattedParent})
.then(responses => {
const resources = responses[0];
for (const resource of resources) {
// doThingsWith(resource)
}
})
.catch(err => {
console.error(err);
});
// Or obtain the paged response.
const formattedParent = client.organizationPath('[ORGANIZATION]');
const options = {autoPaginate: false};
const callback = responses => {
// The actual resources in a response.
const resources = responses[0];
// The next request if the response shows that there are more responses.
const nextRequest = responses[1];
// The actual response object, if necessary.
// const rawResponse = responses[2];
for (const resource of resources) {
// doThingsWith(resource);
}
if (nextRequest) {
// Fetch the next page.
return client.listStoredInfoTypes(nextRequest, options).then(callback);
}
}
client.listStoredInfoTypes({parent: formattedParent}, options)
.then(callback)
.catch(err => {
console.error(err);
});
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
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedParent = client.organizationPath('[ORGANIZATION]');
client.listStoredInfoTypesStream({parent: formattedParent})
.on('data', element => {
// doThingsWith(element)
}).on('error', err => {
console.log(err);
});
matchDeidentifyTemplateFromOrganizationDeidentifyTemplateName(organizationDeidentifyTemplateName) → {String}
Parse the organizationDeidentifyTemplateName from a organization_deidentify_template resource.
Parameters:
| Name | Type | Description |
|---|---|---|
organizationDeidentifyTemplateName |
String |
A fully-qualified path representing a organization_deidentify_template resources. |
- Source:
matchDeidentifyTemplateFromProjectDeidentifyTemplateName(projectDeidentifyTemplateName) → {String}
Parse the projectDeidentifyTemplateName from a project_deidentify_template resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectDeidentifyTemplateName |
String |
A fully-qualified path representing a project_deidentify_template resources. |
- Source:
matchDlpJobFromDlpJobName(dlpJobName) → {String}
Parse the dlpJobName from a dlp_job resource.
Parameters:
| Name | Type | Description |
|---|---|---|
dlpJobName |
String |
A fully-qualified path representing a dlp_job resources. |
- Source:
matchInspectTemplateFromOrganizationInspectTemplateName(organizationInspectTemplateName) → {String}
Parse the organizationInspectTemplateName from a organization_inspect_template resource.
Parameters:
| Name | Type | Description |
|---|---|---|
organizationInspectTemplateName |
String |
A fully-qualified path representing a organization_inspect_template resources. |
- Source:
matchInspectTemplateFromProjectInspectTemplateName(projectInspectTemplateName) → {String}
Parse the projectInspectTemplateName from a project_inspect_template resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectInspectTemplateName |
String |
A fully-qualified path representing a project_inspect_template resources. |
- Source:
matchJobTriggerFromProjectJobTriggerName(projectJobTriggerName) → {String}
Parse the projectJobTriggerName from a project_job_trigger resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectJobTriggerName |
String |
A fully-qualified path representing a project_job_trigger resources. |
- Source:
matchOrganizationFromOrganizationDeidentifyTemplateName(organizationDeidentifyTemplateName) → {String}
Parse the organizationDeidentifyTemplateName from a organization_deidentify_template resource.
Parameters:
| Name | Type | Description |
|---|---|---|
organizationDeidentifyTemplateName |
String |
A fully-qualified path representing a organization_deidentify_template resources. |
- Source:
matchOrganizationFromOrganizationInspectTemplateName(organizationInspectTemplateName) → {String}
Parse the organizationInspectTemplateName from a organization_inspect_template resource.
Parameters:
| Name | Type | Description |
|---|---|---|
organizationInspectTemplateName |
String |
A fully-qualified path representing a organization_inspect_template resources. |
- Source:
matchOrganizationFromOrganizationName(organizationName) → {String}
Parse the organizationName from a organization resource.
Parameters:
| Name | Type | Description |
|---|---|---|
organizationName |
String |
A fully-qualified path representing a organization resources. |
- Source:
matchOrganizationFromOrganizationStoredInfoTypeName(organizationStoredInfoTypeName) → {String}
Parse the organizationStoredInfoTypeName from a organization_stored_info_type resource.
Parameters:
| Name | Type | Description |
|---|---|---|
organizationStoredInfoTypeName |
String |
A fully-qualified path representing a organization_stored_info_type resources. |
- Source:
matchProjectFromDlpJobName(dlpJobName) → {String}
Parse the dlpJobName from a dlp_job resource.
Parameters:
| Name | Type | Description |
|---|---|---|
dlpJobName |
String |
A fully-qualified path representing a dlp_job resources. |
- Source:
matchProjectFromProjectDeidentifyTemplateName(projectDeidentifyTemplateName) → {String}
Parse the projectDeidentifyTemplateName from a project_deidentify_template resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectDeidentifyTemplateName |
String |
A fully-qualified path representing a project_deidentify_template resources. |
- Source:
matchProjectFromProjectInspectTemplateName(projectInspectTemplateName) → {String}
Parse the projectInspectTemplateName from a project_inspect_template resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectInspectTemplateName |
String |
A fully-qualified path representing a project_inspect_template resources. |
- Source:
matchProjectFromProjectJobTriggerName(projectJobTriggerName) → {String}
Parse the projectJobTriggerName from a project_job_trigger resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectJobTriggerName |
String |
A fully-qualified path representing a project_job_trigger resources. |
- Source:
matchProjectFromProjectName(projectName) → {String}
Parse the projectName from a project resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectName |
String |
A fully-qualified path representing a project resources. |
- Source:
matchProjectFromProjectStoredInfoTypeName(projectStoredInfoTypeName) → {String}
Parse the projectStoredInfoTypeName from a project_stored_info_type resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectStoredInfoTypeName |
String |
A fully-qualified path representing a project_stored_info_type resources. |
- Source:
matchStoredInfoTypeFromOrganizationStoredInfoTypeName(organizationStoredInfoTypeName) → {String}
Parse the organizationStoredInfoTypeName from a organization_stored_info_type resource.
Parameters:
| Name | Type | Description |
|---|---|---|
organizationStoredInfoTypeName |
String |
A fully-qualified path representing a organization_stored_info_type resources. |
- Source:
matchStoredInfoTypeFromProjectStoredInfoTypeName(projectStoredInfoTypeName) → {String}
Parse the projectStoredInfoTypeName from a project_stored_info_type resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectStoredInfoTypeName |
String |
A fully-qualified path representing a project_stored_info_type resources. |
- Source:
organizationDeidentifyTemplatePath(organization, deidentifyTemplate) → {String}
Return a fully-qualified organization_deidentify_template resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
organization |
String | |
deidentifyTemplate |
String |
- Source:
organizationInspectTemplatePath(organization, inspectTemplate) → {String}
Return a fully-qualified organization_inspect_template resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
organization |
String | |
inspectTemplate |
String |
- Source:
organizationPath(organization) → {String}
Return a fully-qualified organization resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
organization |
String |
- Source:
organizationStoredInfoTypePath(organization, storedInfoType) → {String}
Return a fully-qualified organization_stored_info_type resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
organization |
String | |
storedInfoType |
String |
- Source:
projectDeidentifyTemplatePath(project, deidentifyTemplate) → {String}
Return a fully-qualified project_deidentify_template resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
String | |
deidentifyTemplate |
String |
- Source:
projectInspectTemplatePath(project, inspectTemplate) → {String}
Return a fully-qualified project_inspect_template resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
String | |
inspectTemplate |
String |
- Source:
projectJobTriggerPath(project, jobTrigger) → {String}
Return a fully-qualified project_job_trigger resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
String | |
jobTrigger |
String |
- Source:
projectPath(project) → {String}
Return a fully-qualified project resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
String |
- Source:
projectStoredInfoTypePath(project, storedInfoType) → {String}
Return a fully-qualified project_stored_info_type resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
String | |
storedInfoType |
String |
- Source:
redactImage(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing RedactImageResponse. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedParent = client.projectPath('[PROJECT]');
client.redactImage({parent: formattedParent})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
reidentifyContent(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing ReidentifyContentResponse. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedParent = client.projectPath('[PROJECT]');
client.reidentifyContent({parent: formattedParent})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
updateDeidentifyTemplate(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing DeidentifyTemplate. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedName = client.organizationDeidentifyTemplatePath('[ORGANIZATION]', '[DEIDENTIFY_TEMPLATE]');
client.updateDeidentifyTemplate({name: formattedName})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
updateInspectTemplate(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing InspectTemplate. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedName = client.organizationInspectTemplatePath('[ORGANIZATION]', '[INSPECT_TEMPLATE]');
client.updateInspectTemplate({name: formattedName})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
updateJobTrigger(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing JobTrigger. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedName = client.projectJobTriggerPath('[PROJECT]', '[JOB_TRIGGER]');
client.updateJobTrigger({name: formattedName})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
updateStoredInfoType(request, optionsopt, callbackopt) → {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
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing StoredInfoType. |
- Source:
Example
const dlp = require('@google-cloud/dlp');
const client = new dlp.v2.DlpServiceClient({
// optional auth parameters.
});
const formattedName = client.organizationStoredInfoTypePath('[ORGANIZATION]', '[STORED_INFO_TYPE]');
client.updateStoredInfoType({name: formattedName})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});