@google-cloud/dlp 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +5 -0
- package/build/protos/google/privacy/dlp/v2/dlp.proto +1088 -262
- package/build/protos/google/privacy/dlp/v2/storage.proto +85 -39
- package/build/protos/protos.d.ts +4101 -40
- package/build/protos/protos.js +17268 -6356
- package/build/protos/protos.json +1140 -20
- package/build/src/v2/dlp_service_client.d.ts +412 -90
- package/build/src/v2/dlp_service_client.js +359 -46
- package/build/src/v2/dlp_service_client_config.json +25 -0
- package/package.json +6 -6
|
@@ -68,8 +68,7 @@ class DlpServiceClient {
|
|
|
68
68
|
* API remote host.
|
|
69
69
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
|
70
70
|
* Follows the structure of {@link gapicConfig}.
|
|
71
|
-
* @param {boolean
|
|
72
|
-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
|
71
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
|
73
72
|
* For more information, please check the
|
|
74
73
|
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
|
75
74
|
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
|
@@ -77,7 +76,7 @@ class DlpServiceClient {
|
|
|
77
76
|
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
|
78
77
|
* ```
|
|
79
78
|
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
|
80
|
-
* const client = new DlpServiceClient({fallback:
|
|
79
|
+
* const client = new DlpServiceClient({fallback: true}, gax);
|
|
81
80
|
* ```
|
|
82
81
|
*/
|
|
83
82
|
constructor(opts, gaxInstance) {
|
|
@@ -135,7 +134,7 @@ class DlpServiceClient {
|
|
|
135
134
|
if (!opts.fallback) {
|
|
136
135
|
clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
|
|
137
136
|
}
|
|
138
|
-
else
|
|
137
|
+
else {
|
|
139
138
|
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
|
|
140
139
|
}
|
|
141
140
|
if (opts.libName && opts.libVersion) {
|
|
@@ -147,7 +146,9 @@ class DlpServiceClient {
|
|
|
147
146
|
// identifiers to uniquely identify resources within the API.
|
|
148
147
|
// Create useful helper objects for these.
|
|
149
148
|
this.pathTemplates = {
|
|
149
|
+
discoveryConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/discoveryConfigs/{discovery_config}'),
|
|
150
150
|
findingPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/findings/{finding}'),
|
|
151
|
+
locationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}'),
|
|
151
152
|
organizationPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}'),
|
|
152
153
|
organizationDeidentifyTemplatePathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/deidentifyTemplates/{deidentify_template}'),
|
|
153
154
|
organizationInspectTemplatePathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/inspectTemplates/{inspect_template}'),
|
|
@@ -175,6 +176,7 @@ class DlpServiceClient {
|
|
|
175
176
|
listInspectTemplates: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'inspectTemplates'),
|
|
176
177
|
listDeidentifyTemplates: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'deidentifyTemplates'),
|
|
177
178
|
listJobTriggers: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'jobTriggers'),
|
|
179
|
+
listDiscoveryConfigs: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'discoveryConfigs'),
|
|
178
180
|
listDlpJobs: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'jobs'),
|
|
179
181
|
listStoredInfoTypes: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'storedInfoTypes'),
|
|
180
182
|
};
|
|
@@ -234,6 +236,11 @@ class DlpServiceClient {
|
|
|
234
236
|
'listJobTriggers',
|
|
235
237
|
'deleteJobTrigger',
|
|
236
238
|
'activateJobTrigger',
|
|
239
|
+
'createDiscoveryConfig',
|
|
240
|
+
'updateDiscoveryConfig',
|
|
241
|
+
'getDiscoveryConfig',
|
|
242
|
+
'listDiscoveryConfigs',
|
|
243
|
+
'deleteDiscoveryConfig',
|
|
237
244
|
'createDlpJob',
|
|
238
245
|
'listDlpJobs',
|
|
239
246
|
'getDlpJob',
|
|
@@ -703,6 +710,90 @@ class DlpServiceClient {
|
|
|
703
710
|
this.initialize();
|
|
704
711
|
return this.innerApiCalls.activateJobTrigger(request, options, callback);
|
|
705
712
|
}
|
|
713
|
+
createDiscoveryConfig(request, optionsOrCallback, callback) {
|
|
714
|
+
var _a;
|
|
715
|
+
request = request || {};
|
|
716
|
+
let options;
|
|
717
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
718
|
+
callback = optionsOrCallback;
|
|
719
|
+
options = {};
|
|
720
|
+
}
|
|
721
|
+
else {
|
|
722
|
+
options = optionsOrCallback;
|
|
723
|
+
}
|
|
724
|
+
options = options || {};
|
|
725
|
+
options.otherArgs = options.otherArgs || {};
|
|
726
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
727
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
728
|
+
this._gaxModule.routingHeader.fromParams({
|
|
729
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
730
|
+
});
|
|
731
|
+
this.initialize();
|
|
732
|
+
return this.innerApiCalls.createDiscoveryConfig(request, options, callback);
|
|
733
|
+
}
|
|
734
|
+
updateDiscoveryConfig(request, optionsOrCallback, callback) {
|
|
735
|
+
var _a;
|
|
736
|
+
request = request || {};
|
|
737
|
+
let options;
|
|
738
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
739
|
+
callback = optionsOrCallback;
|
|
740
|
+
options = {};
|
|
741
|
+
}
|
|
742
|
+
else {
|
|
743
|
+
options = optionsOrCallback;
|
|
744
|
+
}
|
|
745
|
+
options = options || {};
|
|
746
|
+
options.otherArgs = options.otherArgs || {};
|
|
747
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
748
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
749
|
+
this._gaxModule.routingHeader.fromParams({
|
|
750
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
751
|
+
});
|
|
752
|
+
this.initialize();
|
|
753
|
+
return this.innerApiCalls.updateDiscoveryConfig(request, options, callback);
|
|
754
|
+
}
|
|
755
|
+
getDiscoveryConfig(request, optionsOrCallback, callback) {
|
|
756
|
+
var _a;
|
|
757
|
+
request = request || {};
|
|
758
|
+
let options;
|
|
759
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
760
|
+
callback = optionsOrCallback;
|
|
761
|
+
options = {};
|
|
762
|
+
}
|
|
763
|
+
else {
|
|
764
|
+
options = optionsOrCallback;
|
|
765
|
+
}
|
|
766
|
+
options = options || {};
|
|
767
|
+
options.otherArgs = options.otherArgs || {};
|
|
768
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
769
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
770
|
+
this._gaxModule.routingHeader.fromParams({
|
|
771
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
772
|
+
});
|
|
773
|
+
this.initialize();
|
|
774
|
+
return this.innerApiCalls.getDiscoveryConfig(request, options, callback);
|
|
775
|
+
}
|
|
776
|
+
deleteDiscoveryConfig(request, optionsOrCallback, callback) {
|
|
777
|
+
var _a;
|
|
778
|
+
request = request || {};
|
|
779
|
+
let options;
|
|
780
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
781
|
+
callback = optionsOrCallback;
|
|
782
|
+
options = {};
|
|
783
|
+
}
|
|
784
|
+
else {
|
|
785
|
+
options = optionsOrCallback;
|
|
786
|
+
}
|
|
787
|
+
options = options || {};
|
|
788
|
+
options.otherArgs = options.otherArgs || {};
|
|
789
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
790
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
791
|
+
this._gaxModule.routingHeader.fromParams({
|
|
792
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
793
|
+
});
|
|
794
|
+
this.initialize();
|
|
795
|
+
return this.innerApiCalls.deleteDiscoveryConfig(request, options, callback);
|
|
796
|
+
}
|
|
706
797
|
createDlpJob(request, optionsOrCallback, callback) {
|
|
707
798
|
var _a;
|
|
708
799
|
request = request || {};
|
|
@@ -960,15 +1051,15 @@ class DlpServiceClient {
|
|
|
960
1051
|
*
|
|
961
1052
|
* parent=projects/example-project/locations/europe-west3
|
|
962
1053
|
* @param {string} request.pageToken
|
|
963
|
-
* Page token to continue retrieval. Comes from previous call
|
|
1054
|
+
* Page token to continue retrieval. Comes from the previous call
|
|
964
1055
|
* to `ListInspectTemplates`.
|
|
965
1056
|
* @param {number} request.pageSize
|
|
966
|
-
* Size of the page
|
|
967
|
-
* a page of max size 100.
|
|
1057
|
+
* Size of the page. This value can be limited by the server. If zero server
|
|
1058
|
+
* returns a page of max size 100.
|
|
968
1059
|
* @param {string} request.orderBy
|
|
969
1060
|
* Comma separated list of fields to order by,
|
|
970
|
-
* followed by `asc` or `desc` postfix. This list is case
|
|
971
|
-
* default sorting order is ascending
|
|
1061
|
+
* followed by `asc` or `desc` postfix. This list is case insensitive. The
|
|
1062
|
+
* default sorting order is ascending. Redundant space characters are
|
|
972
1063
|
* insignificant.
|
|
973
1064
|
*
|
|
974
1065
|
* Example: `name asc,update_time, create_time desc`
|
|
@@ -1035,15 +1126,15 @@ class DlpServiceClient {
|
|
|
1035
1126
|
*
|
|
1036
1127
|
* parent=projects/example-project/locations/europe-west3
|
|
1037
1128
|
* @param {string} request.pageToken
|
|
1038
|
-
* Page token to continue retrieval. Comes from previous call
|
|
1129
|
+
* Page token to continue retrieval. Comes from the previous call
|
|
1039
1130
|
* to `ListInspectTemplates`.
|
|
1040
1131
|
* @param {number} request.pageSize
|
|
1041
|
-
* Size of the page
|
|
1042
|
-
* a page of max size 100.
|
|
1132
|
+
* Size of the page. This value can be limited by the server. If zero server
|
|
1133
|
+
* returns a page of max size 100.
|
|
1043
1134
|
* @param {string} request.orderBy
|
|
1044
1135
|
* Comma separated list of fields to order by,
|
|
1045
|
-
* followed by `asc` or `desc` postfix. This list is case
|
|
1046
|
-
* default sorting order is ascending
|
|
1136
|
+
* followed by `asc` or `desc` postfix. This list is case insensitive. The
|
|
1137
|
+
* default sorting order is ascending. Redundant space characters are
|
|
1047
1138
|
* insignificant.
|
|
1048
1139
|
*
|
|
1049
1140
|
* Example: `name asc,update_time, create_time desc`
|
|
@@ -1130,15 +1221,15 @@ class DlpServiceClient {
|
|
|
1130
1221
|
*
|
|
1131
1222
|
* parent=projects/example-project/locations/europe-west3
|
|
1132
1223
|
* @param {string} request.pageToken
|
|
1133
|
-
* Page token to continue retrieval. Comes from previous call
|
|
1224
|
+
* Page token to continue retrieval. Comes from the previous call
|
|
1134
1225
|
* to `ListDeidentifyTemplates`.
|
|
1135
1226
|
* @param {number} request.pageSize
|
|
1136
|
-
* Size of the page
|
|
1137
|
-
* a page of max size 100.
|
|
1227
|
+
* Size of the page. This value can be limited by the server. If zero server
|
|
1228
|
+
* returns a page of max size 100.
|
|
1138
1229
|
* @param {string} request.orderBy
|
|
1139
1230
|
* Comma separated list of fields to order by,
|
|
1140
|
-
* followed by `asc` or `desc` postfix. This list is case
|
|
1141
|
-
* default sorting order is ascending
|
|
1231
|
+
* followed by `asc` or `desc` postfix. This list is case insensitive. The
|
|
1232
|
+
* default sorting order is ascending. Redundant space characters are
|
|
1142
1233
|
* insignificant.
|
|
1143
1234
|
*
|
|
1144
1235
|
* Example: `name asc,update_time, create_time desc`
|
|
@@ -1205,15 +1296,15 @@ class DlpServiceClient {
|
|
|
1205
1296
|
*
|
|
1206
1297
|
* parent=projects/example-project/locations/europe-west3
|
|
1207
1298
|
* @param {string} request.pageToken
|
|
1208
|
-
* Page token to continue retrieval. Comes from previous call
|
|
1299
|
+
* Page token to continue retrieval. Comes from the previous call
|
|
1209
1300
|
* to `ListDeidentifyTemplates`.
|
|
1210
1301
|
* @param {number} request.pageSize
|
|
1211
|
-
* Size of the page
|
|
1212
|
-
* a page of max size 100.
|
|
1302
|
+
* Size of the page. This value can be limited by the server. If zero server
|
|
1303
|
+
* returns a page of max size 100.
|
|
1213
1304
|
* @param {string} request.orderBy
|
|
1214
1305
|
* Comma separated list of fields to order by,
|
|
1215
|
-
* followed by `asc` or `desc` postfix. This list is case
|
|
1216
|
-
* default sorting order is ascending
|
|
1306
|
+
* followed by `asc` or `desc` postfix. This list is case insensitive. The
|
|
1307
|
+
* default sorting order is ascending. Redundant space characters are
|
|
1217
1308
|
* insignificant.
|
|
1218
1309
|
*
|
|
1219
1310
|
* Example: `name asc,update_time, create_time desc`
|
|
@@ -1296,15 +1387,15 @@ class DlpServiceClient {
|
|
|
1296
1387
|
*
|
|
1297
1388
|
* parent=projects/example-project/locations/europe-west3
|
|
1298
1389
|
* @param {string} request.pageToken
|
|
1299
|
-
* Page token to continue retrieval. Comes from previous call
|
|
1390
|
+
* Page token to continue retrieval. Comes from the previous call
|
|
1300
1391
|
* to ListJobTriggers. `order_by` field must not
|
|
1301
1392
|
* change for subsequent calls.
|
|
1302
1393
|
* @param {number} request.pageSize
|
|
1303
|
-
* Size of the page
|
|
1394
|
+
* Size of the page. This value can be limited by a server.
|
|
1304
1395
|
* @param {string} request.orderBy
|
|
1305
1396
|
* Comma separated list of triggeredJob fields to order by,
|
|
1306
|
-
* followed by `asc` or `desc` postfix. This list is case
|
|
1307
|
-
* default sorting order is ascending
|
|
1397
|
+
* followed by `asc` or `desc` postfix. This list is case insensitive. The
|
|
1398
|
+
* default sorting order is ascending. Redundant space characters are
|
|
1308
1399
|
* insignificant.
|
|
1309
1400
|
*
|
|
1310
1401
|
* Example: `name asc,update_time, create_time desc`
|
|
@@ -1396,15 +1487,15 @@ class DlpServiceClient {
|
|
|
1396
1487
|
*
|
|
1397
1488
|
* parent=projects/example-project/locations/europe-west3
|
|
1398
1489
|
* @param {string} request.pageToken
|
|
1399
|
-
* Page token to continue retrieval. Comes from previous call
|
|
1490
|
+
* Page token to continue retrieval. Comes from the previous call
|
|
1400
1491
|
* to ListJobTriggers. `order_by` field must not
|
|
1401
1492
|
* change for subsequent calls.
|
|
1402
1493
|
* @param {number} request.pageSize
|
|
1403
|
-
* Size of the page
|
|
1494
|
+
* Size of the page. This value can be limited by a server.
|
|
1404
1495
|
* @param {string} request.orderBy
|
|
1405
1496
|
* Comma separated list of triggeredJob fields to order by,
|
|
1406
|
-
* followed by `asc` or `desc` postfix. This list is case
|
|
1407
|
-
* default sorting order is ascending
|
|
1497
|
+
* followed by `asc` or `desc` postfix. This list is case insensitive. The
|
|
1498
|
+
* default sorting order is ascending. Redundant space characters are
|
|
1408
1499
|
* insignificant.
|
|
1409
1500
|
*
|
|
1410
1501
|
* Example: `name asc,update_time, create_time desc`
|
|
@@ -1473,6 +1564,150 @@ class DlpServiceClient {
|
|
|
1473
1564
|
this.initialize();
|
|
1474
1565
|
return this.descriptors.page.listJobTriggers.asyncIterate(this.innerApiCalls['listJobTriggers'], request, callSettings);
|
|
1475
1566
|
}
|
|
1567
|
+
listDiscoveryConfigs(request, optionsOrCallback, callback) {
|
|
1568
|
+
var _a;
|
|
1569
|
+
request = request || {};
|
|
1570
|
+
let options;
|
|
1571
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1572
|
+
callback = optionsOrCallback;
|
|
1573
|
+
options = {};
|
|
1574
|
+
}
|
|
1575
|
+
else {
|
|
1576
|
+
options = optionsOrCallback;
|
|
1577
|
+
}
|
|
1578
|
+
options = options || {};
|
|
1579
|
+
options.otherArgs = options.otherArgs || {};
|
|
1580
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1581
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1582
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1583
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
1584
|
+
});
|
|
1585
|
+
this.initialize();
|
|
1586
|
+
return this.innerApiCalls.listDiscoveryConfigs(request, options, callback);
|
|
1587
|
+
}
|
|
1588
|
+
/**
|
|
1589
|
+
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
|
|
1590
|
+
* @param {Object} request
|
|
1591
|
+
* The request object that will be sent.
|
|
1592
|
+
* @param {string} request.parent
|
|
1593
|
+
* Required. Parent resource name.
|
|
1594
|
+
*
|
|
1595
|
+
* The format of this value is as follows:
|
|
1596
|
+
* `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
|
|
1597
|
+
*
|
|
1598
|
+
* The following example `parent` string specifies a parent project with the
|
|
1599
|
+
* identifier `example-project`, and specifies the `europe-west3` location
|
|
1600
|
+
* for processing data:
|
|
1601
|
+
*
|
|
1602
|
+
* parent=projects/example-project/locations/europe-west3
|
|
1603
|
+
* @param {string} request.pageToken
|
|
1604
|
+
* Page token to continue retrieval. Comes from the previous call
|
|
1605
|
+
* to ListDiscoveryConfigs. `order_by` field must not
|
|
1606
|
+
* change for subsequent calls.
|
|
1607
|
+
* @param {number} request.pageSize
|
|
1608
|
+
* Size of the page. This value can be limited by a server.
|
|
1609
|
+
* @param {string} request.orderBy
|
|
1610
|
+
* Comma separated list of config fields to order by,
|
|
1611
|
+
* followed by `asc` or `desc` postfix. This list is case insensitive. The
|
|
1612
|
+
* default sorting order is ascending. Redundant space characters are
|
|
1613
|
+
* insignificant.
|
|
1614
|
+
*
|
|
1615
|
+
* Example: `name asc,update_time, create_time desc`
|
|
1616
|
+
*
|
|
1617
|
+
* Supported fields are:
|
|
1618
|
+
*
|
|
1619
|
+
* - `last_run_time`: corresponds to the last time the DiscoveryConfig ran.
|
|
1620
|
+
* - `name`: corresponds to the DiscoveryConfig's name.
|
|
1621
|
+
* - `status`: corresponds to DiscoveryConfig's status.
|
|
1622
|
+
* @param {object} [options]
|
|
1623
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1624
|
+
* @returns {Stream}
|
|
1625
|
+
* An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.DiscoveryConfig|DiscoveryConfig} on 'data' event.
|
|
1626
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1627
|
+
* times as needed. Note that it can affect your quota.
|
|
1628
|
+
* We recommend using `listDiscoveryConfigsAsync()`
|
|
1629
|
+
* method described below for async iteration which you can stop as needed.
|
|
1630
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1631
|
+
* for more details and examples.
|
|
1632
|
+
*/
|
|
1633
|
+
listDiscoveryConfigsStream(request, options) {
|
|
1634
|
+
var _a;
|
|
1635
|
+
request = request || {};
|
|
1636
|
+
options = options || {};
|
|
1637
|
+
options.otherArgs = options.otherArgs || {};
|
|
1638
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1639
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1640
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1641
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
1642
|
+
});
|
|
1643
|
+
const defaultCallSettings = this._defaults['listDiscoveryConfigs'];
|
|
1644
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1645
|
+
this.initialize();
|
|
1646
|
+
return this.descriptors.page.listDiscoveryConfigs.createStream(this.innerApiCalls.listDiscoveryConfigs, request, callSettings);
|
|
1647
|
+
}
|
|
1648
|
+
/**
|
|
1649
|
+
* Equivalent to `listDiscoveryConfigs`, but returns an iterable object.
|
|
1650
|
+
*
|
|
1651
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
1652
|
+
* @param {Object} request
|
|
1653
|
+
* The request object that will be sent.
|
|
1654
|
+
* @param {string} request.parent
|
|
1655
|
+
* Required. Parent resource name.
|
|
1656
|
+
*
|
|
1657
|
+
* The format of this value is as follows:
|
|
1658
|
+
* `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
|
|
1659
|
+
*
|
|
1660
|
+
* The following example `parent` string specifies a parent project with the
|
|
1661
|
+
* identifier `example-project`, and specifies the `europe-west3` location
|
|
1662
|
+
* for processing data:
|
|
1663
|
+
*
|
|
1664
|
+
* parent=projects/example-project/locations/europe-west3
|
|
1665
|
+
* @param {string} request.pageToken
|
|
1666
|
+
* Page token to continue retrieval. Comes from the previous call
|
|
1667
|
+
* to ListDiscoveryConfigs. `order_by` field must not
|
|
1668
|
+
* change for subsequent calls.
|
|
1669
|
+
* @param {number} request.pageSize
|
|
1670
|
+
* Size of the page. This value can be limited by a server.
|
|
1671
|
+
* @param {string} request.orderBy
|
|
1672
|
+
* Comma separated list of config fields to order by,
|
|
1673
|
+
* followed by `asc` or `desc` postfix. This list is case insensitive. The
|
|
1674
|
+
* default sorting order is ascending. Redundant space characters are
|
|
1675
|
+
* insignificant.
|
|
1676
|
+
*
|
|
1677
|
+
* Example: `name asc,update_time, create_time desc`
|
|
1678
|
+
*
|
|
1679
|
+
* Supported fields are:
|
|
1680
|
+
*
|
|
1681
|
+
* - `last_run_time`: corresponds to the last time the DiscoveryConfig ran.
|
|
1682
|
+
* - `name`: corresponds to the DiscoveryConfig's name.
|
|
1683
|
+
* - `status`: corresponds to DiscoveryConfig's status.
|
|
1684
|
+
* @param {object} [options]
|
|
1685
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1686
|
+
* @returns {Object}
|
|
1687
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
1688
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
1689
|
+
* {@link protos.google.privacy.dlp.v2.DiscoveryConfig|DiscoveryConfig}. The API will be called under the hood as needed, once per the page,
|
|
1690
|
+
* so you can stop the iteration when you don't need more results.
|
|
1691
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1692
|
+
* for more details and examples.
|
|
1693
|
+
* @example <caption>include:samples/generated/v2/dlp_service.list_discovery_configs.js</caption>
|
|
1694
|
+
* region_tag:dlp_v2_generated_DlpService_ListDiscoveryConfigs_async
|
|
1695
|
+
*/
|
|
1696
|
+
listDiscoveryConfigsAsync(request, options) {
|
|
1697
|
+
var _a;
|
|
1698
|
+
request = request || {};
|
|
1699
|
+
options = options || {};
|
|
1700
|
+
options.otherArgs = options.otherArgs || {};
|
|
1701
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1702
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1703
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1704
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
1705
|
+
});
|
|
1706
|
+
const defaultCallSettings = this._defaults['listDiscoveryConfigs'];
|
|
1707
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1708
|
+
this.initialize();
|
|
1709
|
+
return this.descriptors.page.listDiscoveryConfigs.asyncIterate(this.innerApiCalls['listDiscoveryConfigs'], request, callSettings);
|
|
1710
|
+
}
|
|
1476
1711
|
listDlpJobs(request, optionsOrCallback, callback) {
|
|
1477
1712
|
var _a;
|
|
1478
1713
|
request = request || {};
|
|
@@ -1552,8 +1787,8 @@ class DlpServiceClient {
|
|
|
1552
1787
|
* The type of job. Defaults to `DlpJobType.INSPECT`
|
|
1553
1788
|
* @param {string} request.orderBy
|
|
1554
1789
|
* Comma separated list of fields to order by,
|
|
1555
|
-
* followed by `asc` or `desc` postfix. This list is case
|
|
1556
|
-
* default sorting order is ascending
|
|
1790
|
+
* followed by `asc` or `desc` postfix. This list is case insensitive. The
|
|
1791
|
+
* default sorting order is ascending. Redundant space characters are
|
|
1557
1792
|
* insignificant.
|
|
1558
1793
|
*
|
|
1559
1794
|
* Example: `name asc, end_time asc, create_time desc`
|
|
@@ -1652,8 +1887,8 @@ class DlpServiceClient {
|
|
|
1652
1887
|
* The type of job. Defaults to `DlpJobType.INSPECT`
|
|
1653
1888
|
* @param {string} request.orderBy
|
|
1654
1889
|
* Comma separated list of fields to order by,
|
|
1655
|
-
* followed by `asc` or `desc` postfix. This list is case
|
|
1656
|
-
* default sorting order is ascending
|
|
1890
|
+
* followed by `asc` or `desc` postfix. This list is case insensitive. The
|
|
1891
|
+
* default sorting order is ascending. Redundant space characters are
|
|
1657
1892
|
* insignificant.
|
|
1658
1893
|
*
|
|
1659
1894
|
* Example: `name asc, end_time asc, create_time desc`
|
|
@@ -1736,15 +1971,15 @@ class DlpServiceClient {
|
|
|
1736
1971
|
*
|
|
1737
1972
|
* parent=projects/example-project/locations/europe-west3
|
|
1738
1973
|
* @param {string} request.pageToken
|
|
1739
|
-
* Page token to continue retrieval. Comes from previous call
|
|
1974
|
+
* Page token to continue retrieval. Comes from the previous call
|
|
1740
1975
|
* to `ListStoredInfoTypes`.
|
|
1741
1976
|
* @param {number} request.pageSize
|
|
1742
|
-
* Size of the page
|
|
1743
|
-
* a page of max size 100.
|
|
1977
|
+
* Size of the page. This value can be limited by the server. If zero server
|
|
1978
|
+
* returns a page of max size 100.
|
|
1744
1979
|
* @param {string} request.orderBy
|
|
1745
1980
|
* Comma separated list of fields to order by,
|
|
1746
|
-
* followed by `asc` or `desc` postfix. This list is case
|
|
1747
|
-
* default sorting order is ascending
|
|
1981
|
+
* followed by `asc` or `desc` postfix. This list is case insensitive. The
|
|
1982
|
+
* default sorting order is ascending. Redundant space characters are
|
|
1748
1983
|
* insignificant.
|
|
1749
1984
|
*
|
|
1750
1985
|
* Example: `name asc, display_name, create_time desc`
|
|
@@ -1808,15 +2043,15 @@ class DlpServiceClient {
|
|
|
1808
2043
|
*
|
|
1809
2044
|
* parent=projects/example-project/locations/europe-west3
|
|
1810
2045
|
* @param {string} request.pageToken
|
|
1811
|
-
* Page token to continue retrieval. Comes from previous call
|
|
2046
|
+
* Page token to continue retrieval. Comes from the previous call
|
|
1812
2047
|
* to `ListStoredInfoTypes`.
|
|
1813
2048
|
* @param {number} request.pageSize
|
|
1814
|
-
* Size of the page
|
|
1815
|
-
* a page of max size 100.
|
|
2049
|
+
* Size of the page. This value can be limited by the server. If zero server
|
|
2050
|
+
* returns a page of max size 100.
|
|
1816
2051
|
* @param {string} request.orderBy
|
|
1817
2052
|
* Comma separated list of fields to order by,
|
|
1818
|
-
* followed by `asc` or `desc` postfix. This list is case
|
|
1819
|
-
* default sorting order is ascending
|
|
2053
|
+
* followed by `asc` or `desc` postfix. This list is case insensitive. The
|
|
2054
|
+
* default sorting order is ascending. Redundant space characters are
|
|
1820
2055
|
* insignificant.
|
|
1821
2056
|
*
|
|
1822
2057
|
* Example: `name asc, display_name, create_time desc`
|
|
@@ -1915,6 +2150,51 @@ class DlpServiceClient {
|
|
|
1915
2150
|
// --------------------
|
|
1916
2151
|
// -- Path templates --
|
|
1917
2152
|
// --------------------
|
|
2153
|
+
/**
|
|
2154
|
+
* Return a fully-qualified discoveryConfig resource name string.
|
|
2155
|
+
*
|
|
2156
|
+
* @param {string} project
|
|
2157
|
+
* @param {string} location
|
|
2158
|
+
* @param {string} discovery_config
|
|
2159
|
+
* @returns {string} Resource name string.
|
|
2160
|
+
*/
|
|
2161
|
+
discoveryConfigPath(project, location, discoveryConfig) {
|
|
2162
|
+
return this.pathTemplates.discoveryConfigPathTemplate.render({
|
|
2163
|
+
project: project,
|
|
2164
|
+
location: location,
|
|
2165
|
+
discovery_config: discoveryConfig,
|
|
2166
|
+
});
|
|
2167
|
+
}
|
|
2168
|
+
/**
|
|
2169
|
+
* Parse the project from DiscoveryConfig resource.
|
|
2170
|
+
*
|
|
2171
|
+
* @param {string} discoveryConfigName
|
|
2172
|
+
* A fully-qualified path representing DiscoveryConfig resource.
|
|
2173
|
+
* @returns {string} A string representing the project.
|
|
2174
|
+
*/
|
|
2175
|
+
matchProjectFromDiscoveryConfigName(discoveryConfigName) {
|
|
2176
|
+
return this.pathTemplates.discoveryConfigPathTemplate.match(discoveryConfigName).project;
|
|
2177
|
+
}
|
|
2178
|
+
/**
|
|
2179
|
+
* Parse the location from DiscoveryConfig resource.
|
|
2180
|
+
*
|
|
2181
|
+
* @param {string} discoveryConfigName
|
|
2182
|
+
* A fully-qualified path representing DiscoveryConfig resource.
|
|
2183
|
+
* @returns {string} A string representing the location.
|
|
2184
|
+
*/
|
|
2185
|
+
matchLocationFromDiscoveryConfigName(discoveryConfigName) {
|
|
2186
|
+
return this.pathTemplates.discoveryConfigPathTemplate.match(discoveryConfigName).location;
|
|
2187
|
+
}
|
|
2188
|
+
/**
|
|
2189
|
+
* Parse the discovery_config from DiscoveryConfig resource.
|
|
2190
|
+
*
|
|
2191
|
+
* @param {string} discoveryConfigName
|
|
2192
|
+
* A fully-qualified path representing DiscoveryConfig resource.
|
|
2193
|
+
* @returns {string} A string representing the discovery_config.
|
|
2194
|
+
*/
|
|
2195
|
+
matchDiscoveryConfigFromDiscoveryConfigName(discoveryConfigName) {
|
|
2196
|
+
return this.pathTemplates.discoveryConfigPathTemplate.match(discoveryConfigName).discovery_config;
|
|
2197
|
+
}
|
|
1918
2198
|
/**
|
|
1919
2199
|
* Return a fully-qualified finding resource name string.
|
|
1920
2200
|
*
|
|
@@ -1960,6 +2240,39 @@ class DlpServiceClient {
|
|
|
1960
2240
|
matchFindingFromFindingName(findingName) {
|
|
1961
2241
|
return this.pathTemplates.findingPathTemplate.match(findingName).finding;
|
|
1962
2242
|
}
|
|
2243
|
+
/**
|
|
2244
|
+
* Return a fully-qualified location resource name string.
|
|
2245
|
+
*
|
|
2246
|
+
* @param {string} project
|
|
2247
|
+
* @param {string} location
|
|
2248
|
+
* @returns {string} Resource name string.
|
|
2249
|
+
*/
|
|
2250
|
+
locationPath(project, location) {
|
|
2251
|
+
return this.pathTemplates.locationPathTemplate.render({
|
|
2252
|
+
project: project,
|
|
2253
|
+
location: location,
|
|
2254
|
+
});
|
|
2255
|
+
}
|
|
2256
|
+
/**
|
|
2257
|
+
* Parse the project from Location resource.
|
|
2258
|
+
*
|
|
2259
|
+
* @param {string} locationName
|
|
2260
|
+
* A fully-qualified path representing Location resource.
|
|
2261
|
+
* @returns {string} A string representing the project.
|
|
2262
|
+
*/
|
|
2263
|
+
matchProjectFromLocationName(locationName) {
|
|
2264
|
+
return this.pathTemplates.locationPathTemplate.match(locationName).project;
|
|
2265
|
+
}
|
|
2266
|
+
/**
|
|
2267
|
+
* Parse the location from Location resource.
|
|
2268
|
+
*
|
|
2269
|
+
* @param {string} locationName
|
|
2270
|
+
* A fully-qualified path representing Location resource.
|
|
2271
|
+
* @returns {string} A string representing the location.
|
|
2272
|
+
*/
|
|
2273
|
+
matchLocationFromLocationName(locationName) {
|
|
2274
|
+
return this.pathTemplates.locationPathTemplate.match(locationName).location;
|
|
2275
|
+
}
|
|
1963
2276
|
/**
|
|
1964
2277
|
* Return a fully-qualified organization resource name string.
|
|
1965
2278
|
*
|
|
@@ -130,6 +130,31 @@
|
|
|
130
130
|
"retry_codes_name": "non_idempotent",
|
|
131
131
|
"retry_params_name": "default"
|
|
132
132
|
},
|
|
133
|
+
"CreateDiscoveryConfig": {
|
|
134
|
+
"timeout_millis": 300000,
|
|
135
|
+
"retry_codes_name": "non_idempotent",
|
|
136
|
+
"retry_params_name": "default"
|
|
137
|
+
},
|
|
138
|
+
"UpdateDiscoveryConfig": {
|
|
139
|
+
"timeout_millis": 300000,
|
|
140
|
+
"retry_codes_name": "non_idempotent",
|
|
141
|
+
"retry_params_name": "default"
|
|
142
|
+
},
|
|
143
|
+
"GetDiscoveryConfig": {
|
|
144
|
+
"timeout_millis": 300000,
|
|
145
|
+
"retry_codes_name": "idempotent",
|
|
146
|
+
"retry_params_name": "default"
|
|
147
|
+
},
|
|
148
|
+
"ListDiscoveryConfigs": {
|
|
149
|
+
"timeout_millis": 300000,
|
|
150
|
+
"retry_codes_name": "idempotent",
|
|
151
|
+
"retry_params_name": "default"
|
|
152
|
+
},
|
|
153
|
+
"DeleteDiscoveryConfig": {
|
|
154
|
+
"timeout_millis": 300000,
|
|
155
|
+
"retry_codes_name": "idempotent",
|
|
156
|
+
"retry_params_name": "default"
|
|
157
|
+
},
|
|
133
158
|
"CreateDlpJob": {
|
|
134
159
|
"timeout_millis": 300000,
|
|
135
160
|
"retry_codes_name": "non_idempotent",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@google-cloud/dlp",
|
|
3
3
|
"description": "DLP API client for Node.js",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.1.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Google Inc",
|
|
7
7
|
"engines": {
|
|
@@ -55,16 +55,16 @@
|
|
|
55
55
|
"@types/node": "^20.4.5",
|
|
56
56
|
"@types/sinon": "^10.0.0",
|
|
57
57
|
"c8": "^8.0.1",
|
|
58
|
-
"gapic-tools": "^0.
|
|
58
|
+
"gapic-tools": "^0.2.0",
|
|
59
59
|
"gts": "^5.0.0",
|
|
60
60
|
"jsdoc": "^4.0.0",
|
|
61
|
-
"jsdoc-fresh": "^
|
|
62
|
-
"jsdoc-region-tag": "^
|
|
61
|
+
"jsdoc-fresh": "^3.0.0",
|
|
62
|
+
"jsdoc-region-tag": "^3.0.0",
|
|
63
63
|
"linkinator": "4.1.2",
|
|
64
64
|
"long": "^5.2.3",
|
|
65
65
|
"mocha": "^9.2.2",
|
|
66
|
-
"pack-n-play": "^
|
|
67
|
-
"sinon": "^
|
|
66
|
+
"pack-n-play": "^2.0.0",
|
|
67
|
+
"sinon": "^17.0.0",
|
|
68
68
|
"typescript": "^5.1.6"
|
|
69
69
|
},
|
|
70
70
|
"homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-privacy-dlp"
|