@google-cloud/dlp 5.3.0 → 5.5.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 +7 -0
- package/build/protos/google/privacy/dlp/v2/dlp.proto +561 -17
- package/build/protos/google/privacy/dlp/v2/storage.proto +12 -1
- package/build/protos/protos.d.ts +5389 -2752
- package/build/protos/protos.js +14623 -8286
- package/build/protos/protos.json +642 -2
- package/build/src/v2/dlp_service_client.d.ts +355 -12
- package/build/src/v2/dlp_service_client.js +391 -13
- package/build/src/v2/dlp_service_client_config.json +28 -0
- package/package.json +1 -1
|
@@ -80,7 +80,7 @@ class DlpServiceClient {
|
|
|
80
80
|
* ```
|
|
81
81
|
*/
|
|
82
82
|
constructor(opts, gaxInstance) {
|
|
83
|
-
var _a, _b, _c, _d;
|
|
83
|
+
var _a, _b, _c, _d, _e;
|
|
84
84
|
this._terminated = false;
|
|
85
85
|
this.descriptors = {
|
|
86
86
|
page: {},
|
|
@@ -95,14 +95,17 @@ class DlpServiceClient {
|
|
|
95
95
|
(opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
|
|
96
96
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
97
97
|
}
|
|
98
|
+
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
|
99
|
+
? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
|
|
100
|
+
: undefined;
|
|
98
101
|
this._universeDomain =
|
|
99
|
-
(_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : 'googleapis.com';
|
|
102
|
+
(_c = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : universeDomainEnvVar) !== null && _c !== void 0 ? _c : 'googleapis.com';
|
|
100
103
|
this._servicePath = 'dlp.' + this._universeDomain;
|
|
101
104
|
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
|
|
102
105
|
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
|
|
103
106
|
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
|
|
104
|
-
const clientConfig = (
|
|
105
|
-
const fallback = (
|
|
107
|
+
const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
|
|
108
|
+
const fallback = (_e = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _e !== void 0 ? _e : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
|
|
106
109
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
107
110
|
// Request numeric enum values if REST transport is used.
|
|
108
111
|
opts.numericEnums = true;
|
|
@@ -133,7 +136,7 @@ class DlpServiceClient {
|
|
|
133
136
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
|
134
137
|
// Determine the client header string.
|
|
135
138
|
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
|
|
136
|
-
if (typeof process
|
|
139
|
+
if (typeof process === 'object' && 'versions' in process) {
|
|
137
140
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
|
138
141
|
}
|
|
139
142
|
else {
|
|
@@ -154,6 +157,7 @@ class DlpServiceClient {
|
|
|
154
157
|
// identifiers to uniquely identify resources within the API.
|
|
155
158
|
// Create useful helper objects for these.
|
|
156
159
|
this.pathTemplates = {
|
|
160
|
+
connectionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/connections/{connection}'),
|
|
157
161
|
discoveryConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/discoveryConfigs/{discovery_config}'),
|
|
158
162
|
findingPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/findings/{finding}'),
|
|
159
163
|
locationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}'),
|
|
@@ -197,6 +201,8 @@ class DlpServiceClient {
|
|
|
197
201
|
listProjectDataProfiles: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'projectDataProfiles'),
|
|
198
202
|
listTableDataProfiles: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'tableDataProfiles'),
|
|
199
203
|
listColumnDataProfiles: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'columnDataProfiles'),
|
|
204
|
+
listConnections: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'connections'),
|
|
205
|
+
searchConnections: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'connections'),
|
|
200
206
|
};
|
|
201
207
|
// Put together the default options sent with requests.
|
|
202
208
|
this._defaults = this._gaxGrpc.constructSettings('google.privacy.dlp.v2.DlpService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
|
@@ -275,8 +281,15 @@ class DlpServiceClient {
|
|
|
275
281
|
'getProjectDataProfile',
|
|
276
282
|
'getTableDataProfile',
|
|
277
283
|
'getColumnDataProfile',
|
|
284
|
+
'deleteTableDataProfile',
|
|
278
285
|
'hybridInspectDlpJob',
|
|
279
286
|
'finishDlpJob',
|
|
287
|
+
'createConnection',
|
|
288
|
+
'getConnection',
|
|
289
|
+
'listConnections',
|
|
290
|
+
'searchConnections',
|
|
291
|
+
'deleteConnection',
|
|
292
|
+
'updateConnection',
|
|
280
293
|
];
|
|
281
294
|
for (const methodName of dlpServiceStubMethods) {
|
|
282
295
|
const callPromise = this.dlpServiceStub.then(stub => (...args) => {
|
|
@@ -300,7 +313,7 @@ class DlpServiceClient {
|
|
|
300
313
|
* @returns {string} The DNS address for this service.
|
|
301
314
|
*/
|
|
302
315
|
static get servicePath() {
|
|
303
|
-
if (typeof process
|
|
316
|
+
if (typeof process === 'object' &&
|
|
304
317
|
typeof process.emitWarning === 'function') {
|
|
305
318
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
306
319
|
}
|
|
@@ -312,7 +325,7 @@ class DlpServiceClient {
|
|
|
312
325
|
* @returns {string} The DNS address for this service.
|
|
313
326
|
*/
|
|
314
327
|
static get apiEndpoint() {
|
|
315
|
-
if (typeof process
|
|
328
|
+
if (typeof process === 'object' &&
|
|
316
329
|
typeof process.emitWarning === 'function') {
|
|
317
330
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
318
331
|
}
|
|
@@ -1068,6 +1081,27 @@ class DlpServiceClient {
|
|
|
1068
1081
|
this.initialize();
|
|
1069
1082
|
return this.innerApiCalls.getColumnDataProfile(request, options, callback);
|
|
1070
1083
|
}
|
|
1084
|
+
deleteTableDataProfile(request, optionsOrCallback, callback) {
|
|
1085
|
+
var _a;
|
|
1086
|
+
request = request || {};
|
|
1087
|
+
let options;
|
|
1088
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1089
|
+
callback = optionsOrCallback;
|
|
1090
|
+
options = {};
|
|
1091
|
+
}
|
|
1092
|
+
else {
|
|
1093
|
+
options = optionsOrCallback;
|
|
1094
|
+
}
|
|
1095
|
+
options = options || {};
|
|
1096
|
+
options.otherArgs = options.otherArgs || {};
|
|
1097
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1098
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1099
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1100
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
1101
|
+
});
|
|
1102
|
+
this.initialize();
|
|
1103
|
+
return this.innerApiCalls.deleteTableDataProfile(request, options, callback);
|
|
1104
|
+
}
|
|
1071
1105
|
hybridInspectDlpJob(request, optionsOrCallback, callback) {
|
|
1072
1106
|
var _a;
|
|
1073
1107
|
request = request || {};
|
|
@@ -1110,6 +1144,90 @@ class DlpServiceClient {
|
|
|
1110
1144
|
this.initialize();
|
|
1111
1145
|
return this.innerApiCalls.finishDlpJob(request, options, callback);
|
|
1112
1146
|
}
|
|
1147
|
+
createConnection(request, optionsOrCallback, callback) {
|
|
1148
|
+
var _a;
|
|
1149
|
+
request = request || {};
|
|
1150
|
+
let options;
|
|
1151
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1152
|
+
callback = optionsOrCallback;
|
|
1153
|
+
options = {};
|
|
1154
|
+
}
|
|
1155
|
+
else {
|
|
1156
|
+
options = optionsOrCallback;
|
|
1157
|
+
}
|
|
1158
|
+
options = options || {};
|
|
1159
|
+
options.otherArgs = options.otherArgs || {};
|
|
1160
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1161
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1162
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1163
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
1164
|
+
});
|
|
1165
|
+
this.initialize();
|
|
1166
|
+
return this.innerApiCalls.createConnection(request, options, callback);
|
|
1167
|
+
}
|
|
1168
|
+
getConnection(request, optionsOrCallback, callback) {
|
|
1169
|
+
var _a;
|
|
1170
|
+
request = request || {};
|
|
1171
|
+
let options;
|
|
1172
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1173
|
+
callback = optionsOrCallback;
|
|
1174
|
+
options = {};
|
|
1175
|
+
}
|
|
1176
|
+
else {
|
|
1177
|
+
options = optionsOrCallback;
|
|
1178
|
+
}
|
|
1179
|
+
options = options || {};
|
|
1180
|
+
options.otherArgs = options.otherArgs || {};
|
|
1181
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1182
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1183
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1184
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
1185
|
+
});
|
|
1186
|
+
this.initialize();
|
|
1187
|
+
return this.innerApiCalls.getConnection(request, options, callback);
|
|
1188
|
+
}
|
|
1189
|
+
deleteConnection(request, optionsOrCallback, callback) {
|
|
1190
|
+
var _a;
|
|
1191
|
+
request = request || {};
|
|
1192
|
+
let options;
|
|
1193
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1194
|
+
callback = optionsOrCallback;
|
|
1195
|
+
options = {};
|
|
1196
|
+
}
|
|
1197
|
+
else {
|
|
1198
|
+
options = optionsOrCallback;
|
|
1199
|
+
}
|
|
1200
|
+
options = options || {};
|
|
1201
|
+
options.otherArgs = options.otherArgs || {};
|
|
1202
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1203
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1204
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1205
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
1206
|
+
});
|
|
1207
|
+
this.initialize();
|
|
1208
|
+
return this.innerApiCalls.deleteConnection(request, options, callback);
|
|
1209
|
+
}
|
|
1210
|
+
updateConnection(request, optionsOrCallback, callback) {
|
|
1211
|
+
var _a;
|
|
1212
|
+
request = request || {};
|
|
1213
|
+
let options;
|
|
1214
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1215
|
+
callback = optionsOrCallback;
|
|
1216
|
+
options = {};
|
|
1217
|
+
}
|
|
1218
|
+
else {
|
|
1219
|
+
options = optionsOrCallback;
|
|
1220
|
+
}
|
|
1221
|
+
options = options || {};
|
|
1222
|
+
options.otherArgs = options.otherArgs || {};
|
|
1223
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1224
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1225
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1226
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
1227
|
+
});
|
|
1228
|
+
this.initialize();
|
|
1229
|
+
return this.innerApiCalls.updateConnection(request, options, callback);
|
|
1230
|
+
}
|
|
1113
1231
|
listInspectTemplates(request, optionsOrCallback, callback) {
|
|
1114
1232
|
var _a;
|
|
1115
1233
|
request = request || {};
|
|
@@ -2242,7 +2360,7 @@ class DlpServiceClient {
|
|
|
2242
2360
|
*
|
|
2243
2361
|
* Supported fields are:
|
|
2244
2362
|
*
|
|
2245
|
-
* - `project_id`:
|
|
2363
|
+
* - `project_id`: Google Cloud project ID
|
|
2246
2364
|
* - `sensitivity_level`: How sensitive the data in a project is, at most.
|
|
2247
2365
|
* - `data_risk_level`: How much risk is associated with this data.
|
|
2248
2366
|
* - `profile_last_generated`: When the profile was last updated in epoch
|
|
@@ -2320,7 +2438,7 @@ class DlpServiceClient {
|
|
|
2320
2438
|
*
|
|
2321
2439
|
* Supported fields are:
|
|
2322
2440
|
*
|
|
2323
|
-
* - `project_id`:
|
|
2441
|
+
* - `project_id`: Google Cloud project ID
|
|
2324
2442
|
* - `sensitivity_level`: How sensitive the data in a project is, at most.
|
|
2325
2443
|
* - `data_risk_level`: How much risk is associated with this data.
|
|
2326
2444
|
* - `profile_last_generated`: When the profile was last updated in epoch
|
|
@@ -2421,7 +2539,7 @@ class DlpServiceClient {
|
|
|
2421
2539
|
*
|
|
2422
2540
|
* Supported fields are:
|
|
2423
2541
|
*
|
|
2424
|
-
* - `project_id`: The
|
|
2542
|
+
* - `project_id`: The Google Cloud project ID.
|
|
2425
2543
|
* - `dataset_id`: The ID of a BigQuery dataset.
|
|
2426
2544
|
* - `table_id`: The ID of a BigQuery table.
|
|
2427
2545
|
* - `sensitivity_level`: How sensitive the data in a table is, at most.
|
|
@@ -2441,7 +2559,7 @@ class DlpServiceClient {
|
|
|
2441
2559
|
* sequence of restrictions implicitly uses `AND`.
|
|
2442
2560
|
* * A restriction has the form of `{field} {operator} {value}`.
|
|
2443
2561
|
* * Supported fields/values:
|
|
2444
|
-
* - `project_id` - The
|
|
2562
|
+
* - `project_id` - The Google Cloud project ID.
|
|
2445
2563
|
* - `dataset_id` - The BigQuery dataset ID.
|
|
2446
2564
|
* - `table_id` - The ID of the BigQuery table.
|
|
2447
2565
|
* - `sensitivity_level` - HIGH|MODERATE|LOW
|
|
@@ -2512,7 +2630,7 @@ class DlpServiceClient {
|
|
|
2512
2630
|
*
|
|
2513
2631
|
* Supported fields are:
|
|
2514
2632
|
*
|
|
2515
|
-
* - `project_id`: The
|
|
2633
|
+
* - `project_id`: The Google Cloud project ID.
|
|
2516
2634
|
* - `dataset_id`: The ID of a BigQuery dataset.
|
|
2517
2635
|
* - `table_id`: The ID of a BigQuery table.
|
|
2518
2636
|
* - `sensitivity_level`: How sensitive the data in a table is, at most.
|
|
@@ -2532,7 +2650,7 @@ class DlpServiceClient {
|
|
|
2532
2650
|
* sequence of restrictions implicitly uses `AND`.
|
|
2533
2651
|
* * A restriction has the form of `{field} {operator} {value}`.
|
|
2534
2652
|
* * Supported fields/values:
|
|
2535
|
-
* - `project_id` - The
|
|
2653
|
+
* - `project_id` - The Google Cloud project ID.
|
|
2536
2654
|
* - `dataset_id` - The BigQuery dataset ID.
|
|
2537
2655
|
* - `table_id` - The ID of the BigQuery table.
|
|
2538
2656
|
* - `sensitivity_level` - HIGH|MODERATE|LOW
|
|
@@ -2780,6 +2898,218 @@ class DlpServiceClient {
|
|
|
2780
2898
|
this.initialize();
|
|
2781
2899
|
return this.descriptors.page.listColumnDataProfiles.asyncIterate(this.innerApiCalls['listColumnDataProfiles'], request, callSettings);
|
|
2782
2900
|
}
|
|
2901
|
+
listConnections(request, optionsOrCallback, callback) {
|
|
2902
|
+
var _a;
|
|
2903
|
+
request = request || {};
|
|
2904
|
+
let options;
|
|
2905
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
2906
|
+
callback = optionsOrCallback;
|
|
2907
|
+
options = {};
|
|
2908
|
+
}
|
|
2909
|
+
else {
|
|
2910
|
+
options = optionsOrCallback;
|
|
2911
|
+
}
|
|
2912
|
+
options = options || {};
|
|
2913
|
+
options.otherArgs = options.otherArgs || {};
|
|
2914
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2915
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2916
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2917
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
2918
|
+
});
|
|
2919
|
+
this.initialize();
|
|
2920
|
+
return this.innerApiCalls.listConnections(request, options, callback);
|
|
2921
|
+
}
|
|
2922
|
+
/**
|
|
2923
|
+
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
|
|
2924
|
+
* @param {Object} request
|
|
2925
|
+
* The request object that will be sent.
|
|
2926
|
+
* @param {string} request.parent
|
|
2927
|
+
* Required. Parent name, for example:
|
|
2928
|
+
* `projects/project-id/locations/global`.
|
|
2929
|
+
* @param {number} [request.pageSize]
|
|
2930
|
+
* Optional. Number of results per page, max 1000.
|
|
2931
|
+
* @param {string} [request.pageToken]
|
|
2932
|
+
* Optional. Page token from a previous page to return the next set of
|
|
2933
|
+
* results. If set, all other request fields must match the original request.
|
|
2934
|
+
* @param {string} [request.filter]
|
|
2935
|
+
* Optional. * Supported fields/values
|
|
2936
|
+
* - `state` - MISSING|AVAILABLE|ERROR
|
|
2937
|
+
* @param {object} [options]
|
|
2938
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2939
|
+
* @returns {Stream}
|
|
2940
|
+
* An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.Connection|Connection} on 'data' event.
|
|
2941
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
2942
|
+
* times as needed. Note that it can affect your quota.
|
|
2943
|
+
* We recommend using `listConnectionsAsync()`
|
|
2944
|
+
* method described below for async iteration which you can stop as needed.
|
|
2945
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2946
|
+
* for more details and examples.
|
|
2947
|
+
*/
|
|
2948
|
+
listConnectionsStream(request, options) {
|
|
2949
|
+
var _a;
|
|
2950
|
+
request = request || {};
|
|
2951
|
+
options = options || {};
|
|
2952
|
+
options.otherArgs = options.otherArgs || {};
|
|
2953
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2954
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2955
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2956
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
2957
|
+
});
|
|
2958
|
+
const defaultCallSettings = this._defaults['listConnections'];
|
|
2959
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
2960
|
+
this.initialize();
|
|
2961
|
+
return this.descriptors.page.listConnections.createStream(this.innerApiCalls.listConnections, request, callSettings);
|
|
2962
|
+
}
|
|
2963
|
+
/**
|
|
2964
|
+
* Equivalent to `listConnections`, but returns an iterable object.
|
|
2965
|
+
*
|
|
2966
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
2967
|
+
* @param {Object} request
|
|
2968
|
+
* The request object that will be sent.
|
|
2969
|
+
* @param {string} request.parent
|
|
2970
|
+
* Required. Parent name, for example:
|
|
2971
|
+
* `projects/project-id/locations/global`.
|
|
2972
|
+
* @param {number} [request.pageSize]
|
|
2973
|
+
* Optional. Number of results per page, max 1000.
|
|
2974
|
+
* @param {string} [request.pageToken]
|
|
2975
|
+
* Optional. Page token from a previous page to return the next set of
|
|
2976
|
+
* results. If set, all other request fields must match the original request.
|
|
2977
|
+
* @param {string} [request.filter]
|
|
2978
|
+
* Optional. * Supported fields/values
|
|
2979
|
+
* - `state` - MISSING|AVAILABLE|ERROR
|
|
2980
|
+
* @param {object} [options]
|
|
2981
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2982
|
+
* @returns {Object}
|
|
2983
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
2984
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
2985
|
+
* {@link protos.google.privacy.dlp.v2.Connection|Connection}. The API will be called under the hood as needed, once per the page,
|
|
2986
|
+
* so you can stop the iteration when you don't need more results.
|
|
2987
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2988
|
+
* for more details and examples.
|
|
2989
|
+
* @example <caption>include:samples/generated/v2/dlp_service.list_connections.js</caption>
|
|
2990
|
+
* region_tag:dlp_v2_generated_DlpService_ListConnections_async
|
|
2991
|
+
*/
|
|
2992
|
+
listConnectionsAsync(request, options) {
|
|
2993
|
+
var _a;
|
|
2994
|
+
request = request || {};
|
|
2995
|
+
options = options || {};
|
|
2996
|
+
options.otherArgs = options.otherArgs || {};
|
|
2997
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2998
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2999
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3000
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
3001
|
+
});
|
|
3002
|
+
const defaultCallSettings = this._defaults['listConnections'];
|
|
3003
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
3004
|
+
this.initialize();
|
|
3005
|
+
return this.descriptors.page.listConnections.asyncIterate(this.innerApiCalls['listConnections'], request, callSettings);
|
|
3006
|
+
}
|
|
3007
|
+
searchConnections(request, optionsOrCallback, callback) {
|
|
3008
|
+
var _a;
|
|
3009
|
+
request = request || {};
|
|
3010
|
+
let options;
|
|
3011
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
3012
|
+
callback = optionsOrCallback;
|
|
3013
|
+
options = {};
|
|
3014
|
+
}
|
|
3015
|
+
else {
|
|
3016
|
+
options = optionsOrCallback;
|
|
3017
|
+
}
|
|
3018
|
+
options = options || {};
|
|
3019
|
+
options.otherArgs = options.otherArgs || {};
|
|
3020
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
3021
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
3022
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3023
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
3024
|
+
});
|
|
3025
|
+
this.initialize();
|
|
3026
|
+
return this.innerApiCalls.searchConnections(request, options, callback);
|
|
3027
|
+
}
|
|
3028
|
+
/**
|
|
3029
|
+
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
|
|
3030
|
+
* @param {Object} request
|
|
3031
|
+
* The request object that will be sent.
|
|
3032
|
+
* @param {string} request.parent
|
|
3033
|
+
* Required. Parent name, typically an organization, without location.
|
|
3034
|
+
* For example: `organizations/12345678`.
|
|
3035
|
+
* @param {number} [request.pageSize]
|
|
3036
|
+
* Optional. Number of results per page, max 1000.
|
|
3037
|
+
* @param {string} [request.pageToken]
|
|
3038
|
+
* Optional. Page token from a previous page to return the next set of
|
|
3039
|
+
* results. If set, all other request fields must match the original request.
|
|
3040
|
+
* @param {string} [request.filter]
|
|
3041
|
+
* Optional. * Supported fields/values
|
|
3042
|
+
* - `state` - MISSING|AVAILABLE|ERROR
|
|
3043
|
+
* @param {object} [options]
|
|
3044
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3045
|
+
* @returns {Stream}
|
|
3046
|
+
* An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.Connection|Connection} on 'data' event.
|
|
3047
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
3048
|
+
* times as needed. Note that it can affect your quota.
|
|
3049
|
+
* We recommend using `searchConnectionsAsync()`
|
|
3050
|
+
* method described below for async iteration which you can stop as needed.
|
|
3051
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3052
|
+
* for more details and examples.
|
|
3053
|
+
*/
|
|
3054
|
+
searchConnectionsStream(request, options) {
|
|
3055
|
+
var _a;
|
|
3056
|
+
request = request || {};
|
|
3057
|
+
options = options || {};
|
|
3058
|
+
options.otherArgs = options.otherArgs || {};
|
|
3059
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
3060
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
3061
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3062
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
3063
|
+
});
|
|
3064
|
+
const defaultCallSettings = this._defaults['searchConnections'];
|
|
3065
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
3066
|
+
this.initialize();
|
|
3067
|
+
return this.descriptors.page.searchConnections.createStream(this.innerApiCalls.searchConnections, request, callSettings);
|
|
3068
|
+
}
|
|
3069
|
+
/**
|
|
3070
|
+
* Equivalent to `searchConnections`, but returns an iterable object.
|
|
3071
|
+
*
|
|
3072
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
3073
|
+
* @param {Object} request
|
|
3074
|
+
* The request object that will be sent.
|
|
3075
|
+
* @param {string} request.parent
|
|
3076
|
+
* Required. Parent name, typically an organization, without location.
|
|
3077
|
+
* For example: `organizations/12345678`.
|
|
3078
|
+
* @param {number} [request.pageSize]
|
|
3079
|
+
* Optional. Number of results per page, max 1000.
|
|
3080
|
+
* @param {string} [request.pageToken]
|
|
3081
|
+
* Optional. Page token from a previous page to return the next set of
|
|
3082
|
+
* results. If set, all other request fields must match the original request.
|
|
3083
|
+
* @param {string} [request.filter]
|
|
3084
|
+
* Optional. * Supported fields/values
|
|
3085
|
+
* - `state` - MISSING|AVAILABLE|ERROR
|
|
3086
|
+
* @param {object} [options]
|
|
3087
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3088
|
+
* @returns {Object}
|
|
3089
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
3090
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
3091
|
+
* {@link protos.google.privacy.dlp.v2.Connection|Connection}. The API will be called under the hood as needed, once per the page,
|
|
3092
|
+
* so you can stop the iteration when you don't need more results.
|
|
3093
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3094
|
+
* for more details and examples.
|
|
3095
|
+
* @example <caption>include:samples/generated/v2/dlp_service.search_connections.js</caption>
|
|
3096
|
+
* region_tag:dlp_v2_generated_DlpService_SearchConnections_async
|
|
3097
|
+
*/
|
|
3098
|
+
searchConnectionsAsync(request, options) {
|
|
3099
|
+
var _a;
|
|
3100
|
+
request = request || {};
|
|
3101
|
+
options = options || {};
|
|
3102
|
+
options.otherArgs = options.otherArgs || {};
|
|
3103
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
3104
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
3105
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3106
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
3107
|
+
});
|
|
3108
|
+
const defaultCallSettings = this._defaults['searchConnections'];
|
|
3109
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
3110
|
+
this.initialize();
|
|
3111
|
+
return this.descriptors.page.searchConnections.asyncIterate(this.innerApiCalls['searchConnections'], request, callSettings);
|
|
3112
|
+
}
|
|
2783
3113
|
/**
|
|
2784
3114
|
* Gets information about a location.
|
|
2785
3115
|
*
|
|
@@ -2838,6 +3168,54 @@ class DlpServiceClient {
|
|
|
2838
3168
|
// --------------------
|
|
2839
3169
|
// -- Path templates --
|
|
2840
3170
|
// --------------------
|
|
3171
|
+
/**
|
|
3172
|
+
* Return a fully-qualified connection resource name string.
|
|
3173
|
+
*
|
|
3174
|
+
* @param {string} project
|
|
3175
|
+
* @param {string} location
|
|
3176
|
+
* @param {string} connection
|
|
3177
|
+
* @returns {string} Resource name string.
|
|
3178
|
+
*/
|
|
3179
|
+
connectionPath(project, location, connection) {
|
|
3180
|
+
return this.pathTemplates.connectionPathTemplate.render({
|
|
3181
|
+
project: project,
|
|
3182
|
+
location: location,
|
|
3183
|
+
connection: connection,
|
|
3184
|
+
});
|
|
3185
|
+
}
|
|
3186
|
+
/**
|
|
3187
|
+
* Parse the project from Connection resource.
|
|
3188
|
+
*
|
|
3189
|
+
* @param {string} connectionName
|
|
3190
|
+
* A fully-qualified path representing Connection resource.
|
|
3191
|
+
* @returns {string} A string representing the project.
|
|
3192
|
+
*/
|
|
3193
|
+
matchProjectFromConnectionName(connectionName) {
|
|
3194
|
+
return this.pathTemplates.connectionPathTemplate.match(connectionName)
|
|
3195
|
+
.project;
|
|
3196
|
+
}
|
|
3197
|
+
/**
|
|
3198
|
+
* Parse the location from Connection resource.
|
|
3199
|
+
*
|
|
3200
|
+
* @param {string} connectionName
|
|
3201
|
+
* A fully-qualified path representing Connection resource.
|
|
3202
|
+
* @returns {string} A string representing the location.
|
|
3203
|
+
*/
|
|
3204
|
+
matchLocationFromConnectionName(connectionName) {
|
|
3205
|
+
return this.pathTemplates.connectionPathTemplate.match(connectionName)
|
|
3206
|
+
.location;
|
|
3207
|
+
}
|
|
3208
|
+
/**
|
|
3209
|
+
* Parse the connection from Connection resource.
|
|
3210
|
+
*
|
|
3211
|
+
* @param {string} connectionName
|
|
3212
|
+
* A fully-qualified path representing Connection resource.
|
|
3213
|
+
* @returns {string} A string representing the connection.
|
|
3214
|
+
*/
|
|
3215
|
+
matchConnectionFromConnectionName(connectionName) {
|
|
3216
|
+
return this.pathTemplates.connectionPathTemplate.match(connectionName)
|
|
3217
|
+
.connection;
|
|
3218
|
+
}
|
|
2841
3219
|
/**
|
|
2842
3220
|
* Return a fully-qualified discoveryConfig resource name string.
|
|
2843
3221
|
*
|
|
@@ -235,6 +235,10 @@
|
|
|
235
235
|
"retry_codes_name": "idempotent",
|
|
236
236
|
"retry_params_name": "default"
|
|
237
237
|
},
|
|
238
|
+
"DeleteTableDataProfile": {
|
|
239
|
+
"retry_codes_name": "non_idempotent",
|
|
240
|
+
"retry_params_name": "default"
|
|
241
|
+
},
|
|
238
242
|
"HybridInspectDlpJob": {
|
|
239
243
|
"timeout_millis": 300000,
|
|
240
244
|
"retry_codes_name": "non_idempotent",
|
|
@@ -244,6 +248,30 @@
|
|
|
244
248
|
"timeout_millis": 300000,
|
|
245
249
|
"retry_codes_name": "non_idempotent",
|
|
246
250
|
"retry_params_name": "default"
|
|
251
|
+
},
|
|
252
|
+
"CreateConnection": {
|
|
253
|
+
"retry_codes_name": "non_idempotent",
|
|
254
|
+
"retry_params_name": "default"
|
|
255
|
+
},
|
|
256
|
+
"GetConnection": {
|
|
257
|
+
"retry_codes_name": "non_idempotent",
|
|
258
|
+
"retry_params_name": "default"
|
|
259
|
+
},
|
|
260
|
+
"ListConnections": {
|
|
261
|
+
"retry_codes_name": "non_idempotent",
|
|
262
|
+
"retry_params_name": "default"
|
|
263
|
+
},
|
|
264
|
+
"SearchConnections": {
|
|
265
|
+
"retry_codes_name": "non_idempotent",
|
|
266
|
+
"retry_params_name": "default"
|
|
267
|
+
},
|
|
268
|
+
"DeleteConnection": {
|
|
269
|
+
"retry_codes_name": "non_idempotent",
|
|
270
|
+
"retry_params_name": "default"
|
|
271
|
+
},
|
|
272
|
+
"UpdateConnection": {
|
|
273
|
+
"retry_codes_name": "non_idempotent",
|
|
274
|
+
"retry_params_name": "default"
|
|
247
275
|
}
|
|
248
276
|
}
|
|
249
277
|
}
|