@googleapis/policyanalyzer 1.2.0 → 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 +43 -0
- package/build/index.d.ts +1 -1
- package/build/index.js.map +1 -1
- package/build/v1.d.ts +174 -7
- package/build/v1.js.map +1 -1
- package/build/v1beta1.d.ts +174 -7
- package/build/v1beta1.js.map +1 -1
- package/index.ts +0 -1
- package/package.json +2 -2
- package/v1.ts +192 -13
- package/v1beta1.ts +192 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
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
|
+
|
|
28
|
+
## [2.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/policyanalyzer-v2.0.0...policyanalyzer-v2.0.1) (2025-06-04)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* **deps:** upgrade googleapis-common to 8.0.2-rc ([f4b0990](https://github.com/googleapis/google-api-nodejs-client/commit/f4b099071040cfbcfe4a2e7d487d45ee93b369e0))
|
|
34
|
+
|
|
35
|
+
## [2.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/policyanalyzer-v1.2.0...policyanalyzer-v2.0.0) (2025-05-29)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### ⚠ BREAKING CHANGES
|
|
39
|
+
|
|
40
|
+
* upgrade to node 18
|
|
41
|
+
|
|
42
|
+
### Features
|
|
43
|
+
|
|
44
|
+
* upgrade to node 18 ([682fbb8](https://github.com/googleapis/google-api-nodejs-client/commit/682fbb869189ae92b3e9a194d37d0548af0c1f92))
|
|
45
|
+
|
|
3
46
|
## [1.2.0](https://github.com/googleapis/google-api-nodejs-client/compare/policyanalyzer-v1.1.0...policyanalyzer-v1.2.0) (2024-06-21)
|
|
4
47
|
|
|
5
48
|
|
package/build/index.d.ts
CHANGED
|
@@ -14,4 +14,4 @@ declare const auth: AuthPlus;
|
|
|
14
14
|
export { auth };
|
|
15
15
|
export { policyanalyzer_v1 };
|
|
16
16
|
export { policyanalyzer_v1beta1 };
|
|
17
|
-
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions,
|
|
17
|
+
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.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,kCAAkC;AAElC,yDAAuE;AACvE,6BAAuC;AAiC/B,kGAjCA,sBAAiB,OAiCA;AAhCzB,uCAAiD;AAiCzC,uGAjCA,gCAAsB,OAiCA;AA/BjB,QAAA,QAAQ,GAAG;IACtB,EAAE,EAAE,sBAAiB,CAAC,cAAc;IACpC,OAAO,EAAE,gCAAsB,CAAC,cAAc;CAC/C,CAAC;AAYF,SAAgB,cAAc,CAI5B,gBAIkC;IAElC,OAAO,IAAA,0BAAM,EAAI,gBAAgB,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AACvE,CAAC;AAXD,wCAWC;AAED,MAAM,IAAI,GAAG,IAAI,4BAAQ,EAAE,CAAC;AACpB,oBAAI;AAGZ,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.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,kCAAkC;AAElC,yDAAuE;AACvE,6BAAuC;AAiC/B,kGAjCA,sBAAiB,OAiCA;AAhCzB,uCAAiD;AAiCzC,uGAjCA,gCAAsB,OAiCA;AA/BjB,QAAA,QAAQ,GAAG;IACtB,EAAE,EAAE,sBAAiB,CAAC,cAAc;IACpC,OAAO,EAAE,gCAAsB,CAAC,cAAc;CAC/C,CAAC;AAYF,SAAgB,cAAc,CAI5B,gBAIkC;IAElC,OAAO,IAAA,0BAAM,EAAI,gBAAgB,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AACvE,CAAC;AAXD,wCAWC;AAED,MAAM,IAAI,GAAG,IAAI,4BAAQ,EAAE,CAAC;AACpB,oBAAI;AAGZ,uDAQ2B;AAPzB,6GAAA,QAAQ,OAAA"}
|
package/build/v1.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient,
|
|
2
|
+
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
|
|
3
3
|
import { Readable } from 'stream';
|
|
4
4
|
export declare namespace policyanalyzer_v1 {
|
|
5
5
|
export interface Options extends GlobalOptions {
|
|
@@ -142,14 +142,69 @@ 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`.
|
|
148
203
|
* @param callback - Optional callback that handles the response.
|
|
149
204
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
150
205
|
*/
|
|
151
|
-
query(params: Params$Resource$Folders$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions):
|
|
152
|
-
query(params?: Params$Resource$Folders$Locations$Activitytypes$Activities$Query, options?: MethodOptions):
|
|
206
|
+
query(params: Params$Resource$Folders$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
207
|
+
query(params?: Params$Resource$Folders$Locations$Activitytypes$Activities$Query, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>>;
|
|
153
208
|
query(params: Params$Resource$Folders$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
154
209
|
query(params: Params$Resource$Folders$Locations$Activitytypes$Activities$Query, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>): void;
|
|
155
210
|
query(params: Params$Resource$Folders$Locations$Activitytypes$Activities$Query, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>): void;
|
|
@@ -193,14 +248,71 @@ 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`.
|
|
199
311
|
* @param callback - Optional callback that handles the response.
|
|
200
312
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
201
313
|
*/
|
|
202
|
-
query(params: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions):
|
|
203
|
-
query(params?: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query, options?: MethodOptions):
|
|
314
|
+
query(params: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
315
|
+
query(params?: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>>;
|
|
204
316
|
query(params: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
205
317
|
query(params: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>): void;
|
|
206
318
|
query(params: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>): void;
|
|
@@ -244,14 +356,69 @@ 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`.
|
|
250
417
|
* @param callback - Optional callback that handles the response.
|
|
251
418
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
252
419
|
*/
|
|
253
|
-
query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions):
|
|
254
|
-
query(params?: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options?: MethodOptions):
|
|
420
|
+
query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
421
|
+
query(params?: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>>;
|
|
255
422
|
query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
256
423
|
query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>): void;
|
|
257
424
|
query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>): void;
|
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;AAG3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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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient,
|
|
2
|
+
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
|
|
3
3
|
import { Readable } from 'stream';
|
|
4
4
|
export declare namespace policyanalyzer_v1beta1 {
|
|
5
5
|
export interface Options extends GlobalOptions {
|
|
@@ -142,14 +142,69 @@ 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`.
|
|
148
203
|
* @param callback - Optional callback that handles the response.
|
|
149
204
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
150
205
|
*/
|
|
151
|
-
query(params: Params$Resource$Folders$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions):
|
|
152
|
-
query(params?: Params$Resource$Folders$Locations$Activitytypes$Activities$Query, options?: MethodOptions):
|
|
206
|
+
query(params: Params$Resource$Folders$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
207
|
+
query(params?: Params$Resource$Folders$Locations$Activitytypes$Activities$Query, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>>;
|
|
153
208
|
query(params: Params$Resource$Folders$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
154
209
|
query(params: Params$Resource$Folders$Locations$Activitytypes$Activities$Query, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>): void;
|
|
155
210
|
query(params: Params$Resource$Folders$Locations$Activitytypes$Activities$Query, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>): void;
|
|
@@ -193,14 +248,71 @@ 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`.
|
|
199
311
|
* @param callback - Optional callback that handles the response.
|
|
200
312
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
201
313
|
*/
|
|
202
|
-
query(params: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions):
|
|
203
|
-
query(params?: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query, options?: MethodOptions):
|
|
314
|
+
query(params: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
315
|
+
query(params?: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>>;
|
|
204
316
|
query(params: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
205
317
|
query(params: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>): void;
|
|
206
318
|
query(params: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>): void;
|
|
@@ -244,14 +356,69 @@ 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`.
|
|
250
417
|
* @param callback - Optional callback that handles the response.
|
|
251
418
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
252
419
|
*/
|
|
253
|
-
query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions):
|
|
254
|
-
query(params?: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options?: MethodOptions):
|
|
420
|
+
query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
421
|
+
query(params?: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>>;
|
|
255
422
|
query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
256
423
|
query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>): void;
|
|
257
424
|
query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>): void;
|
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,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,sBAAsB,CAsxBtC;AAtxBD,WAAiB,sBAAsB;IAgErC;;;;;;;;;;OAUG;IACH,MAAa,cAAc;QAMzB,YAAY,OAA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AAU,EAAE;gBAC1C,QAAQ,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,qCAAqC,CAAC,CAAC,OAAO,CAC5D,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,2EAAoD,uDAmKhE,CAAA;AAqBH,CAAC,EAtxBgB,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAsxBtC"}
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@googleapis/policyanalyzer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "policyanalyzer",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"webpack": "webpack"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"googleapis-common": "^
|
|
31
|
+
"googleapis-common": "^8.0.2-rc.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@microsoft/api-documenter": "^7.8.10",
|
package/v1.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
Compute,
|
|
24
24
|
UserRefreshClient,
|
|
25
25
|
BaseExternalAccountClient,
|
|
26
|
-
|
|
26
|
+
GaxiosResponseWithHTTP2,
|
|
27
27
|
GoogleConfigurable,
|
|
28
28
|
createAPIRequest,
|
|
29
29
|
MethodOptions,
|
|
@@ -215,6 +215,61 @@ 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`.
|
|
@@ -224,11 +279,13 @@ export namespace policyanalyzer_v1 {
|
|
|
224
279
|
query(
|
|
225
280
|
params: Params$Resource$Folders$Locations$Activitytypes$Activities$Query,
|
|
226
281
|
options: StreamMethodOptions
|
|
227
|
-
):
|
|
282
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
228
283
|
query(
|
|
229
284
|
params?: Params$Resource$Folders$Locations$Activitytypes$Activities$Query,
|
|
230
285
|
options?: MethodOptions
|
|
231
|
-
):
|
|
286
|
+
): Promise<
|
|
287
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>
|
|
288
|
+
>;
|
|
232
289
|
query(
|
|
233
290
|
params: Params$Resource$Folders$Locations$Activitytypes$Activities$Query,
|
|
234
291
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -263,8 +320,10 @@ export namespace policyanalyzer_v1 {
|
|
|
263
320
|
| BodyResponseCallback<Readable>
|
|
264
321
|
):
|
|
265
322
|
| void
|
|
266
|
-
|
|
|
267
|
-
|
|
323
|
+
| Promise<
|
|
324
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>
|
|
325
|
+
>
|
|
326
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
268
327
|
let params = (paramsOrCallback ||
|
|
269
328
|
{}) as Params$Resource$Folders$Locations$Activitytypes$Activities$Query;
|
|
270
329
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -373,6 +432,63 @@ export namespace policyanalyzer_v1 {
|
|
|
373
432
|
|
|
374
433
|
/**
|
|
375
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
|
+
* ```
|
|
376
492
|
*
|
|
377
493
|
* @param params - Parameters for request
|
|
378
494
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -382,11 +498,13 @@ export namespace policyanalyzer_v1 {
|
|
|
382
498
|
query(
|
|
383
499
|
params: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query,
|
|
384
500
|
options: StreamMethodOptions
|
|
385
|
-
):
|
|
501
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
386
502
|
query(
|
|
387
503
|
params?: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query,
|
|
388
504
|
options?: MethodOptions
|
|
389
|
-
):
|
|
505
|
+
): Promise<
|
|
506
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>
|
|
507
|
+
>;
|
|
390
508
|
query(
|
|
391
509
|
params: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query,
|
|
392
510
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -421,8 +539,10 @@ export namespace policyanalyzer_v1 {
|
|
|
421
539
|
| BodyResponseCallback<Readable>
|
|
422
540
|
):
|
|
423
541
|
| void
|
|
424
|
-
|
|
|
425
|
-
|
|
542
|
+
| Promise<
|
|
543
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>
|
|
544
|
+
>
|
|
545
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
426
546
|
let params = (paramsOrCallback ||
|
|
427
547
|
{}) as Params$Resource$Organizations$Locations$Activitytypes$Activities$Query;
|
|
428
548
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -529,6 +649,61 @@ export namespace policyanalyzer_v1 {
|
|
|
529
649
|
|
|
530
650
|
/**
|
|
531
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
|
+
* ```
|
|
532
707
|
*
|
|
533
708
|
* @param params - Parameters for request
|
|
534
709
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -538,11 +713,13 @@ export namespace policyanalyzer_v1 {
|
|
|
538
713
|
query(
|
|
539
714
|
params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query,
|
|
540
715
|
options: StreamMethodOptions
|
|
541
|
-
):
|
|
716
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
542
717
|
query(
|
|
543
718
|
params?: Params$Resource$Projects$Locations$Activitytypes$Activities$Query,
|
|
544
719
|
options?: MethodOptions
|
|
545
|
-
):
|
|
720
|
+
): Promise<
|
|
721
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>
|
|
722
|
+
>;
|
|
546
723
|
query(
|
|
547
724
|
params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query,
|
|
548
725
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -577,8 +754,10 @@ export namespace policyanalyzer_v1 {
|
|
|
577
754
|
| BodyResponseCallback<Readable>
|
|
578
755
|
):
|
|
579
756
|
| void
|
|
580
|
-
|
|
|
581
|
-
|
|
757
|
+
| Promise<
|
|
758
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>
|
|
759
|
+
>
|
|
760
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
582
761
|
let params = (paramsOrCallback ||
|
|
583
762
|
{}) as Params$Resource$Projects$Locations$Activitytypes$Activities$Query;
|
|
584
763
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
package/v1beta1.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
Compute,
|
|
24
24
|
UserRefreshClient,
|
|
25
25
|
BaseExternalAccountClient,
|
|
26
|
-
|
|
26
|
+
GaxiosResponseWithHTTP2,
|
|
27
27
|
GoogleConfigurable,
|
|
28
28
|
createAPIRequest,
|
|
29
29
|
MethodOptions,
|
|
@@ -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`.
|
|
@@ -224,11 +279,13 @@ export namespace policyanalyzer_v1beta1 {
|
|
|
224
279
|
query(
|
|
225
280
|
params: Params$Resource$Folders$Locations$Activitytypes$Activities$Query,
|
|
226
281
|
options: StreamMethodOptions
|
|
227
|
-
):
|
|
282
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
228
283
|
query(
|
|
229
284
|
params?: Params$Resource$Folders$Locations$Activitytypes$Activities$Query,
|
|
230
285
|
options?: MethodOptions
|
|
231
|
-
):
|
|
286
|
+
): Promise<
|
|
287
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>
|
|
288
|
+
>;
|
|
232
289
|
query(
|
|
233
290
|
params: Params$Resource$Folders$Locations$Activitytypes$Activities$Query,
|
|
234
291
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -263,8 +320,10 @@ export namespace policyanalyzer_v1beta1 {
|
|
|
263
320
|
| BodyResponseCallback<Readable>
|
|
264
321
|
):
|
|
265
322
|
| void
|
|
266
|
-
|
|
|
267
|
-
|
|
323
|
+
| Promise<
|
|
324
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>
|
|
325
|
+
>
|
|
326
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
268
327
|
let params = (paramsOrCallback ||
|
|
269
328
|
{}) as Params$Resource$Folders$Locations$Activitytypes$Activities$Query;
|
|
270
329
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -373,6 +432,63 @@ export namespace policyanalyzer_v1beta1 {
|
|
|
373
432
|
|
|
374
433
|
/**
|
|
375
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
|
+
* ```
|
|
376
492
|
*
|
|
377
493
|
* @param params - Parameters for request
|
|
378
494
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -382,11 +498,13 @@ export namespace policyanalyzer_v1beta1 {
|
|
|
382
498
|
query(
|
|
383
499
|
params: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query,
|
|
384
500
|
options: StreamMethodOptions
|
|
385
|
-
):
|
|
501
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
386
502
|
query(
|
|
387
503
|
params?: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query,
|
|
388
504
|
options?: MethodOptions
|
|
389
|
-
):
|
|
505
|
+
): Promise<
|
|
506
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>
|
|
507
|
+
>;
|
|
390
508
|
query(
|
|
391
509
|
params: Params$Resource$Organizations$Locations$Activitytypes$Activities$Query,
|
|
392
510
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -421,8 +539,10 @@ export namespace policyanalyzer_v1beta1 {
|
|
|
421
539
|
| BodyResponseCallback<Readable>
|
|
422
540
|
):
|
|
423
541
|
| void
|
|
424
|
-
|
|
|
425
|
-
|
|
542
|
+
| Promise<
|
|
543
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>
|
|
544
|
+
>
|
|
545
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
426
546
|
let params = (paramsOrCallback ||
|
|
427
547
|
{}) as Params$Resource$Organizations$Locations$Activitytypes$Activities$Query;
|
|
428
548
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -529,6 +649,61 @@ export namespace policyanalyzer_v1beta1 {
|
|
|
529
649
|
|
|
530
650
|
/**
|
|
531
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
|
+
* ```
|
|
532
707
|
*
|
|
533
708
|
* @param params - Parameters for request
|
|
534
709
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -538,11 +713,13 @@ export namespace policyanalyzer_v1beta1 {
|
|
|
538
713
|
query(
|
|
539
714
|
params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query,
|
|
540
715
|
options: StreamMethodOptions
|
|
541
|
-
):
|
|
716
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
542
717
|
query(
|
|
543
718
|
params?: Params$Resource$Projects$Locations$Activitytypes$Activities$Query,
|
|
544
719
|
options?: MethodOptions
|
|
545
|
-
):
|
|
720
|
+
): Promise<
|
|
721
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>
|
|
722
|
+
>;
|
|
546
723
|
query(
|
|
547
724
|
params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query,
|
|
548
725
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -577,8 +754,10 @@ export namespace policyanalyzer_v1beta1 {
|
|
|
577
754
|
| BodyResponseCallback<Readable>
|
|
578
755
|
):
|
|
579
756
|
| void
|
|
580
|
-
|
|
|
581
|
-
|
|
757
|
+
| Promise<
|
|
758
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>
|
|
759
|
+
>
|
|
760
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
582
761
|
let params = (paramsOrCallback ||
|
|
583
762
|
{}) as Params$Resource$Projects$Locations$Activitytypes$Activities$Query;
|
|
584
763
|
let options = (optionsOrCallback || {}) as MethodOptions;
|