@maxim_mazurok/gapi.client.orgpolicy-v2 0.0.20220809

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/index.d.ts ADDED
@@ -0,0 +1,1051 @@
1
+ /* Type definitions for non-npm package Organization Policy API v2 0.0 */
2
+ // Project: https://cloud.google.com/orgpolicy/docs/reference/rest/index.html
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+ // TypeScript Version: 2.8
8
+
9
+ // IMPORTANT
10
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
11
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
12
+ // Generated from: https://orgpolicy.googleapis.com/$discovery/rest?version=v2
13
+ // Revision: 20220809
14
+
15
+ /// <reference types="gapi.client" />
16
+
17
+ declare namespace gapi.client {
18
+ /** Load Organization Policy API v2 */
19
+ function load(urlOrObject: "https://orgpolicy.googleapis.com/$discovery/rest?version=v2"): Promise<void>;
20
+ /** @deprecated Please load APIs with discovery documents. */
21
+ function load(name: "orgpolicy", version: "v2"): Promise<void>;
22
+ /** @deprecated Please load APIs with discovery documents. */
23
+ function load(name: "orgpolicy", version: "v2", callback: () => any): void;
24
+
25
+ namespace orgpolicy {
26
+ interface GoogleCloudOrgpolicyV2AlternatePolicySpec {
27
+ /** Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy. */
28
+ launch?: string;
29
+ /** Specify `Constraint` for configurations of Cloud Platform resources. */
30
+ spec?: GoogleCloudOrgpolicyV2PolicySpec;
31
+ }
32
+ interface GoogleCloudOrgpolicyV2Constraint {
33
+ /** Defines this constraint as being a BooleanConstraint. */
34
+ booleanConstraint?: any;
35
+ /** The evaluation behavior of this constraint in the absence of 'Policy'. */
36
+ constraintDefault?: string;
37
+ /** Detailed description of what this `Constraint` controls as well as how and where it is enforced. Mutable. */
38
+ description?: string;
39
+ /** The human readable name. Mutable. */
40
+ displayName?: string;
41
+ /** Defines this constraint as being a ListConstraint. */
42
+ listConstraint?: GoogleCloudOrgpolicyV2ConstraintListConstraint;
43
+ /**
44
+ * Immutable. The resource name of the Constraint. Must be in one of the following forms: * `projects/{project_number}/constraints/{constraint_name}` *
45
+ * `folders/{folder_id}/constraints/{constraint_name}` * `organizations/{organization_id}/constraints/{constraint_name}` For example,
46
+ * "/projects/123/constraints/compute.disableSerialPortAccess".
47
+ */
48
+ name?: string;
49
+ }
50
+ // tslint:disable-next-line:no-empty-interface
51
+ interface GoogleCloudOrgpolicyV2ConstraintBooleanConstraint {
52
+ }
53
+ interface GoogleCloudOrgpolicyV2ConstraintListConstraint {
54
+ /**
55
+ * Indicates whether values grouped into categories can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `"in:Python"` would match any value in the 'Python'
56
+ * group.
57
+ */
58
+ supportsIn?: boolean;
59
+ /**
60
+ * Indicates whether subtrees of Cloud Resource Manager resource hierarchy can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `"under:folders/123"` would
61
+ * match any resource under the 'folders/123' folder.
62
+ */
63
+ supportsUnder?: boolean;
64
+ }
65
+ interface GoogleCloudOrgpolicyV2ListConstraintsResponse {
66
+ /** The collection of constraints that are available on the targeted resource. */
67
+ constraints?: GoogleCloudOrgpolicyV2Constraint[];
68
+ /** Page token used to retrieve the next page. This is currently not used. */
69
+ nextPageToken?: string;
70
+ }
71
+ interface GoogleCloudOrgpolicyV2ListPoliciesResponse {
72
+ /** Page token used to retrieve the next page. This is currently not used, but the server may at any point start supplying a valid token. */
73
+ nextPageToken?: string;
74
+ /** All `Policies` that exist on the resource. It will be empty if no `Policies` are set. */
75
+ policies?: GoogleCloudOrgpolicyV2Policy[];
76
+ }
77
+ interface GoogleCloudOrgpolicyV2Policy {
78
+ /** Deprecated. */
79
+ alternate?: GoogleCloudOrgpolicyV2AlternatePolicySpec;
80
+ /**
81
+ * Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: *
82
+ * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example,
83
+ * "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will
84
+ * return the name using the equivalent project number.
85
+ */
86
+ name?: string;
87
+ /** Basic information about the Organization Policy. */
88
+ spec?: GoogleCloudOrgpolicyV2PolicySpec;
89
+ }
90
+ interface GoogleCloudOrgpolicyV2PolicySpec {
91
+ /**
92
+ * An opaque tag indicating the current version of the `Policy`, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the `Policy` is returned
93
+ * from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current `Policy` to use when executing a read-modify-write loop. When the `Policy` is
94
+ * returned from a `GetEffectivePolicy` request, the `etag` will be unset.
95
+ */
96
+ etag?: string;
97
+ /**
98
+ * Determines the inheritance behavior for this `Policy`. If `inherit_from_parent` is true, PolicyRules set higher up in the hierarchy (up to the closest root) are inherited and
99
+ * present in the effective policy. If it is false, then no rules are inherited, and this Policy becomes the new root for evaluation. This field can be set only for Policies which
100
+ * configure list constraints.
101
+ */
102
+ inheritFromParent?: boolean;
103
+ /**
104
+ * Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific `Constraint` at this resource. This field can be set in policies
105
+ * for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
106
+ */
107
+ reset?: boolean;
108
+ /**
109
+ * Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. -
110
+ * BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true
111
+ * for a target resource take precedence.
112
+ */
113
+ rules?: GoogleCloudOrgpolicyV2PolicySpecPolicyRule[];
114
+ /** Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that `Policy`. */
115
+ updateTime?: string;
116
+ }
117
+ interface GoogleCloudOrgpolicyV2PolicySpecPolicyRule {
118
+ /** Setting this to true means that all values are allowed. This field can be set only in Policies for list constraints. */
119
+ allowAll?: boolean;
120
+ /**
121
+ * A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions,
122
+ * joined by the "||" or "&&" operators. Each subexpression must be of the form "resource.matchTag('/tag_key_short_name, 'tag_value_short_name')". or
123
+ * "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag
124
+ * Manager Service. An example expression is: "resource.matchTag('123456789/environment, 'prod')". or "resource.matchTagId('tagKeys/123', 'tagValues/456')".
125
+ */
126
+ condition?: GoogleTypeExpr;
127
+ /** Setting this to true means that all values are denied. This field can be set only in Policies for list constraints. */
128
+ denyAll?: boolean;
129
+ /** If `true`, then the `Policy` is enforced. If `false`, then any configuration is acceptable. This field can be set only in Policies for boolean constraints. */
130
+ enforce?: boolean;
131
+ /** List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints. */
132
+ values?: GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues;
133
+ }
134
+ interface GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues {
135
+ /** List of values allowed at this resource. */
136
+ allowedValues?: string[];
137
+ /** List of values denied at this resource. */
138
+ deniedValues?: string[];
139
+ }
140
+ // tslint:disable-next-line:no-empty-interface
141
+ interface GoogleProtobufEmpty {
142
+ }
143
+ interface GoogleTypeExpr {
144
+ /** Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. */
145
+ description?: string;
146
+ /** Textual representation of an expression in Common Expression Language syntax. */
147
+ expression?: string;
148
+ /** Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. */
149
+ location?: string;
150
+ /** Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. */
151
+ title?: string;
152
+ }
153
+ interface ConstraintsResource {
154
+ /** Lists `Constraints` that could be applied on the specified resource. */
155
+ list(request?: {
156
+ /** V1 error format. */
157
+ "$.xgafv"?: string;
158
+ /** OAuth access token. */
159
+ access_token?: string;
160
+ /** Data format for response. */
161
+ alt?: string;
162
+ /** JSONP */
163
+ callback?: string;
164
+ /** Selector specifying which fields to include in a partial response. */
165
+ fields?: string;
166
+ /** 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. */
167
+ key?: string;
168
+ /** OAuth 2.0 token for the current user. */
169
+ oauth_token?: string;
170
+ /** Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. */
171
+ pageSize?: number;
172
+ /** Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. */
173
+ pageToken?: string;
174
+ /**
175
+ * Required. The Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}`
176
+ * * `organizations/{organization_id}`
177
+ */
178
+ parent: string;
179
+ /** Returns response with indentations and line breaks. */
180
+ prettyPrint?: boolean;
181
+ /** 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. */
182
+ quotaUser?: string;
183
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
184
+ upload_protocol?: string;
185
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
186
+ uploadType?: string;
187
+ }): Request<GoogleCloudOrgpolicyV2ListConstraintsResponse>;
188
+ }
189
+ interface PoliciesResource {
190
+ /**
191
+ * Creates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with
192
+ * `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Cloud resource.
193
+ */
194
+ create(request: {
195
+ /** V1 error format. */
196
+ "$.xgafv"?: string;
197
+ /** OAuth access token. */
198
+ access_token?: string;
199
+ /** Data format for response. */
200
+ alt?: string;
201
+ /** JSONP */
202
+ callback?: string;
203
+ /** Selector specifying which fields to include in a partial response. */
204
+ fields?: string;
205
+ /** 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. */
206
+ key?: string;
207
+ /** OAuth 2.0 token for the current user. */
208
+ oauth_token?: string;
209
+ /**
210
+ * Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` *
211
+ * `folders/{folder_id}` * `organizations/{organization_id}`
212
+ */
213
+ parent: string;
214
+ /** Returns response with indentations and line breaks. */
215
+ prettyPrint?: boolean;
216
+ /** 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. */
217
+ quotaUser?: string;
218
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
219
+ upload_protocol?: string;
220
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
221
+ uploadType?: string;
222
+ /** Request body */
223
+ resource: GoogleCloudOrgpolicyV2Policy;
224
+ }): Request<GoogleCloudOrgpolicyV2Policy>;
225
+ create(request: {
226
+ /** V1 error format. */
227
+ "$.xgafv"?: string;
228
+ /** OAuth access token. */
229
+ access_token?: string;
230
+ /** Data format for response. */
231
+ alt?: string;
232
+ /** JSONP */
233
+ callback?: string;
234
+ /** Selector specifying which fields to include in a partial response. */
235
+ fields?: string;
236
+ /** 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. */
237
+ key?: string;
238
+ /** OAuth 2.0 token for the current user. */
239
+ oauth_token?: string;
240
+ /**
241
+ * Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` *
242
+ * `folders/{folder_id}` * `organizations/{organization_id}`
243
+ */
244
+ parent: string;
245
+ /** Returns response with indentations and line breaks. */
246
+ prettyPrint?: boolean;
247
+ /** 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. */
248
+ quotaUser?: string;
249
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
250
+ upload_protocol?: string;
251
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
252
+ uploadType?: string;
253
+ },
254
+ body: GoogleCloudOrgpolicyV2Policy): Request<GoogleCloudOrgpolicyV2Policy>;
255
+ /** Deletes a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or Org Policy does not exist. */
256
+ delete(request?: {
257
+ /** V1 error format. */
258
+ "$.xgafv"?: string;
259
+ /** OAuth access token. */
260
+ access_token?: string;
261
+ /** Data format for response. */
262
+ alt?: string;
263
+ /** JSONP */
264
+ callback?: string;
265
+ /** Selector specifying which fields to include in a partial response. */
266
+ fields?: string;
267
+ /** 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. */
268
+ key?: string;
269
+ /** Required. Name of the policy to delete. See `Policy` for naming rules. */
270
+ name: string;
271
+ /** OAuth 2.0 token for the current user. */
272
+ oauth_token?: string;
273
+ /** Returns response with indentations and line breaks. */
274
+ prettyPrint?: boolean;
275
+ /** 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. */
276
+ quotaUser?: string;
277
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
278
+ upload_protocol?: string;
279
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
280
+ uploadType?: string;
281
+ }): Request<{}>;
282
+ /**
283
+ * Gets a `Policy` on a resource. If no `Policy` is set on the resource, NOT_FOUND is returned. The `etag` value can be used with `UpdatePolicy()` to update a `Policy` during
284
+ * read-modify-write.
285
+ */
286
+ get(request?: {
287
+ /** V1 error format. */
288
+ "$.xgafv"?: string;
289
+ /** OAuth access token. */
290
+ access_token?: string;
291
+ /** Data format for response. */
292
+ alt?: string;
293
+ /** JSONP */
294
+ callback?: string;
295
+ /** Selector specifying which fields to include in a partial response. */
296
+ fields?: string;
297
+ /** 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. */
298
+ key?: string;
299
+ /** Required. Resource name of the policy. See `Policy` for naming requirements. */
300
+ name: string;
301
+ /** OAuth 2.0 token for the current user. */
302
+ oauth_token?: string;
303
+ /** Returns response with indentations and line breaks. */
304
+ prettyPrint?: boolean;
305
+ /** 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. */
306
+ quotaUser?: string;
307
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
308
+ upload_protocol?: string;
309
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
310
+ uploadType?: string;
311
+ }): Request<GoogleCloudOrgpolicyV2Policy>;
312
+ /**
313
+ * Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy and evaluating conditions. The returned `Policy` will not have an
314
+ * `etag` or `condition` set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.
315
+ */
316
+ getEffectivePolicy(request?: {
317
+ /** V1 error format. */
318
+ "$.xgafv"?: string;
319
+ /** OAuth access token. */
320
+ access_token?: string;
321
+ /** Data format for response. */
322
+ alt?: string;
323
+ /** JSONP */
324
+ callback?: string;
325
+ /** Selector specifying which fields to include in a partial response. */
326
+ fields?: string;
327
+ /** 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. */
328
+ key?: string;
329
+ /** Required. The effective policy to compute. See `Policy` for naming rules. */
330
+ name: string;
331
+ /** OAuth 2.0 token for the current user. */
332
+ oauth_token?: string;
333
+ /** Returns response with indentations and line breaks. */
334
+ prettyPrint?: boolean;
335
+ /** 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. */
336
+ quotaUser?: string;
337
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
338
+ upload_protocol?: string;
339
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
340
+ uploadType?: string;
341
+ }): Request<GoogleCloudOrgpolicyV2Policy>;
342
+ /** Retrieves all of the `Policies` that exist on a particular resource. */
343
+ list(request?: {
344
+ /** V1 error format. */
345
+ "$.xgafv"?: string;
346
+ /** OAuth access token. */
347
+ access_token?: string;
348
+ /** Data format for response. */
349
+ alt?: string;
350
+ /** JSONP */
351
+ callback?: string;
352
+ /** Selector specifying which fields to include in a partial response. */
353
+ fields?: string;
354
+ /** 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. */
355
+ key?: string;
356
+ /** OAuth 2.0 token for the current user. */
357
+ oauth_token?: string;
358
+ /** Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. */
359
+ pageSize?: number;
360
+ /** Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. */
361
+ pageToken?: string;
362
+ /**
363
+ * Required. The target Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: *
364
+ * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`
365
+ */
366
+ parent: string;
367
+ /** Returns response with indentations and line breaks. */
368
+ prettyPrint?: boolean;
369
+ /** 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. */
370
+ quotaUser?: string;
371
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
372
+ upload_protocol?: string;
373
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
374
+ uploadType?: string;
375
+ }): Request<GoogleCloudOrgpolicyV2ListPoliciesResponse>;
376
+ /**
377
+ * Updates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with
378
+ * `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.
379
+ */
380
+ patch(request: {
381
+ /** V1 error format. */
382
+ "$.xgafv"?: string;
383
+ /** OAuth access token. */
384
+ access_token?: string;
385
+ /** Data format for response. */
386
+ alt?: string;
387
+ /** JSONP */
388
+ callback?: string;
389
+ /** Selector specifying which fields to include in a partial response. */
390
+ fields?: string;
391
+ /** 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. */
392
+ key?: string;
393
+ /**
394
+ * Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: *
395
+ * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For
396
+ * example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but
397
+ * responses will return the name using the equivalent project number.
398
+ */
399
+ name: string;
400
+ /** OAuth 2.0 token for the current user. */
401
+ oauth_token?: string;
402
+ /** Returns response with indentations and line breaks. */
403
+ prettyPrint?: boolean;
404
+ /** 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. */
405
+ quotaUser?: string;
406
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
407
+ upload_protocol?: string;
408
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
409
+ uploadType?: string;
410
+ /** Request body */
411
+ resource: GoogleCloudOrgpolicyV2Policy;
412
+ }): Request<GoogleCloudOrgpolicyV2Policy>;
413
+ patch(request: {
414
+ /** V1 error format. */
415
+ "$.xgafv"?: string;
416
+ /** OAuth access token. */
417
+ access_token?: string;
418
+ /** Data format for response. */
419
+ alt?: string;
420
+ /** JSONP */
421
+ callback?: string;
422
+ /** Selector specifying which fields to include in a partial response. */
423
+ fields?: string;
424
+ /** 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. */
425
+ key?: string;
426
+ /**
427
+ * Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: *
428
+ * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For
429
+ * example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but
430
+ * responses will return the name using the equivalent project number.
431
+ */
432
+ name: string;
433
+ /** OAuth 2.0 token for the current user. */
434
+ oauth_token?: string;
435
+ /** Returns response with indentations and line breaks. */
436
+ prettyPrint?: boolean;
437
+ /** 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. */
438
+ quotaUser?: string;
439
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
440
+ upload_protocol?: string;
441
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
442
+ uploadType?: string;
443
+ },
444
+ body: GoogleCloudOrgpolicyV2Policy): Request<GoogleCloudOrgpolicyV2Policy>;
445
+ }
446
+ interface FoldersResource {
447
+ constraints: ConstraintsResource;
448
+ policies: PoliciesResource;
449
+ }
450
+ interface ConstraintsResource {
451
+ /** Lists `Constraints` that could be applied on the specified resource. */
452
+ list(request?: {
453
+ /** V1 error format. */
454
+ "$.xgafv"?: string;
455
+ /** OAuth access token. */
456
+ access_token?: string;
457
+ /** Data format for response. */
458
+ alt?: string;
459
+ /** JSONP */
460
+ callback?: string;
461
+ /** Selector specifying which fields to include in a partial response. */
462
+ fields?: string;
463
+ /** 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. */
464
+ key?: string;
465
+ /** OAuth 2.0 token for the current user. */
466
+ oauth_token?: string;
467
+ /** Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. */
468
+ pageSize?: number;
469
+ /** Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. */
470
+ pageToken?: string;
471
+ /**
472
+ * Required. The Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}`
473
+ * * `organizations/{organization_id}`
474
+ */
475
+ parent: string;
476
+ /** Returns response with indentations and line breaks. */
477
+ prettyPrint?: boolean;
478
+ /** 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. */
479
+ quotaUser?: string;
480
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
481
+ upload_protocol?: string;
482
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
483
+ uploadType?: string;
484
+ }): Request<GoogleCloudOrgpolicyV2ListConstraintsResponse>;
485
+ }
486
+ interface PoliciesResource {
487
+ /**
488
+ * Creates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with
489
+ * `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Cloud resource.
490
+ */
491
+ create(request: {
492
+ /** V1 error format. */
493
+ "$.xgafv"?: string;
494
+ /** OAuth access token. */
495
+ access_token?: string;
496
+ /** Data format for response. */
497
+ alt?: string;
498
+ /** JSONP */
499
+ callback?: string;
500
+ /** Selector specifying which fields to include in a partial response. */
501
+ fields?: string;
502
+ /** 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. */
503
+ key?: string;
504
+ /** OAuth 2.0 token for the current user. */
505
+ oauth_token?: string;
506
+ /**
507
+ * Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` *
508
+ * `folders/{folder_id}` * `organizations/{organization_id}`
509
+ */
510
+ parent: string;
511
+ /** Returns response with indentations and line breaks. */
512
+ prettyPrint?: boolean;
513
+ /** 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. */
514
+ quotaUser?: string;
515
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
516
+ upload_protocol?: string;
517
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
518
+ uploadType?: string;
519
+ /** Request body */
520
+ resource: GoogleCloudOrgpolicyV2Policy;
521
+ }): Request<GoogleCloudOrgpolicyV2Policy>;
522
+ create(request: {
523
+ /** V1 error format. */
524
+ "$.xgafv"?: string;
525
+ /** OAuth access token. */
526
+ access_token?: string;
527
+ /** Data format for response. */
528
+ alt?: string;
529
+ /** JSONP */
530
+ callback?: string;
531
+ /** Selector specifying which fields to include in a partial response. */
532
+ fields?: string;
533
+ /** 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. */
534
+ key?: string;
535
+ /** OAuth 2.0 token for the current user. */
536
+ oauth_token?: string;
537
+ /**
538
+ * Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` *
539
+ * `folders/{folder_id}` * `organizations/{organization_id}`
540
+ */
541
+ parent: string;
542
+ /** Returns response with indentations and line breaks. */
543
+ prettyPrint?: boolean;
544
+ /** 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. */
545
+ quotaUser?: string;
546
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
547
+ upload_protocol?: string;
548
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
549
+ uploadType?: string;
550
+ },
551
+ body: GoogleCloudOrgpolicyV2Policy): Request<GoogleCloudOrgpolicyV2Policy>;
552
+ /** Deletes a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or Org Policy does not exist. */
553
+ delete(request?: {
554
+ /** V1 error format. */
555
+ "$.xgafv"?: string;
556
+ /** OAuth access token. */
557
+ access_token?: string;
558
+ /** Data format for response. */
559
+ alt?: string;
560
+ /** JSONP */
561
+ callback?: string;
562
+ /** Selector specifying which fields to include in a partial response. */
563
+ fields?: string;
564
+ /** 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. */
565
+ key?: string;
566
+ /** Required. Name of the policy to delete. See `Policy` for naming rules. */
567
+ name: string;
568
+ /** OAuth 2.0 token for the current user. */
569
+ oauth_token?: string;
570
+ /** Returns response with indentations and line breaks. */
571
+ prettyPrint?: boolean;
572
+ /** 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. */
573
+ quotaUser?: string;
574
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
575
+ upload_protocol?: string;
576
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
577
+ uploadType?: string;
578
+ }): Request<{}>;
579
+ /**
580
+ * Gets a `Policy` on a resource. If no `Policy` is set on the resource, NOT_FOUND is returned. The `etag` value can be used with `UpdatePolicy()` to update a `Policy` during
581
+ * read-modify-write.
582
+ */
583
+ get(request?: {
584
+ /** V1 error format. */
585
+ "$.xgafv"?: string;
586
+ /** OAuth access token. */
587
+ access_token?: string;
588
+ /** Data format for response. */
589
+ alt?: string;
590
+ /** JSONP */
591
+ callback?: string;
592
+ /** Selector specifying which fields to include in a partial response. */
593
+ fields?: string;
594
+ /** 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. */
595
+ key?: string;
596
+ /** Required. Resource name of the policy. See `Policy` for naming requirements. */
597
+ name: string;
598
+ /** OAuth 2.0 token for the current user. */
599
+ oauth_token?: string;
600
+ /** Returns response with indentations and line breaks. */
601
+ prettyPrint?: boolean;
602
+ /** 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. */
603
+ quotaUser?: string;
604
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
605
+ upload_protocol?: string;
606
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
607
+ uploadType?: string;
608
+ }): Request<GoogleCloudOrgpolicyV2Policy>;
609
+ /**
610
+ * Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy and evaluating conditions. The returned `Policy` will not have an
611
+ * `etag` or `condition` set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.
612
+ */
613
+ getEffectivePolicy(request?: {
614
+ /** V1 error format. */
615
+ "$.xgafv"?: string;
616
+ /** OAuth access token. */
617
+ access_token?: string;
618
+ /** Data format for response. */
619
+ alt?: string;
620
+ /** JSONP */
621
+ callback?: string;
622
+ /** Selector specifying which fields to include in a partial response. */
623
+ fields?: string;
624
+ /** 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. */
625
+ key?: string;
626
+ /** Required. The effective policy to compute. See `Policy` for naming rules. */
627
+ name: string;
628
+ /** OAuth 2.0 token for the current user. */
629
+ oauth_token?: string;
630
+ /** Returns response with indentations and line breaks. */
631
+ prettyPrint?: boolean;
632
+ /** 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. */
633
+ quotaUser?: string;
634
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
635
+ upload_protocol?: string;
636
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
637
+ uploadType?: string;
638
+ }): Request<GoogleCloudOrgpolicyV2Policy>;
639
+ /** Retrieves all of the `Policies` that exist on a particular resource. */
640
+ list(request?: {
641
+ /** V1 error format. */
642
+ "$.xgafv"?: string;
643
+ /** OAuth access token. */
644
+ access_token?: string;
645
+ /** Data format for response. */
646
+ alt?: string;
647
+ /** JSONP */
648
+ callback?: string;
649
+ /** Selector specifying which fields to include in a partial response. */
650
+ fields?: string;
651
+ /** 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. */
652
+ key?: string;
653
+ /** OAuth 2.0 token for the current user. */
654
+ oauth_token?: string;
655
+ /** Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. */
656
+ pageSize?: number;
657
+ /** Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. */
658
+ pageToken?: string;
659
+ /**
660
+ * Required. The target Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: *
661
+ * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`
662
+ */
663
+ parent: string;
664
+ /** Returns response with indentations and line breaks. */
665
+ prettyPrint?: boolean;
666
+ /** 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. */
667
+ quotaUser?: string;
668
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
669
+ upload_protocol?: string;
670
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
671
+ uploadType?: string;
672
+ }): Request<GoogleCloudOrgpolicyV2ListPoliciesResponse>;
673
+ /**
674
+ * Updates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with
675
+ * `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.
676
+ */
677
+ patch(request: {
678
+ /** V1 error format. */
679
+ "$.xgafv"?: string;
680
+ /** OAuth access token. */
681
+ access_token?: string;
682
+ /** Data format for response. */
683
+ alt?: string;
684
+ /** JSONP */
685
+ callback?: string;
686
+ /** Selector specifying which fields to include in a partial response. */
687
+ fields?: string;
688
+ /** 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. */
689
+ key?: string;
690
+ /**
691
+ * Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: *
692
+ * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For
693
+ * example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but
694
+ * responses will return the name using the equivalent project number.
695
+ */
696
+ name: string;
697
+ /** OAuth 2.0 token for the current user. */
698
+ oauth_token?: string;
699
+ /** Returns response with indentations and line breaks. */
700
+ prettyPrint?: boolean;
701
+ /** 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. */
702
+ quotaUser?: string;
703
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
704
+ upload_protocol?: string;
705
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
706
+ uploadType?: string;
707
+ /** Request body */
708
+ resource: GoogleCloudOrgpolicyV2Policy;
709
+ }): Request<GoogleCloudOrgpolicyV2Policy>;
710
+ patch(request: {
711
+ /** V1 error format. */
712
+ "$.xgafv"?: string;
713
+ /** OAuth access token. */
714
+ access_token?: string;
715
+ /** Data format for response. */
716
+ alt?: string;
717
+ /** JSONP */
718
+ callback?: string;
719
+ /** Selector specifying which fields to include in a partial response. */
720
+ fields?: string;
721
+ /** 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. */
722
+ key?: string;
723
+ /**
724
+ * Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: *
725
+ * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For
726
+ * example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but
727
+ * responses will return the name using the equivalent project number.
728
+ */
729
+ name: string;
730
+ /** OAuth 2.0 token for the current user. */
731
+ oauth_token?: string;
732
+ /** Returns response with indentations and line breaks. */
733
+ prettyPrint?: boolean;
734
+ /** 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. */
735
+ quotaUser?: string;
736
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
737
+ upload_protocol?: string;
738
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
739
+ uploadType?: string;
740
+ },
741
+ body: GoogleCloudOrgpolicyV2Policy): Request<GoogleCloudOrgpolicyV2Policy>;
742
+ }
743
+ interface OrganizationsResource {
744
+ constraints: ConstraintsResource;
745
+ policies: PoliciesResource;
746
+ }
747
+ interface ConstraintsResource {
748
+ /** Lists `Constraints` that could be applied on the specified resource. */
749
+ list(request?: {
750
+ /** V1 error format. */
751
+ "$.xgafv"?: string;
752
+ /** OAuth access token. */
753
+ access_token?: string;
754
+ /** Data format for response. */
755
+ alt?: string;
756
+ /** JSONP */
757
+ callback?: string;
758
+ /** Selector specifying which fields to include in a partial response. */
759
+ fields?: string;
760
+ /** 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. */
761
+ key?: string;
762
+ /** OAuth 2.0 token for the current user. */
763
+ oauth_token?: string;
764
+ /** Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. */
765
+ pageSize?: number;
766
+ /** Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. */
767
+ pageToken?: string;
768
+ /**
769
+ * Required. The Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}`
770
+ * * `organizations/{organization_id}`
771
+ */
772
+ parent: string;
773
+ /** Returns response with indentations and line breaks. */
774
+ prettyPrint?: boolean;
775
+ /** 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. */
776
+ quotaUser?: string;
777
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
778
+ upload_protocol?: string;
779
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
780
+ uploadType?: string;
781
+ }): Request<GoogleCloudOrgpolicyV2ListConstraintsResponse>;
782
+ }
783
+ interface PoliciesResource {
784
+ /**
785
+ * Creates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with
786
+ * `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Cloud resource.
787
+ */
788
+ create(request: {
789
+ /** V1 error format. */
790
+ "$.xgafv"?: string;
791
+ /** OAuth access token. */
792
+ access_token?: string;
793
+ /** Data format for response. */
794
+ alt?: string;
795
+ /** JSONP */
796
+ callback?: string;
797
+ /** Selector specifying which fields to include in a partial response. */
798
+ fields?: string;
799
+ /** 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. */
800
+ key?: string;
801
+ /** OAuth 2.0 token for the current user. */
802
+ oauth_token?: string;
803
+ /**
804
+ * Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` *
805
+ * `folders/{folder_id}` * `organizations/{organization_id}`
806
+ */
807
+ parent: string;
808
+ /** Returns response with indentations and line breaks. */
809
+ prettyPrint?: boolean;
810
+ /** 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. */
811
+ quotaUser?: string;
812
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
813
+ upload_protocol?: string;
814
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
815
+ uploadType?: string;
816
+ /** Request body */
817
+ resource: GoogleCloudOrgpolicyV2Policy;
818
+ }): Request<GoogleCloudOrgpolicyV2Policy>;
819
+ create(request: {
820
+ /** V1 error format. */
821
+ "$.xgafv"?: string;
822
+ /** OAuth access token. */
823
+ access_token?: string;
824
+ /** Data format for response. */
825
+ alt?: string;
826
+ /** JSONP */
827
+ callback?: string;
828
+ /** Selector specifying which fields to include in a partial response. */
829
+ fields?: string;
830
+ /** 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. */
831
+ key?: string;
832
+ /** OAuth 2.0 token for the current user. */
833
+ oauth_token?: string;
834
+ /**
835
+ * Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` *
836
+ * `folders/{folder_id}` * `organizations/{organization_id}`
837
+ */
838
+ parent: string;
839
+ /** Returns response with indentations and line breaks. */
840
+ prettyPrint?: boolean;
841
+ /** 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. */
842
+ quotaUser?: string;
843
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
844
+ upload_protocol?: string;
845
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
846
+ uploadType?: string;
847
+ },
848
+ body: GoogleCloudOrgpolicyV2Policy): Request<GoogleCloudOrgpolicyV2Policy>;
849
+ /** Deletes a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or Org Policy does not exist. */
850
+ delete(request?: {
851
+ /** V1 error format. */
852
+ "$.xgafv"?: string;
853
+ /** OAuth access token. */
854
+ access_token?: string;
855
+ /** Data format for response. */
856
+ alt?: string;
857
+ /** JSONP */
858
+ callback?: string;
859
+ /** Selector specifying which fields to include in a partial response. */
860
+ fields?: string;
861
+ /** 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. */
862
+ key?: string;
863
+ /** Required. Name of the policy to delete. See `Policy` for naming rules. */
864
+ name: string;
865
+ /** OAuth 2.0 token for the current user. */
866
+ oauth_token?: string;
867
+ /** Returns response with indentations and line breaks. */
868
+ prettyPrint?: boolean;
869
+ /** 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. */
870
+ quotaUser?: string;
871
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
872
+ upload_protocol?: string;
873
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
874
+ uploadType?: string;
875
+ }): Request<{}>;
876
+ /**
877
+ * Gets a `Policy` on a resource. If no `Policy` is set on the resource, NOT_FOUND is returned. The `etag` value can be used with `UpdatePolicy()` to update a `Policy` during
878
+ * read-modify-write.
879
+ */
880
+ get(request?: {
881
+ /** V1 error format. */
882
+ "$.xgafv"?: string;
883
+ /** OAuth access token. */
884
+ access_token?: string;
885
+ /** Data format for response. */
886
+ alt?: string;
887
+ /** JSONP */
888
+ callback?: string;
889
+ /** Selector specifying which fields to include in a partial response. */
890
+ fields?: string;
891
+ /** 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. */
892
+ key?: string;
893
+ /** Required. Resource name of the policy. See `Policy` for naming requirements. */
894
+ name: string;
895
+ /** OAuth 2.0 token for the current user. */
896
+ oauth_token?: string;
897
+ /** Returns response with indentations and line breaks. */
898
+ prettyPrint?: boolean;
899
+ /** 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. */
900
+ quotaUser?: string;
901
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
902
+ upload_protocol?: string;
903
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
904
+ uploadType?: string;
905
+ }): Request<GoogleCloudOrgpolicyV2Policy>;
906
+ /**
907
+ * Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy and evaluating conditions. The returned `Policy` will not have an
908
+ * `etag` or `condition` set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.
909
+ */
910
+ getEffectivePolicy(request?: {
911
+ /** V1 error format. */
912
+ "$.xgafv"?: string;
913
+ /** OAuth access token. */
914
+ access_token?: string;
915
+ /** Data format for response. */
916
+ alt?: string;
917
+ /** JSONP */
918
+ callback?: string;
919
+ /** Selector specifying which fields to include in a partial response. */
920
+ fields?: string;
921
+ /** 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. */
922
+ key?: string;
923
+ /** Required. The effective policy to compute. See `Policy` for naming rules. */
924
+ name: string;
925
+ /** OAuth 2.0 token for the current user. */
926
+ oauth_token?: string;
927
+ /** Returns response with indentations and line breaks. */
928
+ prettyPrint?: boolean;
929
+ /** 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. */
930
+ quotaUser?: string;
931
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
932
+ upload_protocol?: string;
933
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
934
+ uploadType?: string;
935
+ }): Request<GoogleCloudOrgpolicyV2Policy>;
936
+ /** Retrieves all of the `Policies` that exist on a particular resource. */
937
+ list(request?: {
938
+ /** V1 error format. */
939
+ "$.xgafv"?: string;
940
+ /** OAuth access token. */
941
+ access_token?: string;
942
+ /** Data format for response. */
943
+ alt?: string;
944
+ /** JSONP */
945
+ callback?: string;
946
+ /** Selector specifying which fields to include in a partial response. */
947
+ fields?: string;
948
+ /** 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. */
949
+ key?: string;
950
+ /** OAuth 2.0 token for the current user. */
951
+ oauth_token?: string;
952
+ /** Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. */
953
+ pageSize?: number;
954
+ /** Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. */
955
+ pageToken?: string;
956
+ /**
957
+ * Required. The target Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: *
958
+ * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`
959
+ */
960
+ parent: string;
961
+ /** Returns response with indentations and line breaks. */
962
+ prettyPrint?: boolean;
963
+ /** 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. */
964
+ quotaUser?: string;
965
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
966
+ upload_protocol?: string;
967
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
968
+ uploadType?: string;
969
+ }): Request<GoogleCloudOrgpolicyV2ListPoliciesResponse>;
970
+ /**
971
+ * Updates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with
972
+ * `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.
973
+ */
974
+ patch(request: {
975
+ /** V1 error format. */
976
+ "$.xgafv"?: string;
977
+ /** OAuth access token. */
978
+ access_token?: string;
979
+ /** Data format for response. */
980
+ alt?: string;
981
+ /** JSONP */
982
+ callback?: string;
983
+ /** Selector specifying which fields to include in a partial response. */
984
+ fields?: string;
985
+ /** 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. */
986
+ key?: string;
987
+ /**
988
+ * Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: *
989
+ * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For
990
+ * example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but
991
+ * responses will return the name using the equivalent project number.
992
+ */
993
+ name: string;
994
+ /** OAuth 2.0 token for the current user. */
995
+ oauth_token?: string;
996
+ /** Returns response with indentations and line breaks. */
997
+ prettyPrint?: boolean;
998
+ /** 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. */
999
+ quotaUser?: string;
1000
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1001
+ upload_protocol?: string;
1002
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1003
+ uploadType?: string;
1004
+ /** Request body */
1005
+ resource: GoogleCloudOrgpolicyV2Policy;
1006
+ }): Request<GoogleCloudOrgpolicyV2Policy>;
1007
+ patch(request: {
1008
+ /** V1 error format. */
1009
+ "$.xgafv"?: string;
1010
+ /** OAuth access token. */
1011
+ access_token?: string;
1012
+ /** Data format for response. */
1013
+ alt?: string;
1014
+ /** JSONP */
1015
+ callback?: string;
1016
+ /** Selector specifying which fields to include in a partial response. */
1017
+ fields?: string;
1018
+ /** 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. */
1019
+ key?: string;
1020
+ /**
1021
+ * Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: *
1022
+ * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For
1023
+ * example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but
1024
+ * responses will return the name using the equivalent project number.
1025
+ */
1026
+ name: string;
1027
+ /** OAuth 2.0 token for the current user. */
1028
+ oauth_token?: string;
1029
+ /** Returns response with indentations and line breaks. */
1030
+ prettyPrint?: boolean;
1031
+ /** 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. */
1032
+ quotaUser?: string;
1033
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1034
+ upload_protocol?: string;
1035
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1036
+ uploadType?: string;
1037
+ },
1038
+ body: GoogleCloudOrgpolicyV2Policy): Request<GoogleCloudOrgpolicyV2Policy>;
1039
+ }
1040
+ interface ProjectsResource {
1041
+ constraints: ConstraintsResource;
1042
+ policies: PoliciesResource;
1043
+ }
1044
+
1045
+ const folders: FoldersResource;
1046
+
1047
+ const organizations: OrganizationsResource;
1048
+
1049
+ const projects: ProjectsResource;
1050
+ }
1051
+ }