@maxim_mazurok/gapi.client.cloudasset-v1p7beta1 0.0.20220805

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,776 @@
1
+ /* Type definitions for non-npm package Cloud Asset API v1p7beta1 0.0 */
2
+ // Project: https://cloud.google.com/asset-inventory/docs/quickstart
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://cloudasset.googleapis.com/$discovery/rest?version=v1p7beta1
13
+ // Revision: 20220805
14
+
15
+ /// <reference types="gapi.client" />
16
+
17
+ declare namespace gapi.client {
18
+ /** Load Cloud Asset API v1p7beta1 */
19
+ function load(urlOrObject: "https://cloudasset.googleapis.com/$discovery/rest?version=v1p7beta1"): Promise<void>;
20
+ /** @deprecated Please load APIs with discovery documents. */
21
+ function load(name: "cloudasset", version: "v1p7beta1"): Promise<void>;
22
+ /** @deprecated Please load APIs with discovery documents. */
23
+ function load(name: "cloudasset", version: "v1p7beta1", callback: () => any): void;
24
+
25
+ namespace cloudasset {
26
+ interface AnalyzeIamPolicyLongrunningMetadata {
27
+ /** Output only. The time the operation was created. */
28
+ createTime?: string;
29
+ }
30
+ // tslint:disable-next-line:no-empty-interface
31
+ interface AnalyzeIamPolicyLongrunningResponse {
32
+ }
33
+ interface AuditConfig {
34
+ /** The configuration for logging of each type of permission. */
35
+ auditLogConfigs?: AuditLogConfig[];
36
+ /**
37
+ * Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all
38
+ * services.
39
+ */
40
+ service?: string;
41
+ }
42
+ interface AuditLogConfig {
43
+ /** Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. */
44
+ exemptedMembers?: string[];
45
+ /** The log type that this config enables. */
46
+ logType?: string;
47
+ }
48
+ interface Binding {
49
+ /**
50
+ * The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`,
51
+ * then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which
52
+ * resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
53
+ */
54
+ condition?: Expr;
55
+ /**
56
+ * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on
57
+ * the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service
58
+ * account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
59
+ * represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier
60
+ * for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example,
61
+ * `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. *
62
+ * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example,
63
+ * `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. *
64
+ * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example,
65
+ * `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service
66
+ * account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently
67
+ * deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in
68
+ * the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
69
+ */
70
+ members?: string[];
71
+ /** Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. */
72
+ role?: string;
73
+ }
74
+ interface Expr {
75
+ /** Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. */
76
+ description?: string;
77
+ /** Textual representation of an expression in Common Expression Language syntax. */
78
+ expression?: string;
79
+ /** Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. */
80
+ location?: string;
81
+ /** 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. */
82
+ title?: string;
83
+ }
84
+ interface GoogleCloudAssetV1p7beta1Asset {
85
+ /** Please also refer to the [access level user guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels). */
86
+ accessLevel?: GoogleIdentityAccesscontextmanagerV1AccessLevel;
87
+ /** Please also refer to the [access policy user guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies). */
88
+ accessPolicy?: GoogleIdentityAccesscontextmanagerV1AccessPolicy;
89
+ /**
90
+ * The ancestry path of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of
91
+ * relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. If the asset is a project, folder, or organization, the ancestry path
92
+ * starts from the asset itself. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
93
+ */
94
+ ancestors?: string[];
95
+ /** The type of the asset. Example: `compute.googleapis.com/Disk` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information. */
96
+ assetType?: string;
97
+ /**
98
+ * A representation of the Cloud IAM policy set on a Google Cloud resource. There can be a maximum of one Cloud IAM policy set on any given resource. In addition, Cloud IAM policies
99
+ * inherit their granted access scope from any policies set on parent resources in the resource hierarchy. Therefore, the effectively policy is the union of both the policy set on this
100
+ * resource and each policy set on all of the resource's ancestry resource levels in the hierarchy. See [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance) for
101
+ * more information.
102
+ */
103
+ iamPolicy?: Policy;
104
+ /**
105
+ * The full name of the asset. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` See [Resource
106
+ * names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.
107
+ */
108
+ name?: string;
109
+ /**
110
+ * A representation of an [organization policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy). There can be more than one
111
+ * organization policy with different constraints set on a given resource.
112
+ */
113
+ orgPolicy?: GoogleCloudOrgpolicyV1Policy[];
114
+ /** The related assets of the asset of one relationship type. One asset only represents one type of relationship. */
115
+ relatedAssets?: GoogleCloudAssetV1p7beta1RelatedAssets;
116
+ /** A representation of the resource. */
117
+ resource?: GoogleCloudAssetV1p7beta1Resource;
118
+ /** Please also refer to the [service perimeter user guide](https://cloud.google.com/vpc-service-controls/docs/overview). */
119
+ servicePerimeter?: GoogleIdentityAccesscontextmanagerV1ServicePerimeter;
120
+ /** The last update timestamp of an asset. update_time is updated when create/update/delete operation is performed. */
121
+ updateTime?: string;
122
+ }
123
+ interface GoogleCloudAssetV1p7beta1BigQueryDestination {
124
+ /**
125
+ * Required. The BigQuery dataset in format "projects/projectId/datasets/datasetId", to which the snapshot result should be exported. If this dataset does not exist, the export call
126
+ * returns an INVALID_ARGUMENT error.
127
+ */
128
+ dataset?: string;
129
+ /**
130
+ * If the destination table already exists and this flag is `TRUE`, the table will be overwritten by the contents of assets snapshot. If the flag is `FALSE` or unset and the
131
+ * destination table already exists, the export call returns an INVALID_ARGUMEMT error.
132
+ */
133
+ force?: boolean;
134
+ /**
135
+ * [partition_spec] determines whether to export to partitioned table(s) and how to partition the data. If [partition_spec] is unset or [partition_spec.partition_key] is unset or
136
+ * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to non-partitioned table(s). [force] will decide whether to overwrite existing table(s). If [partition_spec] is
137
+ * specified. First, the snapshot results will be written to partitioned table(s) with two additional timestamp columns, readTime and requestTime, one of which will be the partition
138
+ * key. Secondly, in the case when any destination table already exists, it will first try to update existing table's schema as necessary by appending additional columns. Then, if
139
+ * [force] is `TRUE`, the corresponding partition will be overwritten by the snapshot results (data in different partitions will remain intact); if [force] is unset or `FALSE`, it will
140
+ * append the data. An error will be returned if the schema update or data appension fails.
141
+ */
142
+ partitionSpec?: GoogleCloudAssetV1p7beta1PartitionSpec;
143
+ /**
144
+ * If this flag is `TRUE`, the snapshot results will be written to one or multiple tables, each of which contains results of one asset type. The [force] and [partition_spec] fields
145
+ * will apply to each of them. Field [table] will be concatenated with "_" and the asset type names (see https://cloud.google.com/asset-inventory/docs/supported-asset-types for
146
+ * supported asset types) to construct per-asset-type table names, in which all non-alphanumeric characters like "." and "/" will be substituted by "_". Example: if field [table] is
147
+ * "mytable" and snapshot results contain "storage.googleapis.com/Bucket" assets, the corresponding table name will be "mytable_storage_googleapis_com_Bucket". If any of these tables
148
+ * does not exist, a new table with the concatenated name will be created. When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of each table will include
149
+ * RECORD-type columns mapped to the nested fields in the Asset.resource.data field of that asset type (up to the 15 nested level BigQuery supports
150
+ * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The fields in >15 nested levels will be stored in JSON format string as a child column of its parent RECORD
151
+ * column. If error occurs when exporting to any table, the whole export call will return an error but the export results that already succeed will persist. Example: if exporting to
152
+ * table_type_A succeeds when exporting to table_type_B fails during one export call, the results in table_type_A will persist and there will not be partial results persisting in a
153
+ * table.
154
+ */
155
+ separateTablesPerAssetType?: boolean;
156
+ /** Required. The BigQuery table to which the snapshot result should be written. If this table does not exist, a new table with the given name will be created. */
157
+ table?: string;
158
+ }
159
+ interface GoogleCloudAssetV1p7beta1ExportAssetsRequest {
160
+ /**
161
+ * A list of asset types to take a snapshot for. For example: "compute.googleapis.com/Disk". Regular expressions are also supported. For example: * "compute.googleapis.com.*" snapshots
162
+ * resources whose asset type starts with "compute.googleapis.com". * ".*Instance" snapshots resources whose asset type ends with "Instance". * ".*Instance.*" snapshots resources whose
163
+ * asset type contains "Instance". See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression syntax. If the regular expression does not match any
164
+ * supported asset type, an INVALID_ARGUMENT error will be returned. If specified, only matching assets will be returned, otherwise, it will snapshot all asset types. See [Introduction
165
+ * to Cloud Asset Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all supported asset types.
166
+ */
167
+ assetTypes?: string[];
168
+ /** Asset content type. If not specified, no content but the asset name will be returned. */
169
+ contentType?: string;
170
+ /** Required. Output configuration indicating where the results will be output to. */
171
+ outputConfig?: GoogleCloudAssetV1p7beta1OutputConfig;
172
+ /**
173
+ * Timestamp to take an asset snapshot. This can only be set to a timestamp between the current time and the current time minus 35 days (inclusive). If not specified, the current time
174
+ * will be used. Due to delays in resource data collection and indexing, there is a volatile window during which running the same query may get different results.
175
+ */
176
+ readTime?: string;
177
+ /**
178
+ * A list of relationship types to export, for example: `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if content_type=RELATIONSHIP. If specified, it will snapshot
179
+ * [asset_types]' specified relationships, or give errors if any relationship_types' supported types are not in [asset_types]. If not specified, it will snapshot all [asset_types]'
180
+ * supported relationships. An unspecified [asset_types] field means all supported asset_types. See [Introduction to Cloud Asset
181
+ * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all supported asset types and relationship types.
182
+ */
183
+ relationshipTypes?: string[];
184
+ }
185
+ interface GoogleCloudAssetV1p7beta1GcsDestination {
186
+ /**
187
+ * The uri of the Cloud Storage object. It's the same uri that is used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and Editing Object
188
+ * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) for more information.
189
+ */
190
+ uri?: string;
191
+ /**
192
+ * The uri prefix of all generated Cloud Storage objects. Example: "gs://bucket_name/object_name_prefix". Each object uri is in format:
193
+ * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only contains assets for that type. starts from 0. Example:
194
+ * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is the first shard of output objects containing all compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error
195
+ * will be returned if file with the same name "gs://bucket_name/object_name_prefix" already exists.
196
+ */
197
+ uriPrefix?: string;
198
+ }
199
+ interface GoogleCloudAssetV1p7beta1OutputConfig {
200
+ /** Destination on BigQuery. The output table stores the fields in asset proto as columns in BigQuery. */
201
+ bigqueryDestination?: GoogleCloudAssetV1p7beta1BigQueryDestination;
202
+ /** Destination on Cloud Storage. */
203
+ gcsDestination?: GoogleCloudAssetV1p7beta1GcsDestination;
204
+ }
205
+ interface GoogleCloudAssetV1p7beta1PartitionSpec {
206
+ /** The partition key for BigQuery partitioned table. */
207
+ partitionKey?: string;
208
+ }
209
+ interface GoogleCloudAssetV1p7beta1RelatedAsset {
210
+ /**
211
+ * The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative
212
+ * resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
213
+ */
214
+ ancestors?: string[];
215
+ /**
216
+ * The full name of the asset. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` See [Resource
217
+ * names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.
218
+ */
219
+ asset?: string;
220
+ /** The type of the asset. Example: `compute.googleapis.com/Disk` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information. */
221
+ assetType?: string;
222
+ }
223
+ interface GoogleCloudAssetV1p7beta1RelatedAssets {
224
+ /** The peer resources of the relationship. */
225
+ assets?: GoogleCloudAssetV1p7beta1RelatedAsset[];
226
+ /** The detailed relation attributes. */
227
+ relationshipAttributes?: GoogleCloudAssetV1p7beta1RelationshipAttributes;
228
+ }
229
+ interface GoogleCloudAssetV1p7beta1RelationshipAttributes {
230
+ /** The detail of the relationship, e.g. `contains`, `attaches` */
231
+ action?: string;
232
+ /** The source asset type. Example: `compute.googleapis.com/Instance` */
233
+ sourceResourceType?: string;
234
+ /** The target asset type. Example: `compute.googleapis.com/Disk` */
235
+ targetResourceType?: string;
236
+ /** The unique identifier of the relationship type. Example: `INSTANCE_TO_INSTANCEGROUP` */
237
+ type?: string;
238
+ }
239
+ interface GoogleCloudAssetV1p7beta1Resource {
240
+ /** The content of the resource, in which some sensitive fields are removed and may not be present. */
241
+ data?: { [P in string]: any };
242
+ /**
243
+ * The URL of the discovery document containing the resource's JSON schema. Example: `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest` This value is unspecified for
244
+ * resources that do not have an API based on a discovery document, such as Cloud Bigtable.
245
+ */
246
+ discoveryDocumentUri?: string;
247
+ /**
248
+ * The JSON schema name listed in the discovery document. Example: `Project` This value is unspecified for resources that do not have an API based on a discovery document, such as
249
+ * Cloud Bigtable.
250
+ */
251
+ discoveryName?: string;
252
+ /** The location of the resource in Google Cloud, such as its zone and region. For more information, see https://cloud.google.com/about/locations/. */
253
+ location?: string;
254
+ /**
255
+ * The full name of the immediate parent of this resource. See [Resource Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information. For Google
256
+ * Cloud assets, this value is the parent resource defined in the [Cloud IAM policy hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). Example:
257
+ * `//cloudresourcemanager.googleapis.com/projects/my_project_123` For third-party assets, this field may be set differently.
258
+ */
259
+ parent?: string;
260
+ /**
261
+ * The REST URL for accessing the resource. An HTTP `GET` request using this URL returns the resource itself. Example:
262
+ * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123` This value is unspecified for resources without a REST API.
263
+ */
264
+ resourceUrl?: string;
265
+ /** The API version. Example: `v1` */
266
+ version?: string;
267
+ }
268
+ interface GoogleCloudOrgpolicyV1BooleanPolicy {
269
+ /**
270
+ * If `true`, then the `Policy` is enforced. If `false`, then any configuration is acceptable. Suppose you have a `Constraint` `constraints/compute.disableSerialPortAccess` with
271
+ * `constraint_default` set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following behavior: - If the `Policy` at this resource has enforced set to `false`, serial port
272
+ * connection attempts will be allowed. - If the `Policy` at this resource has enforced set to `true`, serial port connection attempts will be refused. - If the `Policy` at this
273
+ * resource is `RestoreDefault`, serial port connection attempts will be allowed. - If no `Policy` is set at this resource or anywhere higher in the resource hierarchy, serial port
274
+ * connection attempts will be allowed. - If no `Policy` is set at this resource, but one exists higher in the resource hierarchy, the behavior is as if the`Policy` were set at this
275
+ * resource. The following examples demonstrate the different possible layerings: Example 1 (nearest `Constraint` wins): `organizations/foo` has a `Policy` with: {enforced: false}
276
+ * `projects/bar` has no `Policy` set. The constraint at `projects/bar` and `organizations/foo` will not be enforced. Example 2 (enforcement gets replaced): `organizations/foo` has a
277
+ * `Policy` with: {enforced: false} `projects/bar` has a `Policy` with: {enforced: true} The constraint at `organizations/foo` is not enforced. The constraint at `projects/bar` is
278
+ * enforced. Example 3 (RestoreDefault): `organizations/foo` has a `Policy` with: {enforced: true} `projects/bar` has a `Policy` with: {RestoreDefault: {}} The constraint at
279
+ * `organizations/foo` is enforced. The constraint at `projects/bar` is not enforced, because `constraint_default` for the `Constraint` is `ALLOW`.
280
+ */
281
+ enforced?: boolean;
282
+ }
283
+ interface GoogleCloudOrgpolicyV1ListPolicy {
284
+ /** List of values allowed at this resource. Can only be set if `all_values` is set to `ALL_VALUES_UNSPECIFIED`. */
285
+ allowedValues?: string[];
286
+ /** The policy all_values state. */
287
+ allValues?: string;
288
+ /** List of values denied at this resource. Can only be set if `all_values` is set to `ALL_VALUES_UNSPECIFIED`. */
289
+ deniedValues?: string[];
290
+ /**
291
+ * Determines the inheritance behavior for this `Policy`. By default, a `ListPolicy` set at a resource supersedes any `Policy` set anywhere up the resource hierarchy. However, if
292
+ * `inherit_from_parent` is set to `true`, then the values from the effective `Policy` of the parent resource are inherited, meaning the values set in this `Policy` are added to the
293
+ * values inherited up the hierarchy. Setting `Policy` hierarchies that inherit both allowed values and denied values isn't recommended in most circumstances to keep the configuration
294
+ * simple and understandable. However, it is possible to set a `Policy` with `allowed_values` set that inherits a `Policy` with `denied_values` set. In this case, the values that are
295
+ * allowed must be in `allowed_values` and not present in `denied_values`. For example, suppose you have a `Constraint` `constraints/serviceuser.services`, which has a
296
+ * `constraint_type` of `list_constraint`, and with `constraint_default` set to `ALLOW`. Suppose that at the Organization level, a `Policy` is applied that restricts the allowed API
297
+ * activations to {`E1`, `E2`}. Then, if a `Policy` is applied to a project below the Organization that has `inherit_from_parent` set to `false` and field all_values set to DENY, then
298
+ * an attempt to activate any API will be denied. The following examples demonstrate different possible layerings for `projects/bar` parented by `organizations/foo`: Example 1 (no
299
+ * inherited values): `organizations/foo` has a `Policy` with values: {allowed_values: "E1" allowed_values:"E2"} `projects/bar` has `inherit_from_parent` `false` and values:
300
+ * {allowed_values: "E3" allowed_values: "E4"} The accepted values at `organizations/foo` are `E1`, `E2`. The accepted values at `projects/bar` are `E3`, and `E4`. Example 2 (inherited
301
+ * values): `organizations/foo` has a `Policy` with values: {allowed_values: "E1" allowed_values:"E2"} `projects/bar` has a `Policy` with values: {value: "E3" value: "E4"
302
+ * inherit_from_parent: true} The accepted values at `organizations/foo` are `E1`, `E2`. The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`. Example 3 (inheriting
303
+ * both allowed and denied values): `organizations/foo` has a `Policy` with values: {allowed_values: "E1" allowed_values: "E2"} `projects/bar` has a `Policy` with: {denied_values:
304
+ * "E1"} The accepted values at `organizations/foo` are `E1`, `E2`. The value accepted at `projects/bar` is `E2`. Example 4 (RestoreDefault): `organizations/foo` has a `Policy` with
305
+ * values: {allowed_values: "E1" allowed_values:"E2"} `projects/bar` has a `Policy` with values: {RestoreDefault: {}} The accepted values at `organizations/foo` are `E1`, `E2`. The
306
+ * accepted values at `projects/bar` are either all or none depending on the value of `constraint_default` (if `ALLOW`, all; if `DENY`, none). Example 5 (no policy inherits parent
307
+ * policy): `organizations/foo` has no `Policy` set. `projects/bar` has no `Policy` set. The accepted values at both levels are either all or none depending on the value of
308
+ * `constraint_default` (if `ALLOW`, all; if `DENY`, none). Example 6 (ListConstraint allowing all): `organizations/foo` has a `Policy` with values: {allowed_values: "E1"
309
+ * allowed_values: "E2"} `projects/bar` has a `Policy` with: {all: ALLOW} The accepted values at `organizations/foo` are `E1`, E2`. Any value is accepted at `projects/bar`. Example 7
310
+ * (ListConstraint allowing none): `organizations/foo` has a `Policy` with values: {allowed_values: "E1" allowed_values: "E2"} `projects/bar` has a `Policy` with: {all: DENY} The
311
+ * accepted values at `organizations/foo` are `E1`, E2`. No value is accepted at `projects/bar`. Example 10 (allowed and denied subtrees of Resource Manager hierarchy): Given the
312
+ * following resource hierarchy O1->{F1, F2}; F1->{P1}; F2->{P2, P3}, `organizations/foo` has a `Policy` with values: {allowed_values: "under:organizations/O1"} `projects/bar` has a
313
+ * `Policy` with: {allowed_values: "under:projects/P3"} {denied_values: "under:folders/F2"} The accepted values at `organizations/foo` are `organizations/O1`, `folders/F1`,
314
+ * `folders/F2`, `projects/P1`, `projects/P2`, `projects/P3`. The accepted values at `projects/bar` are `organizations/O1`, `folders/F1`, `projects/P1`.
315
+ */
316
+ inheritFromParent?: boolean;
317
+ /**
318
+ * Optional. The Google Cloud Console will try to default to a configuration that matches the value specified in this `Policy`. If `suggested_value` is not set, it will inherit the
319
+ * value specified higher in the hierarchy, unless `inherit_from_parent` is `false`.
320
+ */
321
+ suggestedValue?: string;
322
+ }
323
+ interface GoogleCloudOrgpolicyV1Policy {
324
+ /** For boolean `Constraints`, whether to enforce the `Constraint` or not. */
325
+ booleanPolicy?: GoogleCloudOrgpolicyV1BooleanPolicy;
326
+ /**
327
+ * The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`. A [list of available
328
+ * constraints](/resource-manager/docs/organization-policy/org-policy-constraints) is available. Immutable after creation.
329
+ */
330
+ constraint?: string;
331
+ /**
332
+ * An opaque tag indicating the current version of the `Policy`, used for concurrency control. When the `Policy` is returned from either a `GetPolicy` or a `ListOrgPolicy` request,
333
+ * this `etag` indicates the version of the current `Policy` to use when executing a read-modify-write loop. When the `Policy` is returned from a `GetEffectivePolicy` request, the
334
+ * `etag` will be unset. When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value that was returned from a `GetOrgPolicy` request as part of a read-modify-write loop
335
+ * for concurrency control. Not setting the `etag`in a `SetOrgPolicy` request will result in an unconditional write of the `Policy`.
336
+ */
337
+ etag?: string;
338
+ /** List of values either allowed or disallowed. */
339
+ listPolicy?: GoogleCloudOrgpolicyV1ListPolicy;
340
+ /** Restores the default behavior of the constraint; independent of `Constraint` type. */
341
+ restoreDefault?: any;
342
+ /**
343
+ * The time stamp the `Policy` was previously updated. This is set by the server, not specified by the caller, and represents the last time a call to `SetOrgPolicy` was made for that
344
+ * `Policy`. Any value set by the client will be ignored.
345
+ */
346
+ updateTime?: string;
347
+ /** Version of the `Policy`. Default version is 0; */
348
+ version?: number;
349
+ }
350
+ // tslint:disable-next-line:no-empty-interface
351
+ interface GoogleCloudOrgpolicyV1RestoreDefault {
352
+ }
353
+ interface GoogleIdentityAccesscontextmanagerV1AccessLevel {
354
+ /** A `BasicLevel` composed of `Conditions`. */
355
+ basic?: GoogleIdentityAccesscontextmanagerV1BasicLevel;
356
+ /** A `CustomLevel` written in the Common Expression Language. */
357
+ custom?: GoogleIdentityAccesscontextmanagerV1CustomLevel;
358
+ /** Description of the `AccessLevel` and its use. Does not affect behavior. */
359
+ description?: string;
360
+ /**
361
+ * Required. Resource name for the Access Level. The `short_name` component must begin with a letter and only include alphanumeric and '_'. Format:
362
+ * `accessPolicies/{access_policy}/accessLevels/{access_level}`. The maximum length of the `access_level` component is 50 characters.
363
+ */
364
+ name?: string;
365
+ /** Human readable title. Must be unique within the Policy. */
366
+ title?: string;
367
+ }
368
+ interface GoogleIdentityAccesscontextmanagerV1AccessPolicy {
369
+ /**
370
+ * Output only. An opaque identifier for the current version of the `AccessPolicy`. This will always be a strongly validated etag, meaning that two Access Polices will be identical if
371
+ * and only if their etags are identical. Clients should not expect this to be in any specific format.
372
+ */
373
+ etag?: string;
374
+ /** Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/{access_policy}` */
375
+ name?: string;
376
+ /** Required. The parent of this `AccessPolicy` in the Cloud Resource Hierarchy. Currently immutable once created. Format: `organizations/{organization_id}` */
377
+ parent?: string;
378
+ /**
379
+ * The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=["folders/123"] has the
380
+ * following behavior: - vpcsc perimeters can only restrict projects within folders/123 - access levels can only be referenced by resources within folders/123. If empty, there are no
381
+ * limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope
382
+ * (attempting to create a second policy which includes "folders/123" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can
383
+ * only have a single scope. Format: list of `folders/{folder_number}` or `projects/{project_number}`
384
+ */
385
+ scopes?: string[];
386
+ /** Required. Human readable title. Does not affect behavior. */
387
+ title?: string;
388
+ }
389
+ interface GoogleIdentityAccesscontextmanagerV1ApiOperation {
390
+ /**
391
+ * API methods or permissions to allow. Method or permission must belong to the service specified by `service_name` field. A single MethodSelector entry with `*` specified for the
392
+ * `method` field will allow all methods AND permissions for the service specified in `service_name`.
393
+ */
394
+ methodSelectors?: GoogleIdentityAccesscontextmanagerV1MethodSelector[];
395
+ /**
396
+ * The name of the API whose methods or permissions the IngressPolicy or EgressPolicy want to allow. A single ApiOperation with `service_name` field set to `*` will allow all methods
397
+ * AND permissions for all services.
398
+ */
399
+ serviceName?: string;
400
+ }
401
+ interface GoogleIdentityAccesscontextmanagerV1BasicLevel {
402
+ /**
403
+ * How the `conditions` list should be combined to determine if a request is granted this `AccessLevel`. If AND is used, each `Condition` in `conditions` must be satisfied for the
404
+ * `AccessLevel` to be applied. If OR is used, at least one `Condition` in `conditions` must be satisfied for the `AccessLevel` to be applied. Default behavior is AND.
405
+ */
406
+ combiningFunction?: string;
407
+ /** Required. A list of requirements for the `AccessLevel` to be granted. */
408
+ conditions?: GoogleIdentityAccesscontextmanagerV1Condition[];
409
+ }
410
+ interface GoogleIdentityAccesscontextmanagerV1Condition {
411
+ /** Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed. */
412
+ devicePolicy?: GoogleIdentityAccesscontextmanagerV1DevicePolicy;
413
+ /**
414
+ * CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host
415
+ * bits must be zero) or the input is considered malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas
416
+ * "2001:db8::1/32" is not. The originating IP of a request must be in one of the listed subnets in order for this Condition to be true. If empty, all IP addresses are allowed.
417
+ */
418
+ ipSubnetworks?: string[];
419
+ /**
420
+ * The request must be made by one of the provided user or service accounts. Groups are not supported. Syntax: `user:{emailid}` `serviceAccount:{emailid}` If not specified, a request
421
+ * may come from any user.
422
+ */
423
+ members?: string[];
424
+ /**
425
+ * Whether to negate the Condition. If true, the Condition becomes a NAND over its non-empty fields, each field must be false for the Condition overall to be satisfied. Defaults to
426
+ * false.
427
+ */
428
+ negate?: boolean;
429
+ /** The request must originate from one of the provided countries/regions. Must be valid ISO 3166-1 alpha-2 codes. */
430
+ regions?: string[];
431
+ /**
432
+ * A list of other access levels defined in the same `Policy`, referenced by resource name. Referencing an `AccessLevel` which does not exist is an error. All access levels listed must
433
+ * be granted for the Condition to be true. Example: "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"`
434
+ */
435
+ requiredAccessLevels?: string[];
436
+ }
437
+ interface GoogleIdentityAccesscontextmanagerV1CustomLevel {
438
+ /** Required. A Cloud CEL expression evaluating to a boolean. */
439
+ expr?: Expr;
440
+ }
441
+ interface GoogleIdentityAccesscontextmanagerV1DevicePolicy {
442
+ /** Allowed device management levels, an empty list allows all management levels. */
443
+ allowedDeviceManagementLevels?: string[];
444
+ /** Allowed encryptions statuses, an empty list allows all statuses. */
445
+ allowedEncryptionStatuses?: string[];
446
+ /** Allowed OS versions, an empty list allows all types and all versions. */
447
+ osConstraints?: GoogleIdentityAccesscontextmanagerV1OsConstraint[];
448
+ /** Whether the device needs to be approved by the customer admin. */
449
+ requireAdminApproval?: boolean;
450
+ /** Whether the device needs to be corp owned. */
451
+ requireCorpOwned?: boolean;
452
+ /** Whether or not screenlock is required for the DevicePolicy to be true. Defaults to `false`. */
453
+ requireScreenlock?: boolean;
454
+ }
455
+ interface GoogleIdentityAccesscontextmanagerV1EgressFrom {
456
+ /**
457
+ * A list of identities that are allowed access through this [EgressPolicy]. Should be in the format of email address. The email address should represent individual user or service
458
+ * account only.
459
+ */
460
+ identities?: string[];
461
+ /** Specifies the type of identities that are allowed access to outside the perimeter. If left unspecified, then members of `identities` field will be allowed access. */
462
+ identityType?: string;
463
+ }
464
+ interface GoogleIdentityAccesscontextmanagerV1EgressPolicy {
465
+ /** Defines conditions on the source of a request causing this EgressPolicy to apply. */
466
+ egressFrom?: GoogleIdentityAccesscontextmanagerV1EgressFrom;
467
+ /** Defines the conditions on the ApiOperation and destination resources that cause this EgressPolicy to apply. */
468
+ egressTo?: GoogleIdentityAccesscontextmanagerV1EgressTo;
469
+ }
470
+ interface GoogleIdentityAccesscontextmanagerV1EgressTo {
471
+ /**
472
+ * A list of external resources that are allowed to be accessed. Only AWS and Azure resources are supported. For Amazon S3, the supported format is s3://BUCKET_NAME. For Azure Storage,
473
+ * the supported format is azure://myaccount.blob.core.windows.net/CONTAINER_NAME. A request matches if it contains an external resource in this list (Example: s3://bucket/path).
474
+ * Currently '*' is not allowed.
475
+ */
476
+ externalResources?: string[];
477
+ /** A list of ApiOperations allowed to be performed by the sources specified in the corresponding EgressFrom. A request matches if it uses an operation/service in this list. */
478
+ operations?: GoogleIdentityAccesscontextmanagerV1ApiOperation[];
479
+ /**
480
+ * A list of resources, currently only projects in the form `projects/`, that are allowed to be accessed by sources defined in the corresponding EgressFrom. A request matches if it
481
+ * contains a resource in this list. If `*` is specified for `resources`, then this EgressTo rule will authorize access to all resources outside the perimeter.
482
+ */
483
+ resources?: string[];
484
+ }
485
+ interface GoogleIdentityAccesscontextmanagerV1IngressFrom {
486
+ /**
487
+ * A list of identities that are allowed access through this ingress policy. Should be in the format of email address. The email address should represent individual user or service
488
+ * account only.
489
+ */
490
+ identities?: string[];
491
+ /** Specifies the type of identities that are allowed access from outside the perimeter. If left unspecified, then members of `identities` field will be allowed access. */
492
+ identityType?: string;
493
+ /** Sources that this IngressPolicy authorizes access from. */
494
+ sources?: GoogleIdentityAccesscontextmanagerV1IngressSource[];
495
+ }
496
+ interface GoogleIdentityAccesscontextmanagerV1IngressPolicy {
497
+ /** Defines the conditions on the source of a request causing this IngressPolicy to apply. */
498
+ ingressFrom?: GoogleIdentityAccesscontextmanagerV1IngressFrom;
499
+ /** Defines the conditions on the ApiOperation and request destination that cause this IngressPolicy to apply. */
500
+ ingressTo?: GoogleIdentityAccesscontextmanagerV1IngressTo;
501
+ }
502
+ interface GoogleIdentityAccesscontextmanagerV1IngressSource {
503
+ /**
504
+ * An AccessLevel resource name that allow resources within the ServicePerimeters to be accessed from the internet. AccessLevels listed must be in the same policy as this
505
+ * ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If no AccessLevel names are listed, resources within the perimeter can only be accessed via Google Cloud
506
+ * calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all IngressSources
507
+ * will be allowed.
508
+ */
509
+ accessLevel?: string;
510
+ /**
511
+ * A Google Cloud resource that is allowed to ingress the perimeter. Requests from these resources will be allowed to access perimeter data. Currently only projects are allowed.
512
+ * Format: `projects/{project_number}` The project may be in any Google Cloud organization, not just the organization that the perimeter is defined in. `*` is not allowed, the case of
513
+ * allowing all Google Cloud resources only is not supported.
514
+ */
515
+ resource?: string;
516
+ }
517
+ interface GoogleIdentityAccesscontextmanagerV1IngressTo {
518
+ /** A list of ApiOperations allowed to be performed by the sources specified in corresponding IngressFrom in this ServicePerimeter. */
519
+ operations?: GoogleIdentityAccesscontextmanagerV1ApiOperation[];
520
+ /**
521
+ * A list of resources, currently only projects in the form `projects/`, protected by this ServicePerimeter that are allowed to be accessed by sources defined in the corresponding
522
+ * IngressFrom. If a single `*` is specified, then access to all resources inside the perimeter are allowed.
523
+ */
524
+ resources?: string[];
525
+ }
526
+ interface GoogleIdentityAccesscontextmanagerV1MethodSelector {
527
+ /**
528
+ * Value for `method` should be a valid method name for the corresponding `service_name` in ApiOperation. If `*` used as value for `method`, then ALL methods and permissions are
529
+ * allowed.
530
+ */
531
+ method?: string;
532
+ /** Value for `permission` should be a valid Cloud IAM permission for the corresponding `service_name` in ApiOperation. */
533
+ permission?: string;
534
+ }
535
+ interface GoogleIdentityAccesscontextmanagerV1OsConstraint {
536
+ /** The minimum allowed OS version. If not set, any version of this OS satisfies the constraint. Format: `"major.minor.patch"`. Examples: `"10.5.301"`, `"9.2.1"`. */
537
+ minimumVersion?: string;
538
+ /** Required. The allowed OS type. */
539
+ osType?: string;
540
+ /**
541
+ * Only allows requests from devices with a verified Chrome OS. Verifications includes requirements that the device is enterprise-managed, conformant to domain policies, and the caller
542
+ * has permission to call the API targeted by the request.
543
+ */
544
+ requireVerifiedChromeOs?: boolean;
545
+ }
546
+ interface GoogleIdentityAccesscontextmanagerV1ServicePerimeter {
547
+ /** Description of the `ServicePerimeter` and its use. Does not affect behavior. */
548
+ description?: string;
549
+ /**
550
+ * Required. Resource name for the ServicePerimeter. The `short_name` component must begin with a letter and only include alphanumeric and '_'. Format:
551
+ * `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`
552
+ */
553
+ name?: string;
554
+ /**
555
+ * Perimeter type indicator. A single project is allowed to be a member of single regular perimeter, but multiple service perimeter bridges. A project cannot be a included in a
556
+ * perimeter bridge without being included in regular perimeter. For perimeter bridges, the restricted service list as well as access level lists must be empty.
557
+ */
558
+ perimeterType?: string;
559
+ /**
560
+ * Proposed (or dry run) ServicePerimeter configuration. This configuration allows to specify and test ServicePerimeter configuration without enforcing actual access restrictions. Only
561
+ * allowed to be set when the "use_explicit_dry_run_spec" flag is set.
562
+ */
563
+ spec?: GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig;
564
+ /** Current ServicePerimeter configuration. Specifies sets of resources, restricted services and access levels that determine perimeter content and boundaries. */
565
+ status?: GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig;
566
+ /** Human readable title. Must be unique within the Policy. */
567
+ title?: string;
568
+ /**
569
+ * Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly exists for all Service Perimeters, and that spec is identical to the status for those Service Perimeters. When
570
+ * this flag is set, it inhibits the generation of the implicit spec, thereby allowing the user to explicitly provide a configuration ("spec") to use in a dry-run version of the
571
+ * Service Perimeter. This allows the user to test changes to the enforced config ("status") without actually enforcing them. This testing is done through analyzing the differences
572
+ * between currently enforced and suggested restrictions. use_explicit_dry_run_spec must bet set to True if any of the fields in the spec are set to non-default values.
573
+ */
574
+ useExplicitDryRunSpec?: boolean;
575
+ }
576
+ interface GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig {
577
+ /**
578
+ * A list of `AccessLevel` resource names that allow resources within the `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed must be in the same policy as this
579
+ * `ServicePerimeter`. Referencing a nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are listed, resources within the perimeter can only be accessed via Google
580
+ * Cloud calls with request origins within the perimeter. Example: `"accessPolicies/MY_POLICY/accessLevels/MY_LEVEL"`. For Service Perimeter Bridge, must be empty.
581
+ */
582
+ accessLevels?: string[];
583
+ /**
584
+ * List of EgressPolicies to apply to the perimeter. A perimeter may have multiple EgressPolicies, each of which is evaluated separately. Access is granted if any EgressPolicy grants
585
+ * it. Must be empty for a perimeter bridge.
586
+ */
587
+ egressPolicies?: GoogleIdentityAccesscontextmanagerV1EgressPolicy[];
588
+ /**
589
+ * List of IngressPolicies to apply to the perimeter. A perimeter may have multiple IngressPolicies, each of which is evaluated separately. Access is granted if any Ingress Policy
590
+ * grants it. Must be empty for a perimeter bridge.
591
+ */
592
+ ingressPolicies?: GoogleIdentityAccesscontextmanagerV1IngressPolicy[];
593
+ /** A list of Google Cloud resources that are inside of the service perimeter. Currently only projects are allowed. Format: `projects/{project_number}` */
594
+ resources?: string[];
595
+ /**
596
+ * Google Cloud services that are subject to the Service Perimeter restrictions. For example, if `storage.googleapis.com` is specified, access to the storage buckets inside the
597
+ * perimeter must meet the perimeter's access restrictions.
598
+ */
599
+ restrictedServices?: string[];
600
+ /** Configuration for APIs allowed within Perimeter. */
601
+ vpcAccessibleServices?: GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices;
602
+ }
603
+ interface GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices {
604
+ /**
605
+ * The list of APIs usable within the Service Perimeter. Must be empty unless 'enable_restriction' is True. You can specify a list of individual services, as well as include the
606
+ * 'RESTRICTED-SERVICES' value, which automatically includes all of the services protected by the perimeter.
607
+ */
608
+ allowedServices?: string[];
609
+ /** Whether to restrict API calls within the Service Perimeter to the list of APIs specified in 'allowed_services'. */
610
+ enableRestriction?: boolean;
611
+ }
612
+ interface Operation {
613
+ /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */
614
+ done?: boolean;
615
+ /** The error result of the operation in case of failure or cancellation. */
616
+ error?: Status;
617
+ /**
618
+ * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such
619
+ * metadata. Any method that returns a long-running operation should document the metadata type, if any.
620
+ */
621
+ metadata?: { [P in string]: any };
622
+ /**
623
+ * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending
624
+ * with `operations/{unique_id}`.
625
+ */
626
+ name?: string;
627
+ /**
628
+ * The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the
629
+ * original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the
630
+ * original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
631
+ */
632
+ response?: { [P in string]: any };
633
+ }
634
+ interface Policy {
635
+ /** Specifies cloud audit logging configuration for this policy. */
636
+ auditConfigs?: AuditConfig[];
637
+ /**
638
+ * Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings`
639
+ * must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a
640
+ * principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another
641
+ * 1,450 principals to the `bindings` in the `Policy`.
642
+ */
643
+ bindings?: Binding[];
644
+ /**
645
+ * `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make
646
+ * use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems
647
+ * are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM
648
+ * Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1`
649
+ * policy, and all of the conditions in the version `3` policy are lost.
650
+ */
651
+ etag?: string;
652
+ /**
653
+ * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings
654
+ * must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a
655
+ * policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use
656
+ * IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1`
657
+ * policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave
658
+ * the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
659
+ */
660
+ version?: number;
661
+ }
662
+ interface Status {
663
+ /** The status code, which should be an enum value of google.rpc.Code. */
664
+ code?: number;
665
+ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
666
+ details?: Array<{ [P in string]: any }>;
667
+ /**
668
+ * A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the
669
+ * client.
670
+ */
671
+ message?: string;
672
+ }
673
+ interface OperationsResource {
674
+ /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
675
+ get(request?: {
676
+ /** V1 error format. */
677
+ "$.xgafv"?: string;
678
+ /** OAuth access token. */
679
+ access_token?: string;
680
+ /** Data format for response. */
681
+ alt?: string;
682
+ /** JSONP */
683
+ callback?: string;
684
+ /** Selector specifying which fields to include in a partial response. */
685
+ fields?: string;
686
+ /** 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. */
687
+ key?: string;
688
+ /** The name of the operation resource. */
689
+ name: string;
690
+ /** OAuth 2.0 token for the current user. */
691
+ oauth_token?: string;
692
+ /** Returns response with indentations and line breaks. */
693
+ prettyPrint?: boolean;
694
+ /** 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. */
695
+ quotaUser?: string;
696
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
697
+ upload_protocol?: string;
698
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
699
+ uploadType?: string;
700
+ }): Request<Operation>;
701
+ }
702
+ interface V1p7beta1Resource {
703
+ /**
704
+ * Exports assets with time and resource types to a given Cloud Storage location/BigQuery table. For Cloud Storage location destinations, the output format is newline-delimited JSON.
705
+ * Each line represents a google.cloud.asset.v1p7beta1.Asset in the JSON format; for BigQuery table destinations, the output table stores the fields in asset proto as columns. This API
706
+ * implements the google.longrunning.Operation API , which allows you to keep track of the export. We recommend intervals of at least 2 seconds with exponential retry to poll the
707
+ * export operation result. For regular-size resource parent, the export operation usually finishes within 5 minutes.
708
+ */
709
+ exportAssets(request: {
710
+ /** V1 error format. */
711
+ "$.xgafv"?: string;
712
+ /** OAuth access token. */
713
+ access_token?: string;
714
+ /** Data format for response. */
715
+ alt?: string;
716
+ /** JSONP */
717
+ callback?: string;
718
+ /** Selector specifying which fields to include in a partial response. */
719
+ fields?: string;
720
+ /** 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. */
721
+ key?: string;
722
+ /** OAuth 2.0 token for the current user. */
723
+ oauth_token?: string;
724
+ /**
725
+ * Required. The relative name of the root asset. This can only be an organization number (such as "organizations/123"), a project ID (such as "projects/my-project-id"), or a
726
+ * project number (such as "projects/12345"), or a folder number (such as "folders/123").
727
+ */
728
+ parent: string;
729
+ /** Returns response with indentations and line breaks. */
730
+ prettyPrint?: boolean;
731
+ /** 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. */
732
+ quotaUser?: string;
733
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
734
+ upload_protocol?: string;
735
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
736
+ uploadType?: string;
737
+ /** Request body */
738
+ resource: GoogleCloudAssetV1p7beta1ExportAssetsRequest;
739
+ }): Request<Operation>;
740
+ exportAssets(request: {
741
+ /** V1 error format. */
742
+ "$.xgafv"?: string;
743
+ /** OAuth access token. */
744
+ access_token?: string;
745
+ /** Data format for response. */
746
+ alt?: string;
747
+ /** JSONP */
748
+ callback?: string;
749
+ /** Selector specifying which fields to include in a partial response. */
750
+ fields?: string;
751
+ /** 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. */
752
+ key?: string;
753
+ /** OAuth 2.0 token for the current user. */
754
+ oauth_token?: string;
755
+ /**
756
+ * Required. The relative name of the root asset. This can only be an organization number (such as "organizations/123"), a project ID (such as "projects/my-project-id"), or a
757
+ * project number (such as "projects/12345"), or a folder number (such as "folders/123").
758
+ */
759
+ parent: string;
760
+ /** Returns response with indentations and line breaks. */
761
+ prettyPrint?: boolean;
762
+ /** 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. */
763
+ quotaUser?: string;
764
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
765
+ upload_protocol?: string;
766
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
767
+ uploadType?: string;
768
+ },
769
+ body: GoogleCloudAssetV1p7beta1ExportAssetsRequest): Request<Operation>;
770
+ }
771
+
772
+ const operations: OperationsResource;
773
+
774
+ const v1p7beta1: V1p7beta1Resource;
775
+ }
776
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@maxim_mazurok/gapi.client.cloudasset-v1p7beta1",
3
+ "version": "0.0.20220805",
4
+ "description": "TypeScript typings for Cloud Asset API v1p7beta1",
5
+ "license": "MIT",
6
+ "author": {
7
+ "email": "maxim@mazurok.com",
8
+ "name": "Maxim Mazurok",
9
+ "url": "https://maxim.mazurok.com"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
14
+ },
15
+ "types": "index.d.ts",
16
+ "dependencies": {
17
+ "@types/gapi.client": "*",
18
+ "@types/gapi.client.discovery": "*"
19
+ }
20
+ }
package/readme.md ADDED
@@ -0,0 +1,78 @@
1
+ # TypeScript typings for Cloud Asset API v1p7beta1
2
+
3
+ The cloud asset API manages the history and inventory of cloud resources.
4
+ For detailed description please check [documentation](https://cloud.google.com/asset-inventory/docs/quickstart).
5
+
6
+ ## Installing
7
+
8
+ Install typings for Cloud Asset API:
9
+
10
+ ```
11
+ npm install @types/gapi.client.cloudasset-v1p7beta1 --save-dev
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ You need to initialize Google API client in your code:
17
+
18
+ ```typescript
19
+ gapi.load('client', () => {
20
+ // now we can use gapi.client
21
+ // ...
22
+ });
23
+ ```
24
+
25
+ Then load api client wrapper:
26
+
27
+ ```typescript
28
+ gapi.client.load('https://cloudasset.googleapis.com/$discovery/rest?version=v1p7beta1', () => {
29
+ // now we can use:
30
+ // gapi.client.cloudasset
31
+ });
32
+ ```
33
+
34
+ ```typescript
35
+ // Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
36
+ gapi.client.load('cloudasset', 'v1p7beta1', () => {
37
+ // now we can use:
38
+ // gapi.client.cloudasset
39
+ });
40
+ ```
41
+
42
+ Don't forget to authenticate your client before sending any request to resources:
43
+
44
+ ```typescript
45
+ // declare client_id registered in Google Developers Console
46
+ var client_id = '',
47
+ scope = [
48
+ // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
49
+ 'https://www.googleapis.com/auth/cloud-platform',
50
+ ],
51
+ immediate = true;
52
+ // ...
53
+
54
+ gapi.auth.authorize(
55
+ { client_id: client_id, scope: scope, immediate: immediate },
56
+ authResult => {
57
+ if (authResult && !authResult.error) {
58
+ /* handle successful authorization */
59
+ } else {
60
+ /* handle authorization error */
61
+ }
62
+ });
63
+ ```
64
+
65
+ After that you can use Cloud Asset API resources: <!-- TODO: make this work for multiple namespaces -->
66
+
67
+ ```typescript
68
+
69
+ /*
70
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
71
+ */
72
+ await gapi.client.cloudasset.operations.get({ name: "name", });
73
+
74
+ /*
75
+ Exports assets with time and resource types to a given Cloud Storage location/BigQuery table. For Cloud Storage location destinations, the output format is newline-delimited JSON. Each line represents a google.cloud.asset.v1p7beta1.Asset in the JSON format; for BigQuery table destinations, the output table stores the fields in asset proto as columns. This API implements the google.longrunning.Operation API , which allows you to keep track of the export. We recommend intervals of at least 2 seconds with exponential retry to poll the export operation result. For regular-size resource parent, the export operation usually finishes within 5 minutes.
76
+ */
77
+ await gapi.client.cloudasset.exportAssets({ parent: "parent", });
78
+ ```
package/tests.ts ADDED
@@ -0,0 +1,70 @@
1
+ /* This is stub file for gapi.client.cloudasset-v1p7beta1 definition tests */
2
+ // IMPORTANT
3
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
+
6
+ // Revision: 20220805
7
+
8
+ gapi.load('client', async () => {
9
+ /** now we can use gapi.client */
10
+
11
+ await gapi.client.load('https://cloudasset.googleapis.com/$discovery/rest?version=v1p7beta1');
12
+ /** now we can use gapi.client.cloudasset */
13
+
14
+ /** don't forget to authenticate your client before sending any request to resources: */
15
+ /** declare client_id registered in Google Developers Console */
16
+ const client_id = '<<PUT YOUR CLIENT ID HERE>>';
17
+ const scope = [
18
+ /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
19
+ 'https://www.googleapis.com/auth/cloud-platform',
20
+ ];
21
+ const immediate = false;
22
+ gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
23
+ if (authResult && !authResult.error) {
24
+ /** handle successful authorization */
25
+ run();
26
+ } else {
27
+ /** handle authorization error */
28
+ }
29
+ });
30
+
31
+ async function run() {
32
+ /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
33
+ await gapi.client.cloudasset.operations.get({
34
+ name: "Test string",
35
+ });
36
+ /**
37
+ * Exports assets with time and resource types to a given Cloud Storage location/BigQuery table. For Cloud Storage location destinations, the output format is newline-delimited JSON. Each
38
+ * line represents a google.cloud.asset.v1p7beta1.Asset in the JSON format; for BigQuery table destinations, the output table stores the fields in asset proto as columns. This API
39
+ * implements the google.longrunning.Operation API , which allows you to keep track of the export. We recommend intervals of at least 2 seconds with exponential retry to poll the export
40
+ * operation result. For regular-size resource parent, the export operation usually finishes within 5 minutes.
41
+ */
42
+ await gapi.client.cloudasset.v1p7beta1.exportAssets({
43
+ parent: "Test string",
44
+ }, {
45
+ assetTypes: [
46
+ "Test string"
47
+ ],
48
+ contentType: "Test string",
49
+ outputConfig: {
50
+ bigqueryDestination: {
51
+ dataset: "Test string",
52
+ force: true,
53
+ partitionSpec: {
54
+ partitionKey: "Test string",
55
+ },
56
+ separateTablesPerAssetType: true,
57
+ table: "Test string",
58
+ },
59
+ gcsDestination: {
60
+ uri: "Test string",
61
+ uriPrefix: "Test string",
62
+ },
63
+ },
64
+ readTime: "Test string",
65
+ relationshipTypes: [
66
+ "Test string"
67
+ ],
68
+ });
69
+ }
70
+ });
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "commonjs",
4
+ "lib": ["es6", "dom"],
5
+ "noImplicitAny": true,
6
+ "noImplicitThis": true,
7
+ "strictNullChecks": true,
8
+ "baseUrl": "../",
9
+ "typeRoots": [
10
+ "../"
11
+ ],
12
+ "types": [],
13
+ "noEmit": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "strictFunctionTypes": true
16
+ },
17
+ "files": ["index.d.ts", "tests.ts"]
18
+ }
package/tslint.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "dtslint/dtslint.json",
3
+ "rules": {
4
+ "no-redundant-jsdoc": false
5
+ }
6
+ }