@googleapis/policyanalyzer 2.0.1 → 3.0.1
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 +25 -0
- package/build/v1.d.ts +167 -0
- package/build/v1.js.map +1 -1
- package/build/v1beta1.d.ts +167 -0
- package/build/v1beta1.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +167 -0
- package/v1beta1.ts +167 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/policyanalyzer-v3.0.0...policyanalyzer-v3.0.1) (2025-07-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **policyanalyzer:** update the API ([273b3ce](https://github.com/googleapis/google-api-nodejs-client/commit/273b3ce1a9434e042d0898091efb6000f5018f19))
|
|
9
|
+
* **policyanalyzer:** update the API ([84f072d](https://github.com/googleapis/google-api-nodejs-client/commit/84f072d61e116616636480614f349bb2d37a21ac))
|
|
10
|
+
|
|
11
|
+
## [3.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/policyanalyzer-v2.0.1...policyanalyzer-v3.0.0) (2025-06-30)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### ⚠ BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* upgrade to node 18
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* upgrade to node 18 ([682fbb8](https://github.com/googleapis/google-api-nodejs-client/commit/682fbb869189ae92b3e9a194d37d0548af0c1f92))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **deps:** upgrade googleapis-common to 8.0.2-rc ([f4b0990](https://github.com/googleapis/google-api-nodejs-client/commit/f4b099071040cfbcfe4a2e7d487d45ee93b369e0))
|
|
26
|
+
* **policyanalyzer:** update the API ([84f072d](https://github.com/googleapis/google-api-nodejs-client/commit/84f072d61e116616636480614f349bb2d37a21ac))
|
|
27
|
+
|
|
3
28
|
## [2.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/policyanalyzer-v2.0.0...policyanalyzer-v2.0.1) (2025-06-04)
|
|
4
29
|
|
|
5
30
|
|
package/build/v1.d.ts
CHANGED
|
@@ -142,6 +142,61 @@ export declare namespace policyanalyzer_v1 {
|
|
|
142
142
|
constructor(context: APIRequestContext);
|
|
143
143
|
/**
|
|
144
144
|
* Queries policy activities on Google Cloud resources.
|
|
145
|
+
* @example
|
|
146
|
+
* ```js
|
|
147
|
+
* // Before running the sample:
|
|
148
|
+
* // - Enable the API at:
|
|
149
|
+
* // https://console.developers.google.com/apis/api/policyanalyzer.googleapis.com
|
|
150
|
+
* // - Login into gcloud by running:
|
|
151
|
+
* // ```sh
|
|
152
|
+
* // $ gcloud auth application-default login
|
|
153
|
+
* // ```
|
|
154
|
+
* // - Install the npm module by running:
|
|
155
|
+
* // ```sh
|
|
156
|
+
* // $ npm install googleapis
|
|
157
|
+
* // ```
|
|
158
|
+
*
|
|
159
|
+
* const {google} = require('googleapis');
|
|
160
|
+
* const policyanalyzer = google.policyanalyzer('v1');
|
|
161
|
+
*
|
|
162
|
+
* async function main() {
|
|
163
|
+
* const auth = new google.auth.GoogleAuth({
|
|
164
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
165
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
166
|
+
* });
|
|
167
|
+
*
|
|
168
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
169
|
+
* const authClient = await auth.getClient();
|
|
170
|
+
* google.options({auth: authClient});
|
|
171
|
+
*
|
|
172
|
+
* // Do the magic
|
|
173
|
+
* const res =
|
|
174
|
+
* await policyanalyzer.folders.locations.activityTypes.activities.query({
|
|
175
|
+
* // Optional. Filter expression to restrict the activities returned. For serviceAccountLastAuthentication activities, supported filters are: - `activities.full_resource_name {=\} [STRING]` - `activities.fullResourceName {=\} [STRING]` where `[STRING]` is the full resource name of the service account. For serviceAccountKeyLastAuthentication activities, supported filters are: - `activities.full_resource_name {=\} [STRING]` - `activities.fullResourceName {=\} [STRING]` where `[STRING]` is the full resource name of the service account key.
|
|
176
|
+
* filter: 'placeholder-value',
|
|
177
|
+
* // Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.
|
|
178
|
+
* pageSize: 'placeholder-value',
|
|
179
|
+
* // Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.
|
|
180
|
+
* pageToken: 'placeholder-value',
|
|
181
|
+
* // Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to Google Cloud Locations: https://cloud.google.com/about/locations/
|
|
182
|
+
* parent:
|
|
183
|
+
* 'folders/my-folder/locations/my-location/activityTypes/my-activityType',
|
|
184
|
+
* });
|
|
185
|
+
* console.log(res.data);
|
|
186
|
+
*
|
|
187
|
+
* // Example response
|
|
188
|
+
* // {
|
|
189
|
+
* // "activities": [],
|
|
190
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
191
|
+
* // }
|
|
192
|
+
* }
|
|
193
|
+
*
|
|
194
|
+
* main().catch(e => {
|
|
195
|
+
* console.error(e);
|
|
196
|
+
* throw e;
|
|
197
|
+
* });
|
|
198
|
+
*
|
|
199
|
+
* ```
|
|
145
200
|
*
|
|
146
201
|
* @param params - Parameters for request
|
|
147
202
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -193,6 +248,63 @@ export declare namespace policyanalyzer_v1 {
|
|
|
193
248
|
constructor(context: APIRequestContext);
|
|
194
249
|
/**
|
|
195
250
|
* Queries policy activities on Google Cloud resources.
|
|
251
|
+
* @example
|
|
252
|
+
* ```js
|
|
253
|
+
* // Before running the sample:
|
|
254
|
+
* // - Enable the API at:
|
|
255
|
+
* // https://console.developers.google.com/apis/api/policyanalyzer.googleapis.com
|
|
256
|
+
* // - Login into gcloud by running:
|
|
257
|
+
* // ```sh
|
|
258
|
+
* // $ gcloud auth application-default login
|
|
259
|
+
* // ```
|
|
260
|
+
* // - Install the npm module by running:
|
|
261
|
+
* // ```sh
|
|
262
|
+
* // $ npm install googleapis
|
|
263
|
+
* // ```
|
|
264
|
+
*
|
|
265
|
+
* const {google} = require('googleapis');
|
|
266
|
+
* const policyanalyzer = google.policyanalyzer('v1');
|
|
267
|
+
*
|
|
268
|
+
* async function main() {
|
|
269
|
+
* const auth = new google.auth.GoogleAuth({
|
|
270
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
271
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
272
|
+
* });
|
|
273
|
+
*
|
|
274
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
275
|
+
* const authClient = await auth.getClient();
|
|
276
|
+
* google.options({auth: authClient});
|
|
277
|
+
*
|
|
278
|
+
* // Do the magic
|
|
279
|
+
* const res =
|
|
280
|
+
* await policyanalyzer.organizations.locations.activityTypes.activities.query(
|
|
281
|
+
* {
|
|
282
|
+
* // Optional. Filter expression to restrict the activities returned. For serviceAccountLastAuthentication activities, supported filters are: - `activities.full_resource_name {=\} [STRING]` - `activities.fullResourceName {=\} [STRING]` where `[STRING]` is the full resource name of the service account. For serviceAccountKeyLastAuthentication activities, supported filters are: - `activities.full_resource_name {=\} [STRING]` - `activities.fullResourceName {=\} [STRING]` where `[STRING]` is the full resource name of the service account key.
|
|
283
|
+
* filter: 'placeholder-value',
|
|
284
|
+
* // Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.
|
|
285
|
+
* pageSize: 'placeholder-value',
|
|
286
|
+
* // Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.
|
|
287
|
+
* pageToken: 'placeholder-value',
|
|
288
|
+
* // Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to Google Cloud Locations: https://cloud.google.com/about/locations/
|
|
289
|
+
* parent:
|
|
290
|
+
* 'organizations/my-organization/locations/my-location/activityTypes/my-activityType',
|
|
291
|
+
* },
|
|
292
|
+
* );
|
|
293
|
+
* console.log(res.data);
|
|
294
|
+
*
|
|
295
|
+
* // Example response
|
|
296
|
+
* // {
|
|
297
|
+
* // "activities": [],
|
|
298
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
299
|
+
* // }
|
|
300
|
+
* }
|
|
301
|
+
*
|
|
302
|
+
* main().catch(e => {
|
|
303
|
+
* console.error(e);
|
|
304
|
+
* throw e;
|
|
305
|
+
* });
|
|
306
|
+
*
|
|
307
|
+
* ```
|
|
196
308
|
*
|
|
197
309
|
* @param params - Parameters for request
|
|
198
310
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -244,6 +356,61 @@ export declare namespace policyanalyzer_v1 {
|
|
|
244
356
|
constructor(context: APIRequestContext);
|
|
245
357
|
/**
|
|
246
358
|
* Queries policy activities on Google Cloud resources.
|
|
359
|
+
* @example
|
|
360
|
+
* ```js
|
|
361
|
+
* // Before running the sample:
|
|
362
|
+
* // - Enable the API at:
|
|
363
|
+
* // https://console.developers.google.com/apis/api/policyanalyzer.googleapis.com
|
|
364
|
+
* // - Login into gcloud by running:
|
|
365
|
+
* // ```sh
|
|
366
|
+
* // $ gcloud auth application-default login
|
|
367
|
+
* // ```
|
|
368
|
+
* // - Install the npm module by running:
|
|
369
|
+
* // ```sh
|
|
370
|
+
* // $ npm install googleapis
|
|
371
|
+
* // ```
|
|
372
|
+
*
|
|
373
|
+
* const {google} = require('googleapis');
|
|
374
|
+
* const policyanalyzer = google.policyanalyzer('v1');
|
|
375
|
+
*
|
|
376
|
+
* async function main() {
|
|
377
|
+
* const auth = new google.auth.GoogleAuth({
|
|
378
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
379
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
380
|
+
* });
|
|
381
|
+
*
|
|
382
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
383
|
+
* const authClient = await auth.getClient();
|
|
384
|
+
* google.options({auth: authClient});
|
|
385
|
+
*
|
|
386
|
+
* // Do the magic
|
|
387
|
+
* const res =
|
|
388
|
+
* await policyanalyzer.projects.locations.activityTypes.activities.query({
|
|
389
|
+
* // Optional. Filter expression to restrict the activities returned. For serviceAccountLastAuthentication activities, supported filters are: - `activities.full_resource_name {=\} [STRING]` - `activities.fullResourceName {=\} [STRING]` where `[STRING]` is the full resource name of the service account. For serviceAccountKeyLastAuthentication activities, supported filters are: - `activities.full_resource_name {=\} [STRING]` - `activities.fullResourceName {=\} [STRING]` where `[STRING]` is the full resource name of the service account key.
|
|
390
|
+
* filter: 'placeholder-value',
|
|
391
|
+
* // Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.
|
|
392
|
+
* pageSize: 'placeholder-value',
|
|
393
|
+
* // Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.
|
|
394
|
+
* pageToken: 'placeholder-value',
|
|
395
|
+
* // Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to Google Cloud Locations: https://cloud.google.com/about/locations/
|
|
396
|
+
* parent:
|
|
397
|
+
* 'projects/my-project/locations/my-location/activityTypes/my-activityType',
|
|
398
|
+
* });
|
|
399
|
+
* console.log(res.data);
|
|
400
|
+
*
|
|
401
|
+
* // Example response
|
|
402
|
+
* // {
|
|
403
|
+
* // "activities": [],
|
|
404
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
405
|
+
* // }
|
|
406
|
+
* }
|
|
407
|
+
*
|
|
408
|
+
* main().catch(e => {
|
|
409
|
+
* console.error(e);
|
|
410
|
+
* throw e;
|
|
411
|
+
* });
|
|
412
|
+
*
|
|
413
|
+
* ```
|
|
247
414
|
*
|
|
248
415
|
* @param params - Parameters for request
|
|
249
416
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
package/build/v1.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,iBAAiB,CAsxBjC;AAtxBD,WAAiB,iBAAiB;IAgEhC;;;;;;;;;;OAUG;IACH,MAAa,cAAc;QAMzB,YAAY,OAAsB,EAAE,MAA2B;YA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AQ,GAAG,gBAAgB,CAAC;gBAC5B,MAAM;oBACJ,EAAuE,CAAC;gBAC1E,OAAO,GAAG,EAAE,CAAC;aACd;YAED,IAAI,OAAO,iBAAiB,KAAK,UAAU,EAAE;gBAC3C,QAAQ,GAAG,iBAAiB,CAAC;gBAC7B,OAAO,GAAG,EAAE,CAAC;aACd;YAED,MAAM,OAAO,GACX,OAAO,CAAC,OAAO,IAAI,wCAAwC,CAAC;YAC9D,MAAM,UAAU,GAAG;gBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CACpB;oBACE,GAAG,EAAE,CAAC,OAAO,GAAG,gCAAgC,CAAC,CAAC,OAAO,CACvD,cAAc,EACd,IAAI,CACL;oBACD,MAAM,EAAE,KAAK;oBACb,UAAU,EAAE,EAAE;iBACf,EACD,OAAO,CACR;gBACD,MAAM;gBACN,cAAc,EAAE,CAAC,QAAQ,CAAC;gBAC1B,UAAU,EAAE,CAAC,QAAQ,CAAC;gBACtB,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,IAAA,oCAAgB,EACd,UAAU,EACV,QAAyC,CAC1C,CAAC;aACH;iBAAM;gBACL,OAAO,IAAA,oCAAgB,EACrB,UAAU,CACX,CAAC;aACH;QACH,CAAC;KACF;IAnKY,sEAAoD,uDAmKhE,CAAA;AAqBH,CAAC,EAtxBgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAsxBjC"}
|
package/build/v1beta1.d.ts
CHANGED
|
@@ -142,6 +142,61 @@ export declare namespace policyanalyzer_v1beta1 {
|
|
|
142
142
|
constructor(context: APIRequestContext);
|
|
143
143
|
/**
|
|
144
144
|
* Queries policy activities on GCP resources.
|
|
145
|
+
* @example
|
|
146
|
+
* ```js
|
|
147
|
+
* // Before running the sample:
|
|
148
|
+
* // - Enable the API at:
|
|
149
|
+
* // https://console.developers.google.com/apis/api/policyanalyzer.googleapis.com
|
|
150
|
+
* // - Login into gcloud by running:
|
|
151
|
+
* // ```sh
|
|
152
|
+
* // $ gcloud auth application-default login
|
|
153
|
+
* // ```
|
|
154
|
+
* // - Install the npm module by running:
|
|
155
|
+
* // ```sh
|
|
156
|
+
* // $ npm install googleapis
|
|
157
|
+
* // ```
|
|
158
|
+
*
|
|
159
|
+
* const {google} = require('googleapis');
|
|
160
|
+
* const policyanalyzer = google.policyanalyzer('v1beta1');
|
|
161
|
+
*
|
|
162
|
+
* async function main() {
|
|
163
|
+
* const auth = new google.auth.GoogleAuth({
|
|
164
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
165
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
166
|
+
* });
|
|
167
|
+
*
|
|
168
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
169
|
+
* const authClient = await auth.getClient();
|
|
170
|
+
* google.options({auth: authClient});
|
|
171
|
+
*
|
|
172
|
+
* // Do the magic
|
|
173
|
+
* const res =
|
|
174
|
+
* await policyanalyzer.folders.locations.activityTypes.activities.query({
|
|
175
|
+
* // Optional. Optional filter expression to restrict the activities returned. Supported filters are: - service_account_last_authn.full_resource_name {=\} - service_account_key_last_authn.full_resource_name {=\}
|
|
176
|
+
* filter: 'placeholder-value',
|
|
177
|
+
* // Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.
|
|
178
|
+
* pageSize: 'placeholder-value',
|
|
179
|
+
* // Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.
|
|
180
|
+
* pageToken: 'placeholder-value',
|
|
181
|
+
* // Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/
|
|
182
|
+
* parent:
|
|
183
|
+
* 'folders/my-folder/locations/my-location/activityTypes/my-activityType',
|
|
184
|
+
* });
|
|
185
|
+
* console.log(res.data);
|
|
186
|
+
*
|
|
187
|
+
* // Example response
|
|
188
|
+
* // {
|
|
189
|
+
* // "activities": [],
|
|
190
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
191
|
+
* // }
|
|
192
|
+
* }
|
|
193
|
+
*
|
|
194
|
+
* main().catch(e => {
|
|
195
|
+
* console.error(e);
|
|
196
|
+
* throw e;
|
|
197
|
+
* });
|
|
198
|
+
*
|
|
199
|
+
* ```
|
|
145
200
|
*
|
|
146
201
|
* @param params - Parameters for request
|
|
147
202
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -193,6 +248,63 @@ export declare namespace policyanalyzer_v1beta1 {
|
|
|
193
248
|
constructor(context: APIRequestContext);
|
|
194
249
|
/**
|
|
195
250
|
* Queries policy activities on GCP resources.
|
|
251
|
+
* @example
|
|
252
|
+
* ```js
|
|
253
|
+
* // Before running the sample:
|
|
254
|
+
* // - Enable the API at:
|
|
255
|
+
* // https://console.developers.google.com/apis/api/policyanalyzer.googleapis.com
|
|
256
|
+
* // - Login into gcloud by running:
|
|
257
|
+
* // ```sh
|
|
258
|
+
* // $ gcloud auth application-default login
|
|
259
|
+
* // ```
|
|
260
|
+
* // - Install the npm module by running:
|
|
261
|
+
* // ```sh
|
|
262
|
+
* // $ npm install googleapis
|
|
263
|
+
* // ```
|
|
264
|
+
*
|
|
265
|
+
* const {google} = require('googleapis');
|
|
266
|
+
* const policyanalyzer = google.policyanalyzer('v1beta1');
|
|
267
|
+
*
|
|
268
|
+
* async function main() {
|
|
269
|
+
* const auth = new google.auth.GoogleAuth({
|
|
270
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
271
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
272
|
+
* });
|
|
273
|
+
*
|
|
274
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
275
|
+
* const authClient = await auth.getClient();
|
|
276
|
+
* google.options({auth: authClient});
|
|
277
|
+
*
|
|
278
|
+
* // Do the magic
|
|
279
|
+
* const res =
|
|
280
|
+
* await policyanalyzer.organizations.locations.activityTypes.activities.query(
|
|
281
|
+
* {
|
|
282
|
+
* // Optional. Optional filter expression to restrict the activities returned. Supported filters are: - service_account_last_authn.full_resource_name {=\} - service_account_key_last_authn.full_resource_name {=\}
|
|
283
|
+
* filter: 'placeholder-value',
|
|
284
|
+
* // Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.
|
|
285
|
+
* pageSize: 'placeholder-value',
|
|
286
|
+
* // Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.
|
|
287
|
+
* pageToken: 'placeholder-value',
|
|
288
|
+
* // Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/
|
|
289
|
+
* parent:
|
|
290
|
+
* 'organizations/my-organization/locations/my-location/activityTypes/my-activityType',
|
|
291
|
+
* },
|
|
292
|
+
* );
|
|
293
|
+
* console.log(res.data);
|
|
294
|
+
*
|
|
295
|
+
* // Example response
|
|
296
|
+
* // {
|
|
297
|
+
* // "activities": [],
|
|
298
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
299
|
+
* // }
|
|
300
|
+
* }
|
|
301
|
+
*
|
|
302
|
+
* main().catch(e => {
|
|
303
|
+
* console.error(e);
|
|
304
|
+
* throw e;
|
|
305
|
+
* });
|
|
306
|
+
*
|
|
307
|
+
* ```
|
|
196
308
|
*
|
|
197
309
|
* @param params - Parameters for request
|
|
198
310
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -244,6 +356,61 @@ export declare namespace policyanalyzer_v1beta1 {
|
|
|
244
356
|
constructor(context: APIRequestContext);
|
|
245
357
|
/**
|
|
246
358
|
* Queries policy activities on GCP resources.
|
|
359
|
+
* @example
|
|
360
|
+
* ```js
|
|
361
|
+
* // Before running the sample:
|
|
362
|
+
* // - Enable the API at:
|
|
363
|
+
* // https://console.developers.google.com/apis/api/policyanalyzer.googleapis.com
|
|
364
|
+
* // - Login into gcloud by running:
|
|
365
|
+
* // ```sh
|
|
366
|
+
* // $ gcloud auth application-default login
|
|
367
|
+
* // ```
|
|
368
|
+
* // - Install the npm module by running:
|
|
369
|
+
* // ```sh
|
|
370
|
+
* // $ npm install googleapis
|
|
371
|
+
* // ```
|
|
372
|
+
*
|
|
373
|
+
* const {google} = require('googleapis');
|
|
374
|
+
* const policyanalyzer = google.policyanalyzer('v1beta1');
|
|
375
|
+
*
|
|
376
|
+
* async function main() {
|
|
377
|
+
* const auth = new google.auth.GoogleAuth({
|
|
378
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
379
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
380
|
+
* });
|
|
381
|
+
*
|
|
382
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
383
|
+
* const authClient = await auth.getClient();
|
|
384
|
+
* google.options({auth: authClient});
|
|
385
|
+
*
|
|
386
|
+
* // Do the magic
|
|
387
|
+
* const res =
|
|
388
|
+
* await policyanalyzer.projects.locations.activityTypes.activities.query({
|
|
389
|
+
* // Optional. Optional filter expression to restrict the activities returned. Supported filters are: - service_account_last_authn.full_resource_name {=\} - service_account_key_last_authn.full_resource_name {=\}
|
|
390
|
+
* filter: 'placeholder-value',
|
|
391
|
+
* // Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.
|
|
392
|
+
* pageSize: 'placeholder-value',
|
|
393
|
+
* // Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.
|
|
394
|
+
* pageToken: 'placeholder-value',
|
|
395
|
+
* // Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/
|
|
396
|
+
* parent:
|
|
397
|
+
* 'projects/my-project/locations/my-location/activityTypes/my-activityType',
|
|
398
|
+
* });
|
|
399
|
+
* console.log(res.data);
|
|
400
|
+
*
|
|
401
|
+
* // Example response
|
|
402
|
+
* // {
|
|
403
|
+
* // "activities": [],
|
|
404
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
405
|
+
* // }
|
|
406
|
+
* }
|
|
407
|
+
*
|
|
408
|
+
* main().catch(e => {
|
|
409
|
+
* console.error(e);
|
|
410
|
+
* throw e;
|
|
411
|
+
* });
|
|
412
|
+
*
|
|
413
|
+
* ```
|
|
247
414
|
*
|
|
248
415
|
* @param params - Parameters for request
|
|
249
416
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
package/build/v1beta1.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1beta1.js","sourceRoot":"","sources":["../v1beta1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"v1beta1.js","sourceRoot":"","sources":["../v1beta1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2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 export namespace policyanalyzer_v1 {
|
|
|
215
215
|
|
|
216
216
|
/**
|
|
217
217
|
* Queries policy activities on Google Cloud resources.
|
|
218
|
+
* @example
|
|
219
|
+
* ```js
|
|
220
|
+
* // Before running the sample:
|
|
221
|
+
* // - Enable the API at:
|
|
222
|
+
* // https://console.developers.google.com/apis/api/policyanalyzer.googleapis.com
|
|
223
|
+
* // - Login into gcloud by running:
|
|
224
|
+
* // ```sh
|
|
225
|
+
* // $ gcloud auth application-default login
|
|
226
|
+
* // ```
|
|
227
|
+
* // - Install the npm module by running:
|
|
228
|
+
* // ```sh
|
|
229
|
+
* // $ npm install googleapis
|
|
230
|
+
* // ```
|
|
231
|
+
*
|
|
232
|
+
* const {google} = require('googleapis');
|
|
233
|
+
* const policyanalyzer = google.policyanalyzer('v1');
|
|
234
|
+
*
|
|
235
|
+
* async function main() {
|
|
236
|
+
* const auth = new google.auth.GoogleAuth({
|
|
237
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
238
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
239
|
+
* });
|
|
240
|
+
*
|
|
241
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
242
|
+
* const authClient = await auth.getClient();
|
|
243
|
+
* google.options({auth: authClient});
|
|
244
|
+
*
|
|
245
|
+
* // Do the magic
|
|
246
|
+
* const res =
|
|
247
|
+
* await policyanalyzer.folders.locations.activityTypes.activities.query({
|
|
248
|
+
* // Optional. Filter expression to restrict the activities returned. For serviceAccountLastAuthentication activities, supported filters are: - `activities.full_resource_name {=\} [STRING]` - `activities.fullResourceName {=\} [STRING]` where `[STRING]` is the full resource name of the service account. For serviceAccountKeyLastAuthentication activities, supported filters are: - `activities.full_resource_name {=\} [STRING]` - `activities.fullResourceName {=\} [STRING]` where `[STRING]` is the full resource name of the service account key.
|
|
249
|
+
* filter: 'placeholder-value',
|
|
250
|
+
* // Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.
|
|
251
|
+
* pageSize: 'placeholder-value',
|
|
252
|
+
* // Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.
|
|
253
|
+
* pageToken: 'placeholder-value',
|
|
254
|
+
* // Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to Google Cloud Locations: https://cloud.google.com/about/locations/
|
|
255
|
+
* parent:
|
|
256
|
+
* 'folders/my-folder/locations/my-location/activityTypes/my-activityType',
|
|
257
|
+
* });
|
|
258
|
+
* console.log(res.data);
|
|
259
|
+
*
|
|
260
|
+
* // Example response
|
|
261
|
+
* // {
|
|
262
|
+
* // "activities": [],
|
|
263
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
264
|
+
* // }
|
|
265
|
+
* }
|
|
266
|
+
*
|
|
267
|
+
* main().catch(e => {
|
|
268
|
+
* console.error(e);
|
|
269
|
+
* throw e;
|
|
270
|
+
* });
|
|
271
|
+
*
|
|
272
|
+
* ```
|
|
218
273
|
*
|
|
219
274
|
* @param params - Parameters for request
|
|
220
275
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -377,6 +432,63 @@ export namespace policyanalyzer_v1 {
|
|
|
377
432
|
|
|
378
433
|
/**
|
|
379
434
|
* Queries policy activities on Google Cloud resources.
|
|
435
|
+
* @example
|
|
436
|
+
* ```js
|
|
437
|
+
* // Before running the sample:
|
|
438
|
+
* // - Enable the API at:
|
|
439
|
+
* // https://console.developers.google.com/apis/api/policyanalyzer.googleapis.com
|
|
440
|
+
* // - Login into gcloud by running:
|
|
441
|
+
* // ```sh
|
|
442
|
+
* // $ gcloud auth application-default login
|
|
443
|
+
* // ```
|
|
444
|
+
* // - Install the npm module by running:
|
|
445
|
+
* // ```sh
|
|
446
|
+
* // $ npm install googleapis
|
|
447
|
+
* // ```
|
|
448
|
+
*
|
|
449
|
+
* const {google} = require('googleapis');
|
|
450
|
+
* const policyanalyzer = google.policyanalyzer('v1');
|
|
451
|
+
*
|
|
452
|
+
* async function main() {
|
|
453
|
+
* const auth = new google.auth.GoogleAuth({
|
|
454
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
455
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
456
|
+
* });
|
|
457
|
+
*
|
|
458
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
459
|
+
* const authClient = await auth.getClient();
|
|
460
|
+
* google.options({auth: authClient});
|
|
461
|
+
*
|
|
462
|
+
* // Do the magic
|
|
463
|
+
* const res =
|
|
464
|
+
* await policyanalyzer.organizations.locations.activityTypes.activities.query(
|
|
465
|
+
* {
|
|
466
|
+
* // Optional. Filter expression to restrict the activities returned. For serviceAccountLastAuthentication activities, supported filters are: - `activities.full_resource_name {=\} [STRING]` - `activities.fullResourceName {=\} [STRING]` where `[STRING]` is the full resource name of the service account. For serviceAccountKeyLastAuthentication activities, supported filters are: - `activities.full_resource_name {=\} [STRING]` - `activities.fullResourceName {=\} [STRING]` where `[STRING]` is the full resource name of the service account key.
|
|
467
|
+
* filter: 'placeholder-value',
|
|
468
|
+
* // Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.
|
|
469
|
+
* pageSize: 'placeholder-value',
|
|
470
|
+
* // Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.
|
|
471
|
+
* pageToken: 'placeholder-value',
|
|
472
|
+
* // Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to Google Cloud Locations: https://cloud.google.com/about/locations/
|
|
473
|
+
* parent:
|
|
474
|
+
* 'organizations/my-organization/locations/my-location/activityTypes/my-activityType',
|
|
475
|
+
* },
|
|
476
|
+
* );
|
|
477
|
+
* console.log(res.data);
|
|
478
|
+
*
|
|
479
|
+
* // Example response
|
|
480
|
+
* // {
|
|
481
|
+
* // "activities": [],
|
|
482
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
483
|
+
* // }
|
|
484
|
+
* }
|
|
485
|
+
*
|
|
486
|
+
* main().catch(e => {
|
|
487
|
+
* console.error(e);
|
|
488
|
+
* throw e;
|
|
489
|
+
* });
|
|
490
|
+
*
|
|
491
|
+
* ```
|
|
380
492
|
*
|
|
381
493
|
* @param params - Parameters for request
|
|
382
494
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -537,6 +649,61 @@ export namespace policyanalyzer_v1 {
|
|
|
537
649
|
|
|
538
650
|
/**
|
|
539
651
|
* Queries policy activities on Google Cloud resources.
|
|
652
|
+
* @example
|
|
653
|
+
* ```js
|
|
654
|
+
* // Before running the sample:
|
|
655
|
+
* // - Enable the API at:
|
|
656
|
+
* // https://console.developers.google.com/apis/api/policyanalyzer.googleapis.com
|
|
657
|
+
* // - Login into gcloud by running:
|
|
658
|
+
* // ```sh
|
|
659
|
+
* // $ gcloud auth application-default login
|
|
660
|
+
* // ```
|
|
661
|
+
* // - Install the npm module by running:
|
|
662
|
+
* // ```sh
|
|
663
|
+
* // $ npm install googleapis
|
|
664
|
+
* // ```
|
|
665
|
+
*
|
|
666
|
+
* const {google} = require('googleapis');
|
|
667
|
+
* const policyanalyzer = google.policyanalyzer('v1');
|
|
668
|
+
*
|
|
669
|
+
* async function main() {
|
|
670
|
+
* const auth = new google.auth.GoogleAuth({
|
|
671
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
672
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
673
|
+
* });
|
|
674
|
+
*
|
|
675
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
676
|
+
* const authClient = await auth.getClient();
|
|
677
|
+
* google.options({auth: authClient});
|
|
678
|
+
*
|
|
679
|
+
* // Do the magic
|
|
680
|
+
* const res =
|
|
681
|
+
* await policyanalyzer.projects.locations.activityTypes.activities.query({
|
|
682
|
+
* // Optional. Filter expression to restrict the activities returned. For serviceAccountLastAuthentication activities, supported filters are: - `activities.full_resource_name {=\} [STRING]` - `activities.fullResourceName {=\} [STRING]` where `[STRING]` is the full resource name of the service account. For serviceAccountKeyLastAuthentication activities, supported filters are: - `activities.full_resource_name {=\} [STRING]` - `activities.fullResourceName {=\} [STRING]` where `[STRING]` is the full resource name of the service account key.
|
|
683
|
+
* filter: 'placeholder-value',
|
|
684
|
+
* // Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.
|
|
685
|
+
* pageSize: 'placeholder-value',
|
|
686
|
+
* // Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.
|
|
687
|
+
* pageToken: 'placeholder-value',
|
|
688
|
+
* // Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to Google Cloud Locations: https://cloud.google.com/about/locations/
|
|
689
|
+
* parent:
|
|
690
|
+
* 'projects/my-project/locations/my-location/activityTypes/my-activityType',
|
|
691
|
+
* });
|
|
692
|
+
* console.log(res.data);
|
|
693
|
+
*
|
|
694
|
+
* // Example response
|
|
695
|
+
* // {
|
|
696
|
+
* // "activities": [],
|
|
697
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
698
|
+
* // }
|
|
699
|
+
* }
|
|
700
|
+
*
|
|
701
|
+
* main().catch(e => {
|
|
702
|
+
* console.error(e);
|
|
703
|
+
* throw e;
|
|
704
|
+
* });
|
|
705
|
+
*
|
|
706
|
+
* ```
|
|
540
707
|
*
|
|
541
708
|
* @param params - Parameters for request
|
|
542
709
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
package/v1beta1.ts
CHANGED
|
@@ -215,6 +215,61 @@ export namespace policyanalyzer_v1beta1 {
|
|
|
215
215
|
|
|
216
216
|
/**
|
|
217
217
|
* Queries policy activities on GCP resources.
|
|
218
|
+
* @example
|
|
219
|
+
* ```js
|
|
220
|
+
* // Before running the sample:
|
|
221
|
+
* // - Enable the API at:
|
|
222
|
+
* // https://console.developers.google.com/apis/api/policyanalyzer.googleapis.com
|
|
223
|
+
* // - Login into gcloud by running:
|
|
224
|
+
* // ```sh
|
|
225
|
+
* // $ gcloud auth application-default login
|
|
226
|
+
* // ```
|
|
227
|
+
* // - Install the npm module by running:
|
|
228
|
+
* // ```sh
|
|
229
|
+
* // $ npm install googleapis
|
|
230
|
+
* // ```
|
|
231
|
+
*
|
|
232
|
+
* const {google} = require('googleapis');
|
|
233
|
+
* const policyanalyzer = google.policyanalyzer('v1beta1');
|
|
234
|
+
*
|
|
235
|
+
* async function main() {
|
|
236
|
+
* const auth = new google.auth.GoogleAuth({
|
|
237
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
238
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
239
|
+
* });
|
|
240
|
+
*
|
|
241
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
242
|
+
* const authClient = await auth.getClient();
|
|
243
|
+
* google.options({auth: authClient});
|
|
244
|
+
*
|
|
245
|
+
* // Do the magic
|
|
246
|
+
* const res =
|
|
247
|
+
* await policyanalyzer.folders.locations.activityTypes.activities.query({
|
|
248
|
+
* // Optional. Optional filter expression to restrict the activities returned. Supported filters are: - service_account_last_authn.full_resource_name {=\} - service_account_key_last_authn.full_resource_name {=\}
|
|
249
|
+
* filter: 'placeholder-value',
|
|
250
|
+
* // Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.
|
|
251
|
+
* pageSize: 'placeholder-value',
|
|
252
|
+
* // Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.
|
|
253
|
+
* pageToken: 'placeholder-value',
|
|
254
|
+
* // Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/
|
|
255
|
+
* parent:
|
|
256
|
+
* 'folders/my-folder/locations/my-location/activityTypes/my-activityType',
|
|
257
|
+
* });
|
|
258
|
+
* console.log(res.data);
|
|
259
|
+
*
|
|
260
|
+
* // Example response
|
|
261
|
+
* // {
|
|
262
|
+
* // "activities": [],
|
|
263
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
264
|
+
* // }
|
|
265
|
+
* }
|
|
266
|
+
*
|
|
267
|
+
* main().catch(e => {
|
|
268
|
+
* console.error(e);
|
|
269
|
+
* throw e;
|
|
270
|
+
* });
|
|
271
|
+
*
|
|
272
|
+
* ```
|
|
218
273
|
*
|
|
219
274
|
* @param params - Parameters for request
|
|
220
275
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -377,6 +432,63 @@ export namespace policyanalyzer_v1beta1 {
|
|
|
377
432
|
|
|
378
433
|
/**
|
|
379
434
|
* Queries policy activities on GCP resources.
|
|
435
|
+
* @example
|
|
436
|
+
* ```js
|
|
437
|
+
* // Before running the sample:
|
|
438
|
+
* // - Enable the API at:
|
|
439
|
+
* // https://console.developers.google.com/apis/api/policyanalyzer.googleapis.com
|
|
440
|
+
* // - Login into gcloud by running:
|
|
441
|
+
* // ```sh
|
|
442
|
+
* // $ gcloud auth application-default login
|
|
443
|
+
* // ```
|
|
444
|
+
* // - Install the npm module by running:
|
|
445
|
+
* // ```sh
|
|
446
|
+
* // $ npm install googleapis
|
|
447
|
+
* // ```
|
|
448
|
+
*
|
|
449
|
+
* const {google} = require('googleapis');
|
|
450
|
+
* const policyanalyzer = google.policyanalyzer('v1beta1');
|
|
451
|
+
*
|
|
452
|
+
* async function main() {
|
|
453
|
+
* const auth = new google.auth.GoogleAuth({
|
|
454
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
455
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
456
|
+
* });
|
|
457
|
+
*
|
|
458
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
459
|
+
* const authClient = await auth.getClient();
|
|
460
|
+
* google.options({auth: authClient});
|
|
461
|
+
*
|
|
462
|
+
* // Do the magic
|
|
463
|
+
* const res =
|
|
464
|
+
* await policyanalyzer.organizations.locations.activityTypes.activities.query(
|
|
465
|
+
* {
|
|
466
|
+
* // Optional. Optional filter expression to restrict the activities returned. Supported filters are: - service_account_last_authn.full_resource_name {=\} - service_account_key_last_authn.full_resource_name {=\}
|
|
467
|
+
* filter: 'placeholder-value',
|
|
468
|
+
* // Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.
|
|
469
|
+
* pageSize: 'placeholder-value',
|
|
470
|
+
* // Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.
|
|
471
|
+
* pageToken: 'placeholder-value',
|
|
472
|
+
* // Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/
|
|
473
|
+
* parent:
|
|
474
|
+
* 'organizations/my-organization/locations/my-location/activityTypes/my-activityType',
|
|
475
|
+
* },
|
|
476
|
+
* );
|
|
477
|
+
* console.log(res.data);
|
|
478
|
+
*
|
|
479
|
+
* // Example response
|
|
480
|
+
* // {
|
|
481
|
+
* // "activities": [],
|
|
482
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
483
|
+
* // }
|
|
484
|
+
* }
|
|
485
|
+
*
|
|
486
|
+
* main().catch(e => {
|
|
487
|
+
* console.error(e);
|
|
488
|
+
* throw e;
|
|
489
|
+
* });
|
|
490
|
+
*
|
|
491
|
+
* ```
|
|
380
492
|
*
|
|
381
493
|
* @param params - Parameters for request
|
|
382
494
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -537,6 +649,61 @@ export namespace policyanalyzer_v1beta1 {
|
|
|
537
649
|
|
|
538
650
|
/**
|
|
539
651
|
* Queries policy activities on GCP resources.
|
|
652
|
+
* @example
|
|
653
|
+
* ```js
|
|
654
|
+
* // Before running the sample:
|
|
655
|
+
* // - Enable the API at:
|
|
656
|
+
* // https://console.developers.google.com/apis/api/policyanalyzer.googleapis.com
|
|
657
|
+
* // - Login into gcloud by running:
|
|
658
|
+
* // ```sh
|
|
659
|
+
* // $ gcloud auth application-default login
|
|
660
|
+
* // ```
|
|
661
|
+
* // - Install the npm module by running:
|
|
662
|
+
* // ```sh
|
|
663
|
+
* // $ npm install googleapis
|
|
664
|
+
* // ```
|
|
665
|
+
*
|
|
666
|
+
* const {google} = require('googleapis');
|
|
667
|
+
* const policyanalyzer = google.policyanalyzer('v1beta1');
|
|
668
|
+
*
|
|
669
|
+
* async function main() {
|
|
670
|
+
* const auth = new google.auth.GoogleAuth({
|
|
671
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
672
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
673
|
+
* });
|
|
674
|
+
*
|
|
675
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
676
|
+
* const authClient = await auth.getClient();
|
|
677
|
+
* google.options({auth: authClient});
|
|
678
|
+
*
|
|
679
|
+
* // Do the magic
|
|
680
|
+
* const res =
|
|
681
|
+
* await policyanalyzer.projects.locations.activityTypes.activities.query({
|
|
682
|
+
* // Optional. Optional filter expression to restrict the activities returned. Supported filters are: - service_account_last_authn.full_resource_name {=\} - service_account_key_last_authn.full_resource_name {=\}
|
|
683
|
+
* filter: 'placeholder-value',
|
|
684
|
+
* // Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.
|
|
685
|
+
* pageSize: 'placeholder-value',
|
|
686
|
+
* // Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.
|
|
687
|
+
* pageToken: 'placeholder-value',
|
|
688
|
+
* // Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/
|
|
689
|
+
* parent:
|
|
690
|
+
* 'projects/my-project/locations/my-location/activityTypes/my-activityType',
|
|
691
|
+
* });
|
|
692
|
+
* console.log(res.data);
|
|
693
|
+
*
|
|
694
|
+
* // Example response
|
|
695
|
+
* // {
|
|
696
|
+
* // "activities": [],
|
|
697
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
698
|
+
* // }
|
|
699
|
+
* }
|
|
700
|
+
*
|
|
701
|
+
* main().catch(e => {
|
|
702
|
+
* console.error(e);
|
|
703
|
+
* throw e;
|
|
704
|
+
* });
|
|
705
|
+
*
|
|
706
|
+
* ```
|
|
540
707
|
*
|
|
541
708
|
* @param params - Parameters for request
|
|
542
709
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|