Skip to content

Commit 1cc5bc1

Browse files
feat: [dlp] add RPCs for deleting TableDataProfiles (#5315)
* feat: add RPCs for deleting TableDataProfiles feat: Add RPCs for enabling discovery of Cloud SQL feat: Add field to InspectJobs num_rows_processed for BigQuery inspect jobs feat: Add new countries for supported detectors docs: Updated method documentation PiperOrigin-RevId: 631084904 Source-Link: googleapis/googleapis@67baa8f Source-Link: googleapis/googleapis-gen@e808b48 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXByaXZhY3ktZGxwLy5Pd2xCb3QueWFtbCIsImgiOiJlODA4YjQ4MmUyMzU3ZTMwY2VhNDFhNjdiMmQ5MDUyYmQ0ZTFjNDlkIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent a6da262 commit 1cc5bc1

21 files changed

Lines changed: 26069 additions & 12636 deletions

packages/google-privacy-dlp/README.md

Lines changed: 7 additions & 0 deletions
Large diffs are not rendered by default.

packages/google-privacy-dlp/protos/google/privacy/dlp/v2/dlp.proto

Lines changed: 561 additions & 17 deletions
Large diffs are not rendered by default.

packages/google-privacy-dlp/protos/google/privacy/dlp/v2/storage.proto

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 Google LLC
1+
// Copyright 2024 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -689,6 +689,17 @@ message StorageConfig {
689689
// since the last time the JobTrigger executed. This will be based on the
690690
// time of the execution of the last run of the JobTrigger or the timespan
691691
// end_time used in the last run of the JobTrigger.
692+
//
693+
// **For BigQuery**
694+
//
695+
// Inspect jobs triggered by automatic population will scan data that is at
696+
// least three hours old when the job starts. This is because streaming
697+
// buffer rows are not read during inspection and reading up to the current
698+
// timestamp will result in skipped rows.
699+
//
700+
// See the [known
701+
// issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#recently-streamed-data)
702+
// related to this operation.
692703
bool enable_auto_population_of_timespan_config = 4;
693704
}
694705

packages/google-privacy-dlp/protos/protos.d.ts

Lines changed: 5389 additions & 2752 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-privacy-dlp/protos/protos.js

Lines changed: 14623 additions & 8286 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-privacy-dlp/protos/protos.json

Lines changed: 642 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-privacy-dlp/samples/README.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,25 @@
1414
* [Samples](#samples)
1515
* [Dlp_service.activate_job_trigger](#dlp_service.activate_job_trigger)
1616
* [Dlp_service.cancel_dlp_job](#dlp_service.cancel_dlp_job)
17+
* [Dlp_service.create_connection](#dlp_service.create_connection)
1718
* [Dlp_service.create_deidentify_template](#dlp_service.create_deidentify_template)
1819
* [Dlp_service.create_discovery_config](#dlp_service.create_discovery_config)
1920
* [Dlp_service.create_dlp_job](#dlp_service.create_dlp_job)
2021
* [Dlp_service.create_inspect_template](#dlp_service.create_inspect_template)
2122
* [Dlp_service.create_job_trigger](#dlp_service.create_job_trigger)
2223
* [Dlp_service.create_stored_info_type](#dlp_service.create_stored_info_type)
2324
* [Dlp_service.deidentify_content](#dlp_service.deidentify_content)
25+
* [Dlp_service.delete_connection](#dlp_service.delete_connection)
2426
* [Dlp_service.delete_deidentify_template](#dlp_service.delete_deidentify_template)
2527
* [Dlp_service.delete_discovery_config](#dlp_service.delete_discovery_config)
2628
* [Dlp_service.delete_dlp_job](#dlp_service.delete_dlp_job)
2729
* [Dlp_service.delete_inspect_template](#dlp_service.delete_inspect_template)
2830
* [Dlp_service.delete_job_trigger](#dlp_service.delete_job_trigger)
2931
* [Dlp_service.delete_stored_info_type](#dlp_service.delete_stored_info_type)
32+
* [Dlp_service.delete_table_data_profile](#dlp_service.delete_table_data_profile)
3033
* [Dlp_service.finish_dlp_job](#dlp_service.finish_dlp_job)
3134
* [Dlp_service.get_column_data_profile](#dlp_service.get_column_data_profile)
35+
* [Dlp_service.get_connection](#dlp_service.get_connection)
3236
* [Dlp_service.get_deidentify_template](#dlp_service.get_deidentify_template)
3337
* [Dlp_service.get_discovery_config](#dlp_service.get_discovery_config)
3438
* [Dlp_service.get_dlp_job](#dlp_service.get_dlp_job)
@@ -41,6 +45,7 @@
4145
* [Dlp_service.hybrid_inspect_job_trigger](#dlp_service.hybrid_inspect_job_trigger)
4246
* [Dlp_service.inspect_content](#dlp_service.inspect_content)
4347
* [Dlp_service.list_column_data_profiles](#dlp_service.list_column_data_profiles)
48+
* [Dlp_service.list_connections](#dlp_service.list_connections)
4449
* [Dlp_service.list_deidentify_templates](#dlp_service.list_deidentify_templates)
4550
* [Dlp_service.list_discovery_configs](#dlp_service.list_discovery_configs)
4651
* [Dlp_service.list_dlp_jobs](#dlp_service.list_dlp_jobs)
@@ -52,6 +57,8 @@
5257
* [Dlp_service.list_table_data_profiles](#dlp_service.list_table_data_profiles)
5358
* [Dlp_service.redact_image](#dlp_service.redact_image)
5459
* [Dlp_service.reidentify_content](#dlp_service.reidentify_content)
60+
* [Dlp_service.search_connections](#dlp_service.search_connections)
61+
* [Dlp_service.update_connection](#dlp_service.update_connection)
5562
* [Dlp_service.update_deidentify_template](#dlp_service.update_deidentify_template)
5663
* [Dlp_service.update_discovery_config](#dlp_service.update_discovery_config)
5764
* [Dlp_service.update_inspect_template](#dlp_service.update_inspect_template)
@@ -108,6 +115,23 @@ __Usage:__
108115

109116

110117

118+
### Dlp_service.create_connection
119+
120+
View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_connection.js).
121+
122+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_connection.js,samples/README.md)
123+
124+
__Usage:__
125+
126+
127+
`node packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_connection.js`
128+
129+
130+
-----
131+
132+
133+
134+
111135
### Dlp_service.create_deidentify_template
112136

113137
View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_deidentify_template.js).
@@ -227,6 +251,23 @@ __Usage:__
227251

228252

229253

254+
### Dlp_service.delete_connection
255+
256+
View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_connection.js).
257+
258+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_connection.js,samples/README.md)
259+
260+
__Usage:__
261+
262+
263+
`node packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_connection.js`
264+
265+
266+
-----
267+
268+
269+
270+
230271
### Dlp_service.delete_deidentify_template
231272

232273
View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_deidentify_template.js).
@@ -329,6 +370,23 @@ __Usage:__
329370

330371

331372

373+
### Dlp_service.delete_table_data_profile
374+
375+
View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_table_data_profile.js).
376+
377+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_table_data_profile.js,samples/README.md)
378+
379+
__Usage:__
380+
381+
382+
`node packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_table_data_profile.js`
383+
384+
385+
-----
386+
387+
388+
389+
332390
### Dlp_service.finish_dlp_job
333391

334392
View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp/samples/generated/v2/dlp_service.finish_dlp_job.js).
@@ -363,6 +421,23 @@ __Usage:__
363421

364422

365423

424+
### Dlp_service.get_connection
425+
426+
View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_connection.js).
427+
428+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_connection.js,samples/README.md)
429+
430+
__Usage:__
431+
432+
433+
`node packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_connection.js`
434+
435+
436+
-----
437+
438+
439+
440+
366441
### Dlp_service.get_deidentify_template
367442

368443
View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_deidentify_template.js).
@@ -567,6 +642,23 @@ __Usage:__
567642

568643

569644

645+
### Dlp_service.list_connections
646+
647+
View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_connections.js).
648+
649+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_connections.js,samples/README.md)
650+
651+
__Usage:__
652+
653+
654+
`node packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_connections.js`
655+
656+
657+
-----
658+
659+
660+
661+
570662
### Dlp_service.list_deidentify_templates
571663

572664
View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_deidentify_templates.js).
@@ -754,6 +846,40 @@ __Usage:__
754846

755847

756848

849+
### Dlp_service.search_connections
850+
851+
View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp/samples/generated/v2/dlp_service.search_connections.js).
852+
853+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-privacy-dlp/samples/generated/v2/dlp_service.search_connections.js,samples/README.md)
854+
855+
__Usage:__
856+
857+
858+
`node packages/google-privacy-dlp/samples/generated/v2/dlp_service.search_connections.js`
859+
860+
861+
-----
862+
863+
864+
865+
866+
### Dlp_service.update_connection
867+
868+
View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_connection.js).
869+
870+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_connection.js,samples/README.md)
871+
872+
__Usage:__
873+
874+
875+
`node packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_connection.js`
876+
877+
878+
-----
879+
880+
881+
882+
757883
### Dlp_service.update_deidentify_template
758884

759885
View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_deidentify_template.js).
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// ** This file is automatically generated by gapic-generator-typescript. **
16+
// ** https://github.com/googleapis/gapic-generator-typescript **
17+
// ** All changes to this file may be overwritten. **
18+
19+
20+
21+
'use strict';
22+
23+
function main(parent, connection) {
24+
// [START dlp_v2_generated_DlpService_CreateConnection_async]
25+
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
29+
* TODO(developer): Uncomment these variables before running the sample.
30+
*/
31+
/**
32+
* Required. Parent resource name in the format:
33+
* `projects/{project}/locations/{location}`.
34+
*/
35+
// const parent = 'abc123'
36+
/**
37+
* Required. The connection resource.
38+
*/
39+
// const connection = {}
40+
41+
// Imports the Dlp library
42+
const {DlpServiceClient} = require('@google-cloud/dlp').v2;
43+
44+
// Instantiates a client
45+
const dlpClient = new DlpServiceClient();
46+
47+
async function callCreateConnection() {
48+
// Construct request
49+
const request = {
50+
parent,
51+
connection,
52+
};
53+
54+
// Run request
55+
const response = await dlpClient.createConnection(request);
56+
console.log(response);
57+
}
58+
59+
callCreateConnection();
60+
// [END dlp_v2_generated_DlpService_CreateConnection_async]
61+
}
62+
63+
process.on('unhandledRejection', err => {
64+
console.error(err.message);
65+
process.exitCode = 1;
66+
});
67+
main(...process.argv.slice(2));
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// ** This file is automatically generated by gapic-generator-typescript. **
16+
// ** https://github.com/googleapis/gapic-generator-typescript **
17+
// ** All changes to this file may be overwritten. **
18+
19+
20+
21+
'use strict';
22+
23+
function main(name) {
24+
// [START dlp_v2_generated_DlpService_DeleteConnection_async]
25+
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
29+
* TODO(developer): Uncomment these variables before running the sample.
30+
*/
31+
/**
32+
* Required. Resource name of the Connection to be deleted, in the format:
33+
* `projects/{project}/locations/{location}/connections/{connection}`.
34+
*/
35+
// const name = 'abc123'
36+
37+
// Imports the Dlp library
38+
const {DlpServiceClient} = require('@google-cloud/dlp').v2;
39+
40+
// Instantiates a client
41+
const dlpClient = new DlpServiceClient();
42+
43+
async function callDeleteConnection() {
44+
// Construct request
45+
const request = {
46+
name,
47+
};
48+
49+
// Run request
50+
const response = await dlpClient.deleteConnection(request);
51+
console.log(response);
52+
}
53+
54+
callDeleteConnection();
55+
// [END dlp_v2_generated_DlpService_DeleteConnection_async]
56+
}
57+
58+
process.on('unhandledRejection', err => {
59+
console.error(err.message);
60+
process.exitCode = 1;
61+
});
62+
main(...process.argv.slice(2));

0 commit comments

Comments
 (0)