@googleapis/policyanalyzer 2.0.1 → 4.0.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/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`.