@googleapis/policyanalyzer 1.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/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0 (2022-12-22)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **build:** This release has breaking changes.
9
+
10
+ ### Features
11
+
12
+ * **build:** run the generator (submodules now require Node 12) ([#3073](https://github.com/googleapis/google-api-nodejs-client/issues/3073)) ([eda0707](https://github.com/googleapis/google-api-nodejs-client/commit/eda07079dadab46a80b6f9ede618f4f43030169e))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **policyanalyzer:** update the API ([96abc5d](https://github.com/googleapis/google-api-nodejs-client/commit/96abc5de009e8f9d9d1e496bde05b2466ab7c801))
package/README.md ADDED
@@ -0,0 +1,28 @@
1
+ <img src="https://avatars0.githubusercontent.com/u/1342004?v=3&s=96" alt="Google Inc. logo" title="Google" align="right" height="96" width="96"/>
2
+
3
+ # policyanalyzer
4
+
5
+ >
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ $ npm install @googleapis/policyanalyzer
11
+ ```
12
+
13
+ ## Usage
14
+ All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client).
15
+ Information on classes can be found in [Googleapis Documentation](https://googleapis.dev/nodejs/googleapis/latest/policyanalyzer/classes/Policyanalyzer.html).
16
+
17
+ ## License
18
+ This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/main/LICENSE).
19
+
20
+ ## Contributing
21
+ We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/main/.github/CONTRIBUTING.md).
22
+
23
+ ## Questions/problems?
24
+ * Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
25
+ * If you've found an bug/issue, please [file it on GitHub](https://github.com/googleapis/google-api-nodejs-client/issues).
26
+
27
+
28
+ *Crafted with ❤️ by the Google Node.js team*
@@ -0,0 +1,17 @@
1
+ /*! THIS FILE IS AUTO-GENERATED */
2
+ import { AuthPlus } from 'googleapis-common';
3
+ import { policyanalyzer_v1 } from './v1';
4
+ import { policyanalyzer_v1beta1 } from './v1beta1';
5
+ export declare const VERSIONS: {
6
+ v1: typeof policyanalyzer_v1.Policyanalyzer;
7
+ v1beta1: typeof policyanalyzer_v1beta1.Policyanalyzer;
8
+ };
9
+ export declare function policyanalyzer(version: 'v1'): policyanalyzer_v1.Policyanalyzer;
10
+ export declare function policyanalyzer(options: policyanalyzer_v1.Options): policyanalyzer_v1.Policyanalyzer;
11
+ export declare function policyanalyzer(version: 'v1beta1'): policyanalyzer_v1beta1.Policyanalyzer;
12
+ export declare function policyanalyzer(options: policyanalyzer_v1beta1.Options): policyanalyzer_v1beta1.Policyanalyzer;
13
+ declare const auth: AuthPlus;
14
+ export { auth };
15
+ export { policyanalyzer_v1 };
16
+ export { policyanalyzer_v1beta1 };
17
+ export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, GaxiosPromise, MethodOptions, BodyResponseCallback, } from 'googleapis-common';
package/build/index.js ADDED
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ // Copyright 2020 Google LLC
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.AuthPlus = exports.policyanalyzer_v1beta1 = exports.policyanalyzer_v1 = exports.auth = exports.policyanalyzer = exports.VERSIONS = void 0;
16
+ /*! THIS FILE IS AUTO-GENERATED */
17
+ const googleapis_common_1 = require("googleapis-common");
18
+ const v1_1 = require("./v1");
19
+ Object.defineProperty(exports, "policyanalyzer_v1", { enumerable: true, get: function () { return v1_1.policyanalyzer_v1; } });
20
+ const v1beta1_1 = require("./v1beta1");
21
+ Object.defineProperty(exports, "policyanalyzer_v1beta1", { enumerable: true, get: function () { return v1beta1_1.policyanalyzer_v1beta1; } });
22
+ exports.VERSIONS = {
23
+ v1: v1_1.policyanalyzer_v1.Policyanalyzer,
24
+ v1beta1: v1beta1_1.policyanalyzer_v1beta1.Policyanalyzer,
25
+ };
26
+ function policyanalyzer(versionOrOptions) {
27
+ return (0, googleapis_common_1.getAPI)('policyanalyzer', versionOrOptions, exports.VERSIONS, this);
28
+ }
29
+ exports.policyanalyzer = policyanalyzer;
30
+ const auth = new googleapis_common_1.AuthPlus();
31
+ exports.auth = auth;
32
+ var googleapis_common_2 = require("googleapis-common");
33
+ Object.defineProperty(exports, "AuthPlus", { enumerable: true, get: function () { return googleapis_common_2.AuthPlus; } });
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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,uDAS2B;AARzB,6GAAA,QAAQ,OAAA"}
package/build/v1.d.ts ADDED
@@ -0,0 +1,223 @@
1
+ /// <reference types="node" />
2
+ import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
3
+ import { Readable } from 'stream';
4
+ export declare namespace policyanalyzer_v1 {
5
+ export interface Options extends GlobalOptions {
6
+ version: 'v1';
7
+ }
8
+ interface StandardParameters {
9
+ /**
10
+ * Auth client or API Key for the request
11
+ */
12
+ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
13
+ /**
14
+ * V1 error format.
15
+ */
16
+ '$.xgafv'?: string;
17
+ /**
18
+ * OAuth access token.
19
+ */
20
+ access_token?: string;
21
+ /**
22
+ * Data format for response.
23
+ */
24
+ alt?: string;
25
+ /**
26
+ * JSONP
27
+ */
28
+ callback?: string;
29
+ /**
30
+ * Selector specifying which fields to include in a partial response.
31
+ */
32
+ fields?: string;
33
+ /**
34
+ * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
35
+ */
36
+ key?: string;
37
+ /**
38
+ * OAuth 2.0 token for the current user.
39
+ */
40
+ oauth_token?: string;
41
+ /**
42
+ * Returns response with indentations and line breaks.
43
+ */
44
+ prettyPrint?: boolean;
45
+ /**
46
+ * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
47
+ */
48
+ quotaUser?: string;
49
+ /**
50
+ * Legacy upload protocol for media (e.g. "media", "multipart").
51
+ */
52
+ uploadType?: string;
53
+ /**
54
+ * Upload protocol for media (e.g. "raw", "multipart").
55
+ */
56
+ upload_protocol?: string;
57
+ }
58
+ /**
59
+ * Policy Analyzer API
60
+ *
61
+ *
62
+ *
63
+ * @example
64
+ * ```js
65
+ * const {google} = require('googleapis');
66
+ * const policyanalyzer = google.policyanalyzer('v1');
67
+ * ```
68
+ */
69
+ export class Policyanalyzer {
70
+ context: APIRequestContext;
71
+ projects: Resource$Projects;
72
+ constructor(options: GlobalOptions, google?: GoogleConfigurable);
73
+ }
74
+ export interface Schema$GoogleCloudPolicyanalyzerV1Activity {
75
+ /**
76
+ * A struct of custom fields to explain the activity.
77
+ */
78
+ activity?: {
79
+ [key: string]: any;
80
+ } | null;
81
+ /**
82
+ * The type of the activity.
83
+ */
84
+ activityType?: string | null;
85
+ /**
86
+ * The full resource name that identifies the resource. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
87
+ */
88
+ fullResourceName?: string | null;
89
+ /**
90
+ * The data observation period to build the activity.
91
+ */
92
+ observationPeriod?: Schema$GoogleCloudPolicyanalyzerV1ObservationPeriod;
93
+ }
94
+ /**
95
+ * Represents data observation period.
96
+ */
97
+ export interface Schema$GoogleCloudPolicyanalyzerV1ObservationPeriod {
98
+ /**
99
+ * The observation end time. The time in this timestamp is always `07:00:00Z`.
100
+ */
101
+ endTime?: string | null;
102
+ /**
103
+ * The observation start time. The time in this timestamp is always `07:00:00Z`.
104
+ */
105
+ startTime?: string | null;
106
+ }
107
+ /**
108
+ * Response to the `QueryActivity` method.
109
+ */
110
+ export interface Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse {
111
+ /**
112
+ * The set of activities that match the filter included in the request.
113
+ */
114
+ activities?: Schema$GoogleCloudPolicyanalyzerV1Activity[];
115
+ /**
116
+ * If there might be more results than those appearing in this response, then `nextPageToken` is included. To get the next set of results, call this method again using the value of `nextPageToken` as `pageToken`.
117
+ */
118
+ nextPageToken?: string | null;
119
+ }
120
+ export class Resource$Projects {
121
+ context: APIRequestContext;
122
+ locations: Resource$Projects$Locations;
123
+ constructor(context: APIRequestContext);
124
+ }
125
+ export class Resource$Projects$Locations {
126
+ context: APIRequestContext;
127
+ activityTypes: Resource$Projects$Locations$Activitytypes;
128
+ constructor(context: APIRequestContext);
129
+ }
130
+ export class Resource$Projects$Locations$Activitytypes {
131
+ context: APIRequestContext;
132
+ activities: Resource$Projects$Locations$Activitytypes$Activities;
133
+ constructor(context: APIRequestContext);
134
+ }
135
+ export class Resource$Projects$Locations$Activitytypes$Activities {
136
+ context: APIRequestContext;
137
+ constructor(context: APIRequestContext);
138
+ /**
139
+ * Queries policy activities on Google Cloud resources.
140
+ * @example
141
+ * ```js
142
+ * // Before running the sample:
143
+ * // - Enable the API at:
144
+ * // https://console.developers.google.com/apis/api/policyanalyzer.googleapis.com
145
+ * // - Login into gcloud by running:
146
+ * // `$ gcloud auth application-default login`
147
+ * // - Install the npm module by running:
148
+ * // `$ npm install googleapis`
149
+ *
150
+ * const {google} = require('googleapis');
151
+ * const policyanalyzer = google.policyanalyzer('v1');
152
+ *
153
+ * async function main() {
154
+ * const auth = new google.auth.GoogleAuth({
155
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
156
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
157
+ * });
158
+ *
159
+ * // Acquire an auth client, and bind it to all future calls
160
+ * const authClient = await auth.getClient();
161
+ * google.options({auth: authClient});
162
+ *
163
+ * // Do the magic
164
+ * const res =
165
+ * await policyanalyzer.projects.locations.activityTypes.activities.query({
166
+ * // 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.
167
+ * filter: 'placeholder-value',
168
+ * // 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.
169
+ * pageSize: 'placeholder-value',
170
+ * // 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.
171
+ * pageToken: 'placeholder-value',
172
+ * // 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/
173
+ * parent:
174
+ * 'projects/my-project/locations/my-location/activityTypes/my-activityType',
175
+ * });
176
+ * console.log(res.data);
177
+ *
178
+ * // Example response
179
+ * // {
180
+ * // "activities": [],
181
+ * // "nextPageToken": "my_nextPageToken"
182
+ * // }
183
+ * }
184
+ *
185
+ * main().catch(e => {
186
+ * console.error(e);
187
+ * throw e;
188
+ * });
189
+ *
190
+ * ```
191
+ *
192
+ * @param params - Parameters for request
193
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
194
+ * @param callback - Optional callback that handles the response.
195
+ * @returns A promise if used with async/await, or void if used with a callback.
196
+ */
197
+ query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions): GaxiosPromise<Readable>;
198
+ query(params?: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options?: MethodOptions): GaxiosPromise<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>;
199
+ query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
200
+ query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>): void;
201
+ query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>): void;
202
+ query(callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1QueryActivityResponse>): void;
203
+ }
204
+ export interface Params$Resource$Projects$Locations$Activitytypes$Activities$Query extends StandardParameters {
205
+ /**
206
+ * 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.
207
+ */
208
+ filter?: string;
209
+ /**
210
+ * 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.
211
+ */
212
+ pageSize?: number;
213
+ /**
214
+ * 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.
215
+ */
216
+ pageToken?: string;
217
+ /**
218
+ * 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/
219
+ */
220
+ parent?: string;
221
+ }
222
+ export {};
223
+ }
package/build/v1.js ADDED
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ // Copyright 2020 Google LLC
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.policyanalyzer_v1 = void 0;
16
+ /* eslint-disable @typescript-eslint/no-explicit-any */
17
+ /* eslint-disable @typescript-eslint/no-unused-vars */
18
+ /* eslint-disable @typescript-eslint/no-empty-interface */
19
+ /* eslint-disable @typescript-eslint/no-namespace */
20
+ /* eslint-disable no-irregular-whitespace */
21
+ const googleapis_common_1 = require("googleapis-common");
22
+ var policyanalyzer_v1;
23
+ (function (policyanalyzer_v1) {
24
+ /**
25
+ * Policy Analyzer API
26
+ *
27
+ *
28
+ *
29
+ * @example
30
+ * ```js
31
+ * const {google} = require('googleapis');
32
+ * const policyanalyzer = google.policyanalyzer('v1');
33
+ * ```
34
+ */
35
+ class Policyanalyzer {
36
+ constructor(options, google) {
37
+ this.context = {
38
+ _options: options || {},
39
+ google,
40
+ };
41
+ this.projects = new Resource$Projects(this.context);
42
+ }
43
+ }
44
+ policyanalyzer_v1.Policyanalyzer = Policyanalyzer;
45
+ class Resource$Projects {
46
+ constructor(context) {
47
+ this.context = context;
48
+ this.locations = new Resource$Projects$Locations(this.context);
49
+ }
50
+ }
51
+ policyanalyzer_v1.Resource$Projects = Resource$Projects;
52
+ class Resource$Projects$Locations {
53
+ constructor(context) {
54
+ this.context = context;
55
+ this.activityTypes = new Resource$Projects$Locations$Activitytypes(this.context);
56
+ }
57
+ }
58
+ policyanalyzer_v1.Resource$Projects$Locations = Resource$Projects$Locations;
59
+ class Resource$Projects$Locations$Activitytypes {
60
+ constructor(context) {
61
+ this.context = context;
62
+ this.activities =
63
+ new Resource$Projects$Locations$Activitytypes$Activities(this.context);
64
+ }
65
+ }
66
+ policyanalyzer_v1.Resource$Projects$Locations$Activitytypes = Resource$Projects$Locations$Activitytypes;
67
+ class Resource$Projects$Locations$Activitytypes$Activities {
68
+ constructor(context) {
69
+ this.context = context;
70
+ }
71
+ query(paramsOrCallback, optionsOrCallback, callback) {
72
+ let params = (paramsOrCallback ||
73
+ {});
74
+ let options = (optionsOrCallback || {});
75
+ if (typeof paramsOrCallback === 'function') {
76
+ callback = paramsOrCallback;
77
+ params =
78
+ {};
79
+ options = {};
80
+ }
81
+ if (typeof optionsOrCallback === 'function') {
82
+ callback = optionsOrCallback;
83
+ options = {};
84
+ }
85
+ const rootUrl = options.rootUrl || 'https://policyanalyzer.googleapis.com/';
86
+ const parameters = {
87
+ options: Object.assign({
88
+ url: (rootUrl + '/v1/{+parent}/activities:query').replace(/([^:]\/)\/+/g, '$1'),
89
+ method: 'GET',
90
+ }, options),
91
+ params,
92
+ requiredParams: ['parent'],
93
+ pathParams: ['parent'],
94
+ context: this.context,
95
+ };
96
+ if (callback) {
97
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
98
+ }
99
+ else {
100
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
101
+ }
102
+ }
103
+ }
104
+ policyanalyzer_v1.Resource$Projects$Locations$Activitytypes$Activities = Resource$Projects$Locations$Activitytypes$Activities;
105
+ })(policyanalyzer_v1 = exports.policyanalyzer_v1 || (exports.policyanalyzer_v1 = {}));
106
+ //# sourceMappingURL=v1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,223 @@
1
+ /// <reference types="node" />
2
+ import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
3
+ import { Readable } from 'stream';
4
+ export declare namespace policyanalyzer_v1beta1 {
5
+ export interface Options extends GlobalOptions {
6
+ version: 'v1beta1';
7
+ }
8
+ interface StandardParameters {
9
+ /**
10
+ * Auth client or API Key for the request
11
+ */
12
+ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
13
+ /**
14
+ * V1 error format.
15
+ */
16
+ '$.xgafv'?: string;
17
+ /**
18
+ * OAuth access token.
19
+ */
20
+ access_token?: string;
21
+ /**
22
+ * Data format for response.
23
+ */
24
+ alt?: string;
25
+ /**
26
+ * JSONP
27
+ */
28
+ callback?: string;
29
+ /**
30
+ * Selector specifying which fields to include in a partial response.
31
+ */
32
+ fields?: string;
33
+ /**
34
+ * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
35
+ */
36
+ key?: string;
37
+ /**
38
+ * OAuth 2.0 token for the current user.
39
+ */
40
+ oauth_token?: string;
41
+ /**
42
+ * Returns response with indentations and line breaks.
43
+ */
44
+ prettyPrint?: boolean;
45
+ /**
46
+ * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
47
+ */
48
+ quotaUser?: string;
49
+ /**
50
+ * Legacy upload protocol for media (e.g. "media", "multipart").
51
+ */
52
+ uploadType?: string;
53
+ /**
54
+ * Upload protocol for media (e.g. "raw", "multipart").
55
+ */
56
+ upload_protocol?: string;
57
+ }
58
+ /**
59
+ * Policy Analyzer API
60
+ *
61
+ *
62
+ *
63
+ * @example
64
+ * ```js
65
+ * const {google} = require('googleapis');
66
+ * const policyanalyzer = google.policyanalyzer('v1beta1');
67
+ * ```
68
+ */
69
+ export class Policyanalyzer {
70
+ context: APIRequestContext;
71
+ projects: Resource$Projects;
72
+ constructor(options: GlobalOptions, google?: GoogleConfigurable);
73
+ }
74
+ export interface Schema$GoogleCloudPolicyanalyzerV1beta1Activity {
75
+ /**
76
+ * A struct of custom fields to explain the activity.
77
+ */
78
+ activity?: {
79
+ [key: string]: any;
80
+ } | null;
81
+ /**
82
+ * The type of the activity.
83
+ */
84
+ activityType?: string | null;
85
+ /**
86
+ * The full resource name that identifies the resource. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
87
+ */
88
+ fullResourceName?: string | null;
89
+ /**
90
+ * The data observation period to build the activity.
91
+ */
92
+ observationPeriod?: Schema$GoogleCloudPolicyanalyzerV1beta1ObservationPeriod;
93
+ }
94
+ /**
95
+ * Represents data observation period.
96
+ */
97
+ export interface Schema$GoogleCloudPolicyanalyzerV1beta1ObservationPeriod {
98
+ /**
99
+ * The observation end time.
100
+ */
101
+ endTime?: string | null;
102
+ /**
103
+ * The observation start time.
104
+ */
105
+ startTime?: string | null;
106
+ }
107
+ /**
108
+ * Response to the `QueryActivity` method.
109
+ */
110
+ export interface Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse {
111
+ /**
112
+ * The set of activities that match the filter included in the request.
113
+ */
114
+ activities?: Schema$GoogleCloudPolicyanalyzerV1beta1Activity[];
115
+ /**
116
+ * If there might be more results than those appearing in this response, then `nextPageToken` is included. To get the next set of results, call this method again using the value of `nextPageToken` as `pageToken`.
117
+ */
118
+ nextPageToken?: string | null;
119
+ }
120
+ export class Resource$Projects {
121
+ context: APIRequestContext;
122
+ locations: Resource$Projects$Locations;
123
+ constructor(context: APIRequestContext);
124
+ }
125
+ export class Resource$Projects$Locations {
126
+ context: APIRequestContext;
127
+ activityTypes: Resource$Projects$Locations$Activitytypes;
128
+ constructor(context: APIRequestContext);
129
+ }
130
+ export class Resource$Projects$Locations$Activitytypes {
131
+ context: APIRequestContext;
132
+ activities: Resource$Projects$Locations$Activitytypes$Activities;
133
+ constructor(context: APIRequestContext);
134
+ }
135
+ export class Resource$Projects$Locations$Activitytypes$Activities {
136
+ context: APIRequestContext;
137
+ constructor(context: APIRequestContext);
138
+ /**
139
+ * Queries policy activities on GCP resources.
140
+ * @example
141
+ * ```js
142
+ * // Before running the sample:
143
+ * // - Enable the API at:
144
+ * // https://console.developers.google.com/apis/api/policyanalyzer.googleapis.com
145
+ * // - Login into gcloud by running:
146
+ * // `$ gcloud auth application-default login`
147
+ * // - Install the npm module by running:
148
+ * // `$ npm install googleapis`
149
+ *
150
+ * const {google} = require('googleapis');
151
+ * const policyanalyzer = google.policyanalyzer('v1beta1');
152
+ *
153
+ * async function main() {
154
+ * const auth = new google.auth.GoogleAuth({
155
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
156
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
157
+ * });
158
+ *
159
+ * // Acquire an auth client, and bind it to all future calls
160
+ * const authClient = await auth.getClient();
161
+ * google.options({auth: authClient});
162
+ *
163
+ * // Do the magic
164
+ * const res =
165
+ * await policyanalyzer.projects.locations.activityTypes.activities.query({
166
+ * // 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 {=\}
167
+ * filter: 'placeholder-value',
168
+ * // 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.
169
+ * pageSize: 'placeholder-value',
170
+ * // 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.
171
+ * pageToken: 'placeholder-value',
172
+ * // 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/
173
+ * parent:
174
+ * 'projects/my-project/locations/my-location/activityTypes/my-activityType',
175
+ * });
176
+ * console.log(res.data);
177
+ *
178
+ * // Example response
179
+ * // {
180
+ * // "activities": [],
181
+ * // "nextPageToken": "my_nextPageToken"
182
+ * // }
183
+ * }
184
+ *
185
+ * main().catch(e => {
186
+ * console.error(e);
187
+ * throw e;
188
+ * });
189
+ *
190
+ * ```
191
+ *
192
+ * @param params - Parameters for request
193
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
194
+ * @param callback - Optional callback that handles the response.
195
+ * @returns A promise if used with async/await, or void if used with a callback.
196
+ */
197
+ query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions): GaxiosPromise<Readable>;
198
+ query(params?: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options?: MethodOptions): GaxiosPromise<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>;
199
+ query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
200
+ query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>): void;
201
+ query(params: Params$Resource$Projects$Locations$Activitytypes$Activities$Query, callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>): void;
202
+ query(callback: BodyResponseCallback<Schema$GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse>): void;
203
+ }
204
+ export interface Params$Resource$Projects$Locations$Activitytypes$Activities$Query extends StandardParameters {
205
+ /**
206
+ * 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 {=\}
207
+ */
208
+ filter?: string;
209
+ /**
210
+ * 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.
211
+ */
212
+ pageSize?: number;
213
+ /**
214
+ * 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.
215
+ */
216
+ pageToken?: string;
217
+ /**
218
+ * 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/
219
+ */
220
+ parent?: string;
221
+ }
222
+ export {};
223
+ }