google-apis-bigquerydatapolicy_v2 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google/apis/bigquerydatapolicy_v2/classes.rb +703 -0
- data/lib/google/apis/bigquerydatapolicy_v2/gem_version.rb +28 -0
- data/lib/google/apis/bigquerydatapolicy_v2/representations.rb +276 -0
- data/lib/google/apis/bigquerydatapolicy_v2/service.rb +431 -0
- data/lib/google/apis/bigquerydatapolicy_v2.rb +39 -0
- data/lib/google-apis-bigquerydatapolicy_v2.rb +15 -0
- metadata +79 -0
|
@@ -0,0 +1,703 @@
|
|
|
1
|
+
# Copyright 2020 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'date'
|
|
16
|
+
require 'google/apis/core/base_service'
|
|
17
|
+
require 'google/apis/core/json_representation'
|
|
18
|
+
require 'google/apis/core/hashable'
|
|
19
|
+
require 'google/apis/errors'
|
|
20
|
+
|
|
21
|
+
module Google
|
|
22
|
+
module Apis
|
|
23
|
+
module BigquerydatapolicyV2
|
|
24
|
+
|
|
25
|
+
# Request message for the AddGrantees method.
|
|
26
|
+
class AddGranteesRequest
|
|
27
|
+
include Google::Apis::Core::Hashable
|
|
28
|
+
|
|
29
|
+
# Required. IAM principal that should be granted Fine Grained Access to the
|
|
30
|
+
# underlying data goverened by the data policy. The target data policy is
|
|
31
|
+
# determined by the `data_policy` field. Uses the [IAM V2 principal syntax](
|
|
32
|
+
# https://cloud.google.com/iam/docs/principal-identifiers#v2). Supported
|
|
33
|
+
# principal types: * User * Group * Service account
|
|
34
|
+
# Corresponds to the JSON property `grantees`
|
|
35
|
+
# @return [Array<String>]
|
|
36
|
+
attr_accessor :grantees
|
|
37
|
+
|
|
38
|
+
def initialize(**args)
|
|
39
|
+
update!(**args)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Update properties of this object
|
|
43
|
+
def update!(**args)
|
|
44
|
+
@grantees = args[:grantees] if args.key?(:grantees)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Specifies the audit configuration for a service. The configuration determines
|
|
49
|
+
# which permission types are logged, and what identities, if any, are exempted
|
|
50
|
+
# from logging. An AuditConfig must have one or more AuditLogConfigs. If there
|
|
51
|
+
# are AuditConfigs for both `allServices` and a specific service, the union of
|
|
52
|
+
# the two AuditConfigs is used for that service: the log_types specified in each
|
|
53
|
+
# AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
|
|
54
|
+
# exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
|
|
55
|
+
# service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
|
|
56
|
+
# exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
|
|
57
|
+
# ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
|
|
58
|
+
# "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
|
|
59
|
+
# , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
|
|
60
|
+
# this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
|
|
61
|
+
# exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com`
|
|
62
|
+
# from DATA_WRITE logging.
|
|
63
|
+
class AuditConfig
|
|
64
|
+
include Google::Apis::Core::Hashable
|
|
65
|
+
|
|
66
|
+
# The configuration for logging of each type of permission.
|
|
67
|
+
# Corresponds to the JSON property `auditLogConfigs`
|
|
68
|
+
# @return [Array<Google::Apis::BigquerydatapolicyV2::AuditLogConfig>]
|
|
69
|
+
attr_accessor :audit_log_configs
|
|
70
|
+
|
|
71
|
+
# Specifies a service that will be enabled for audit logging. For example, `
|
|
72
|
+
# storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
|
|
73
|
+
# value that covers all services.
|
|
74
|
+
# Corresponds to the JSON property `service`
|
|
75
|
+
# @return [String]
|
|
76
|
+
attr_accessor :service
|
|
77
|
+
|
|
78
|
+
def initialize(**args)
|
|
79
|
+
update!(**args)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Update properties of this object
|
|
83
|
+
def update!(**args)
|
|
84
|
+
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
|
|
85
|
+
@service = args[:service] if args.key?(:service)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Provides the configuration for logging a type of permissions. Example: ` "
|
|
90
|
+
# audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
|
|
91
|
+
# jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
|
|
92
|
+
# DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
|
|
93
|
+
# DATA_READ logging.
|
|
94
|
+
class AuditLogConfig
|
|
95
|
+
include Google::Apis::Core::Hashable
|
|
96
|
+
|
|
97
|
+
# Specifies the identities that do not cause logging for this type of permission.
|
|
98
|
+
# Follows the same format of Binding.members.
|
|
99
|
+
# Corresponds to the JSON property `exemptedMembers`
|
|
100
|
+
# @return [Array<String>]
|
|
101
|
+
attr_accessor :exempted_members
|
|
102
|
+
|
|
103
|
+
# The log type that this config enables.
|
|
104
|
+
# Corresponds to the JSON property `logType`
|
|
105
|
+
# @return [String]
|
|
106
|
+
attr_accessor :log_type
|
|
107
|
+
|
|
108
|
+
def initialize(**args)
|
|
109
|
+
update!(**args)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Update properties of this object
|
|
113
|
+
def update!(**args)
|
|
114
|
+
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
|
|
115
|
+
@log_type = args[:log_type] if args.key?(:log_type)
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Associates `members`, or principals, with a `role`.
|
|
120
|
+
class Binding
|
|
121
|
+
include Google::Apis::Core::Hashable
|
|
122
|
+
|
|
123
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
|
124
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
|
125
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
|
126
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
|
127
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
|
128
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
|
129
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
|
130
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
|
131
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
|
132
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
|
133
|
+
# string" description: "Create a notification string with a timestamp."
|
|
134
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
|
135
|
+
# exact variables and functions that may be referenced within an expression are
|
|
136
|
+
# determined by the service that evaluates it. See the service documentation for
|
|
137
|
+
# additional information.
|
|
138
|
+
# Corresponds to the JSON property `condition`
|
|
139
|
+
# @return [Google::Apis::BigquerydatapolicyV2::Expr]
|
|
140
|
+
attr_accessor :condition
|
|
141
|
+
|
|
142
|
+
# Specifies the principals requesting access for a Google Cloud resource. `
|
|
143
|
+
# members` can have the following values: * `allUsers`: A special identifier
|
|
144
|
+
# that represents anyone who is on the internet; with or without a Google
|
|
145
|
+
# account. * `allAuthenticatedUsers`: A special identifier that represents
|
|
146
|
+
# anyone who is authenticated with a Google account or a service account. Does
|
|
147
|
+
# not include identities that come from external identity providers (IdPs)
|
|
148
|
+
# through identity federation. * `user:`emailid``: An email address that
|
|
149
|
+
# represents a specific Google account. For example, `alice@example.com` . * `
|
|
150
|
+
# serviceAccount:`emailid``: An email address that represents a Google service
|
|
151
|
+
# account. For example, `my-other-app@appspot.gserviceaccount.com`. * `
|
|
152
|
+
# serviceAccount:`projectid`.svc.id.goog[`namespace`/`kubernetes-sa`]`: An
|
|
153
|
+
# identifier for a [Kubernetes service account](https://cloud.google.com/
|
|
154
|
+
# kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-
|
|
155
|
+
# project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An
|
|
156
|
+
# email address that represents a Google group. For example, `admins@example.com`
|
|
157
|
+
# . * `domain:`domain``: The G Suite domain (primary) that represents all the
|
|
158
|
+
# users of that domain. For example, `google.com` or `example.com`. * `principal:
|
|
159
|
+
# //iam.googleapis.com/locations/global/workforcePools/`pool_id`/subject/`
|
|
160
|
+
# subject_attribute_value``: A single identity in a workforce identity pool. * `
|
|
161
|
+
# principalSet://iam.googleapis.com/locations/global/workforcePools/`pool_id`/
|
|
162
|
+
# group/`group_id``: All workforce identities in a group. * `principalSet://iam.
|
|
163
|
+
# googleapis.com/locations/global/workforcePools/`pool_id`/attribute.`
|
|
164
|
+
# attribute_name`/`attribute_value``: All workforce identities with a specific
|
|
165
|
+
# attribute value. * `principalSet://iam.googleapis.com/locations/global/
|
|
166
|
+
# workforcePools/`pool_id`/*`: All identities in a workforce identity pool. * `
|
|
167
|
+
# principal://iam.googleapis.com/projects/`project_number`/locations/global/
|
|
168
|
+
# workloadIdentityPools/`pool_id`/subject/`subject_attribute_value``: A single
|
|
169
|
+
# identity in a workload identity pool. * `principalSet://iam.googleapis.com/
|
|
170
|
+
# projects/`project_number`/locations/global/workloadIdentityPools/`pool_id`/
|
|
171
|
+
# group/`group_id``: A workload identity pool group. * `principalSet://iam.
|
|
172
|
+
# googleapis.com/projects/`project_number`/locations/global/
|
|
173
|
+
# workloadIdentityPools/`pool_id`/attribute.`attribute_name`/`attribute_value``:
|
|
174
|
+
# All identities in a workload identity pool with a certain attribute. * `
|
|
175
|
+
# principalSet://iam.googleapis.com/projects/`project_number`/locations/global/
|
|
176
|
+
# workloadIdentityPools/`pool_id`/*`: All identities in a workload identity pool.
|
|
177
|
+
# * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
|
|
178
|
+
# identifier) representing a user that has been recently deleted. For example, `
|
|
179
|
+
# alice@example.com?uid=123456789012345678901`. If the user is recovered, this
|
|
180
|
+
# value reverts to `user:`emailid`` and the recovered user retains the role in
|
|
181
|
+
# the binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email
|
|
182
|
+
# address (plus unique identifier) representing a service account that has been
|
|
183
|
+
# recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=
|
|
184
|
+
# 123456789012345678901`. If the service account is undeleted, this value
|
|
185
|
+
# reverts to `serviceAccount:`emailid`` and the undeleted service account
|
|
186
|
+
# retains the role in the binding. * `deleted:group:`emailid`?uid=`uniqueid``:
|
|
187
|
+
# An email address (plus unique identifier) representing a Google group that has
|
|
188
|
+
# been recently deleted. For example, `admins@example.com?uid=
|
|
189
|
+
# 123456789012345678901`. If the group is recovered, this value reverts to `
|
|
190
|
+
# group:`emailid`` and the recovered group retains the role in the binding. * `
|
|
191
|
+
# deleted:principal://iam.googleapis.com/locations/global/workforcePools/`
|
|
192
|
+
# pool_id`/subject/`subject_attribute_value``: Deleted single identity in a
|
|
193
|
+
# workforce identity pool. For example, `deleted:principal://iam.googleapis.com/
|
|
194
|
+
# locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
|
|
195
|
+
# Corresponds to the JSON property `members`
|
|
196
|
+
# @return [Array<String>]
|
|
197
|
+
attr_accessor :members
|
|
198
|
+
|
|
199
|
+
# Role that is assigned to the list of `members`, or principals. For example, `
|
|
200
|
+
# roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM
|
|
201
|
+
# roles and permissions, see the [IAM documentation](https://cloud.google.com/
|
|
202
|
+
# iam/docs/roles-overview). For a list of the available pre-defined roles, see [
|
|
203
|
+
# here](https://cloud.google.com/iam/docs/understanding-roles).
|
|
204
|
+
# Corresponds to the JSON property `role`
|
|
205
|
+
# @return [String]
|
|
206
|
+
attr_accessor :role
|
|
207
|
+
|
|
208
|
+
def initialize(**args)
|
|
209
|
+
update!(**args)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Update properties of this object
|
|
213
|
+
def update!(**args)
|
|
214
|
+
@condition = args[:condition] if args.key?(:condition)
|
|
215
|
+
@members = args[:members] if args.key?(:members)
|
|
216
|
+
@role = args[:role] if args.key?(:role)
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Request message for the CreateDataPolicy method.
|
|
221
|
+
class CreateDataPolicyRequest
|
|
222
|
+
include Google::Apis::Core::Hashable
|
|
223
|
+
|
|
224
|
+
# Represents the label-policy binding.
|
|
225
|
+
# Corresponds to the JSON property `dataPolicy`
|
|
226
|
+
# @return [Google::Apis::BigquerydatapolicyV2::DataPolicy]
|
|
227
|
+
attr_accessor :data_policy
|
|
228
|
+
|
|
229
|
+
# Required. User-assigned (human readable) ID of the data policy that needs to
|
|
230
|
+
# be unique within a project. Used as `data_policy_id` in part of the resource
|
|
231
|
+
# name.
|
|
232
|
+
# Corresponds to the JSON property `dataPolicyId`
|
|
233
|
+
# @return [String]
|
|
234
|
+
attr_accessor :data_policy_id
|
|
235
|
+
|
|
236
|
+
def initialize(**args)
|
|
237
|
+
update!(**args)
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Update properties of this object
|
|
241
|
+
def update!(**args)
|
|
242
|
+
@data_policy = args[:data_policy] if args.key?(:data_policy)
|
|
243
|
+
@data_policy_id = args[:data_policy_id] if args.key?(:data_policy_id)
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# The policy used to specify data masking rule.
|
|
248
|
+
class DataMaskingPolicy
|
|
249
|
+
include Google::Apis::Core::Hashable
|
|
250
|
+
|
|
251
|
+
# Optional. A predefined masking expression.
|
|
252
|
+
# Corresponds to the JSON property `predefinedExpression`
|
|
253
|
+
# @return [String]
|
|
254
|
+
attr_accessor :predefined_expression
|
|
255
|
+
|
|
256
|
+
# Optional. The name of the BigQuery routine that contains the custom masking
|
|
257
|
+
# routine, in the format of `projects/`project_number`/datasets/`dataset_id`/
|
|
258
|
+
# routines/`routine_id``.
|
|
259
|
+
# Corresponds to the JSON property `routine`
|
|
260
|
+
# @return [String]
|
|
261
|
+
attr_accessor :routine
|
|
262
|
+
|
|
263
|
+
def initialize(**args)
|
|
264
|
+
update!(**args)
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# Update properties of this object
|
|
268
|
+
def update!(**args)
|
|
269
|
+
@predefined_expression = args[:predefined_expression] if args.key?(:predefined_expression)
|
|
270
|
+
@routine = args[:routine] if args.key?(:routine)
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# Represents the label-policy binding.
|
|
275
|
+
class DataPolicy
|
|
276
|
+
include Google::Apis::Core::Hashable
|
|
277
|
+
|
|
278
|
+
# The policy used to specify data masking rule.
|
|
279
|
+
# Corresponds to the JSON property `dataMaskingPolicy`
|
|
280
|
+
# @return [Google::Apis::BigquerydatapolicyV2::DataMaskingPolicy]
|
|
281
|
+
attr_accessor :data_masking_policy
|
|
282
|
+
|
|
283
|
+
# Output only. User-assigned (human readable) ID of the data policy that needs
|
|
284
|
+
# to be unique within a project. Used as `data_policy_id` in part of the
|
|
285
|
+
# resource name.
|
|
286
|
+
# Corresponds to the JSON property `dataPolicyId`
|
|
287
|
+
# @return [String]
|
|
288
|
+
attr_accessor :data_policy_id
|
|
289
|
+
|
|
290
|
+
# Required. Type of data policy.
|
|
291
|
+
# Corresponds to the JSON property `dataPolicyType`
|
|
292
|
+
# @return [String]
|
|
293
|
+
attr_accessor :data_policy_type
|
|
294
|
+
|
|
295
|
+
# The etag for this Data Policy. This field is used for UpdateDataPolicy calls.
|
|
296
|
+
# If Data Policy exists, this field is required and must match the server's etag.
|
|
297
|
+
# It will also be populated in the response of GetDataPolicy, CreateDataPolicy,
|
|
298
|
+
# and UpdateDataPolicy calls.
|
|
299
|
+
# Corresponds to the JSON property `etag`
|
|
300
|
+
# @return [String]
|
|
301
|
+
attr_accessor :etag
|
|
302
|
+
|
|
303
|
+
# Optional. The list of IAM principals that have Fine Grained Access to the
|
|
304
|
+
# underlying data goverened by this data policy. Uses the [IAM V2 principal
|
|
305
|
+
# syntax](https://cloud.google.com/iam/docs/principal-identifiers#v2) Only
|
|
306
|
+
# supports principal types users, groups, serviceaccounts, cloudidentity. This
|
|
307
|
+
# field is supported in V2 Data Policy only. In case of V1 data policies (i.e.
|
|
308
|
+
# verion = 1 and policy_tag is set), this field is not populated.
|
|
309
|
+
# Corresponds to the JSON property `grantees`
|
|
310
|
+
# @return [Array<String>]
|
|
311
|
+
attr_accessor :grantees
|
|
312
|
+
|
|
313
|
+
# Identifier. Resource name of this data policy, in the format of `projects/`
|
|
314
|
+
# project_number`/locations/`location_id`/dataPolicies/`data_policy_id``.
|
|
315
|
+
# Corresponds to the JSON property `name`
|
|
316
|
+
# @return [String]
|
|
317
|
+
attr_accessor :name
|
|
318
|
+
|
|
319
|
+
# Output only. Policy tag resource name, in the format of `projects/`
|
|
320
|
+
# project_number`/locations/`location_id`/taxonomies/`taxonomy_id`/policyTags/`
|
|
321
|
+
# policyTag_id``. policy_tag is supported only for V1 data policies.
|
|
322
|
+
# Corresponds to the JSON property `policyTag`
|
|
323
|
+
# @return [String]
|
|
324
|
+
attr_accessor :policy_tag
|
|
325
|
+
|
|
326
|
+
# Output only. The version of the Data Policy resource.
|
|
327
|
+
# Corresponds to the JSON property `version`
|
|
328
|
+
# @return [String]
|
|
329
|
+
attr_accessor :version
|
|
330
|
+
|
|
331
|
+
def initialize(**args)
|
|
332
|
+
update!(**args)
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# Update properties of this object
|
|
336
|
+
def update!(**args)
|
|
337
|
+
@data_masking_policy = args[:data_masking_policy] if args.key?(:data_masking_policy)
|
|
338
|
+
@data_policy_id = args[:data_policy_id] if args.key?(:data_policy_id)
|
|
339
|
+
@data_policy_type = args[:data_policy_type] if args.key?(:data_policy_type)
|
|
340
|
+
@etag = args[:etag] if args.key?(:etag)
|
|
341
|
+
@grantees = args[:grantees] if args.key?(:grantees)
|
|
342
|
+
@name = args[:name] if args.key?(:name)
|
|
343
|
+
@policy_tag = args[:policy_tag] if args.key?(:policy_tag)
|
|
344
|
+
@version = args[:version] if args.key?(:version)
|
|
345
|
+
end
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
|
349
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
|
350
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
|
351
|
+
# protobuf.Empty) returns (google.protobuf.Empty); `
|
|
352
|
+
class Empty
|
|
353
|
+
include Google::Apis::Core::Hashable
|
|
354
|
+
|
|
355
|
+
def initialize(**args)
|
|
356
|
+
update!(**args)
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
# Update properties of this object
|
|
360
|
+
def update!(**args)
|
|
361
|
+
end
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
|
365
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
|
366
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
|
367
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
|
368
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
|
369
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
|
370
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
|
371
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
|
372
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
|
373
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
|
374
|
+
# string" description: "Create a notification string with a timestamp."
|
|
375
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
|
376
|
+
# exact variables and functions that may be referenced within an expression are
|
|
377
|
+
# determined by the service that evaluates it. See the service documentation for
|
|
378
|
+
# additional information.
|
|
379
|
+
class Expr
|
|
380
|
+
include Google::Apis::Core::Hashable
|
|
381
|
+
|
|
382
|
+
# Optional. Description of the expression. This is a longer text which describes
|
|
383
|
+
# the expression, e.g. when hovered over it in a UI.
|
|
384
|
+
# Corresponds to the JSON property `description`
|
|
385
|
+
# @return [String]
|
|
386
|
+
attr_accessor :description
|
|
387
|
+
|
|
388
|
+
# Textual representation of an expression in Common Expression Language syntax.
|
|
389
|
+
# Corresponds to the JSON property `expression`
|
|
390
|
+
# @return [String]
|
|
391
|
+
attr_accessor :expression
|
|
392
|
+
|
|
393
|
+
# Optional. String indicating the location of the expression for error reporting,
|
|
394
|
+
# e.g. a file name and a position in the file.
|
|
395
|
+
# Corresponds to the JSON property `location`
|
|
396
|
+
# @return [String]
|
|
397
|
+
attr_accessor :location
|
|
398
|
+
|
|
399
|
+
# Optional. Title for the expression, i.e. a short string describing its purpose.
|
|
400
|
+
# This can be used e.g. in UIs which allow to enter the expression.
|
|
401
|
+
# Corresponds to the JSON property `title`
|
|
402
|
+
# @return [String]
|
|
403
|
+
attr_accessor :title
|
|
404
|
+
|
|
405
|
+
def initialize(**args)
|
|
406
|
+
update!(**args)
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
# Update properties of this object
|
|
410
|
+
def update!(**args)
|
|
411
|
+
@description = args[:description] if args.key?(:description)
|
|
412
|
+
@expression = args[:expression] if args.key?(:expression)
|
|
413
|
+
@location = args[:location] if args.key?(:location)
|
|
414
|
+
@title = args[:title] if args.key?(:title)
|
|
415
|
+
end
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
# Request message for `GetIamPolicy` method.
|
|
419
|
+
class GetIamPolicyRequest
|
|
420
|
+
include Google::Apis::Core::Hashable
|
|
421
|
+
|
|
422
|
+
# Encapsulates settings provided to GetIamPolicy.
|
|
423
|
+
# Corresponds to the JSON property `options`
|
|
424
|
+
# @return [Google::Apis::BigquerydatapolicyV2::GetPolicyOptions]
|
|
425
|
+
attr_accessor :options
|
|
426
|
+
|
|
427
|
+
def initialize(**args)
|
|
428
|
+
update!(**args)
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
# Update properties of this object
|
|
432
|
+
def update!(**args)
|
|
433
|
+
@options = args[:options] if args.key?(:options)
|
|
434
|
+
end
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
# Encapsulates settings provided to GetIamPolicy.
|
|
438
|
+
class GetPolicyOptions
|
|
439
|
+
include Google::Apis::Core::Hashable
|
|
440
|
+
|
|
441
|
+
# Optional. The maximum policy version that will be used to format the policy.
|
|
442
|
+
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
|
|
443
|
+
# rejected. Requests for policies with any conditional role bindings must
|
|
444
|
+
# specify version 3. Policies with no conditional role bindings may specify any
|
|
445
|
+
# valid value or leave the field unset. The policy in the response might use the
|
|
446
|
+
# policy version that you specified, or it might use a lower policy version. For
|
|
447
|
+
# example, if you specify version 3, but the policy has no conditional role
|
|
448
|
+
# bindings, the response uses version 1. To learn which resources support
|
|
449
|
+
# conditions in their IAM policies, see the [IAM documentation](https://cloud.
|
|
450
|
+
# google.com/iam/help/conditions/resource-policies).
|
|
451
|
+
# Corresponds to the JSON property `requestedPolicyVersion`
|
|
452
|
+
# @return [Fixnum]
|
|
453
|
+
attr_accessor :requested_policy_version
|
|
454
|
+
|
|
455
|
+
def initialize(**args)
|
|
456
|
+
update!(**args)
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
# Update properties of this object
|
|
460
|
+
def update!(**args)
|
|
461
|
+
@requested_policy_version = args[:requested_policy_version] if args.key?(:requested_policy_version)
|
|
462
|
+
end
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
# Response message for the ListDataPolicies method.
|
|
466
|
+
class ListDataPoliciesResponse
|
|
467
|
+
include Google::Apis::Core::Hashable
|
|
468
|
+
|
|
469
|
+
# Data policies that belong to the requested project.
|
|
470
|
+
# Corresponds to the JSON property `dataPolicies`
|
|
471
|
+
# @return [Array<Google::Apis::BigquerydatapolicyV2::DataPolicy>]
|
|
472
|
+
attr_accessor :data_policies
|
|
473
|
+
|
|
474
|
+
# Token used to retrieve the next page of results, or empty if there are no more
|
|
475
|
+
# results.
|
|
476
|
+
# Corresponds to the JSON property `nextPageToken`
|
|
477
|
+
# @return [String]
|
|
478
|
+
attr_accessor :next_page_token
|
|
479
|
+
|
|
480
|
+
def initialize(**args)
|
|
481
|
+
update!(**args)
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
# Update properties of this object
|
|
485
|
+
def update!(**args)
|
|
486
|
+
@data_policies = args[:data_policies] if args.key?(:data_policies)
|
|
487
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
|
488
|
+
end
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
# An Identity and Access Management (IAM) policy, which specifies access
|
|
492
|
+
# controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
|
|
493
|
+
# A `binding` binds one or more `members`, or principals, to a single `role`.
|
|
494
|
+
# Principals can be user accounts, service accounts, Google groups, and domains (
|
|
495
|
+
# such as G Suite). A `role` is a named list of permissions; each `role` can be
|
|
496
|
+
# an IAM predefined role or a user-created custom role. For some types of Google
|
|
497
|
+
# Cloud resources, a `binding` can also specify a `condition`, which is a
|
|
498
|
+
# logical expression that allows access to a resource only if the expression
|
|
499
|
+
# evaluates to `true`. A condition can add constraints based on attributes of
|
|
500
|
+
# the request, the resource, or both. To learn which resources support
|
|
501
|
+
# conditions in their IAM policies, see the [IAM documentation](https://cloud.
|
|
502
|
+
# google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
|
|
503
|
+
# bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
|
|
504
|
+
# "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
|
|
505
|
+
# serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
|
|
506
|
+
# roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
|
|
507
|
+
# ], "condition": ` "title": "expirable access", "description": "Does not grant
|
|
508
|
+
# access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
|
|
509
|
+
# 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
|
|
510
|
+
# example:** ``` bindings: - members: - user:mike@example.com - group:admins@
|
|
511
|
+
# example.com - domain:google.com - serviceAccount:my-project-id@appspot.
|
|
512
|
+
# gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
|
|
513
|
+
# user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
|
|
514
|
+
# title: expirable access description: Does not grant access after Sep 2020
|
|
515
|
+
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
|
|
516
|
+
# BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
|
|
517
|
+
# [IAM documentation](https://cloud.google.com/iam/docs/).
|
|
518
|
+
class Policy
|
|
519
|
+
include Google::Apis::Core::Hashable
|
|
520
|
+
|
|
521
|
+
# Specifies cloud audit logging configuration for this policy.
|
|
522
|
+
# Corresponds to the JSON property `auditConfigs`
|
|
523
|
+
# @return [Array<Google::Apis::BigquerydatapolicyV2::AuditConfig>]
|
|
524
|
+
attr_accessor :audit_configs
|
|
525
|
+
|
|
526
|
+
# Associates a list of `members`, or principals, with a `role`. Optionally, may
|
|
527
|
+
# specify a `condition` that determines how and when the `bindings` are applied.
|
|
528
|
+
# Each of the `bindings` must contain at least one principal. The `bindings` in
|
|
529
|
+
# a `Policy` can refer to up to 1,500 principals; up to 250 of these principals
|
|
530
|
+
# can be Google groups. Each occurrence of a principal counts towards these
|
|
531
|
+
# limits. For example, if the `bindings` grant 50 different roles to `user:alice@
|
|
532
|
+
# example.com`, and not to any other principal, then you can add another 1,450
|
|
533
|
+
# principals to the `bindings` in the `Policy`.
|
|
534
|
+
# Corresponds to the JSON property `bindings`
|
|
535
|
+
# @return [Array<Google::Apis::BigquerydatapolicyV2::Binding>]
|
|
536
|
+
attr_accessor :bindings
|
|
537
|
+
|
|
538
|
+
# `etag` is used for optimistic concurrency control as a way to help prevent
|
|
539
|
+
# simultaneous updates of a policy from overwriting each other. It is strongly
|
|
540
|
+
# suggested that systems make use of the `etag` in the read-modify-write cycle
|
|
541
|
+
# to perform policy updates in order to avoid race conditions: An `etag` is
|
|
542
|
+
# returned in the response to `getIamPolicy`, and systems are expected to put
|
|
543
|
+
# that etag in the request to `setIamPolicy` to ensure that their change will be
|
|
544
|
+
# applied to the same version of the policy. **Important:** If you use IAM
|
|
545
|
+
# Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
|
|
546
|
+
# If you omit this field, then IAM allows you to overwrite a version `3` policy
|
|
547
|
+
# with a version `1` policy, and all of the conditions in the version `3` policy
|
|
548
|
+
# are lost.
|
|
549
|
+
# Corresponds to the JSON property `etag`
|
|
550
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
|
551
|
+
# @return [String]
|
|
552
|
+
attr_accessor :etag
|
|
553
|
+
|
|
554
|
+
# Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
|
|
555
|
+
# Requests that specify an invalid value are rejected. Any operation that
|
|
556
|
+
# affects conditional role bindings must specify version `3`. This requirement
|
|
557
|
+
# applies to the following operations: * Getting a policy that includes a
|
|
558
|
+
# conditional role binding * Adding a conditional role binding to a policy *
|
|
559
|
+
# Changing a conditional role binding in a policy * Removing any role binding,
|
|
560
|
+
# with or without a condition, from a policy that includes conditions **
|
|
561
|
+
# Important:** If you use IAM Conditions, you must include the `etag` field
|
|
562
|
+
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
|
|
563
|
+
# to overwrite a version `3` policy with a version `1` policy, and all of the
|
|
564
|
+
# conditions in the version `3` policy are lost. If a policy does not include
|
|
565
|
+
# any conditions, operations on that policy may specify any valid version or
|
|
566
|
+
# leave the field unset. To learn which resources support conditions in their
|
|
567
|
+
# IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
|
|
568
|
+
# conditions/resource-policies).
|
|
569
|
+
# Corresponds to the JSON property `version`
|
|
570
|
+
# @return [Fixnum]
|
|
571
|
+
attr_accessor :version
|
|
572
|
+
|
|
573
|
+
def initialize(**args)
|
|
574
|
+
update!(**args)
|
|
575
|
+
end
|
|
576
|
+
|
|
577
|
+
# Update properties of this object
|
|
578
|
+
def update!(**args)
|
|
579
|
+
@audit_configs = args[:audit_configs] if args.key?(:audit_configs)
|
|
580
|
+
@bindings = args[:bindings] if args.key?(:bindings)
|
|
581
|
+
@etag = args[:etag] if args.key?(:etag)
|
|
582
|
+
@version = args[:version] if args.key?(:version)
|
|
583
|
+
end
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
# Request message for the RemoveGrantees method.
|
|
587
|
+
class RemoveGranteesRequest
|
|
588
|
+
include Google::Apis::Core::Hashable
|
|
589
|
+
|
|
590
|
+
# Required. IAM principal that should be revoked from Fine Grained Access to the
|
|
591
|
+
# underlying data goverened by the data policy. The target data policy is
|
|
592
|
+
# determined by the `data_policy` field. Uses the [IAM V2 principal syntax](
|
|
593
|
+
# https://cloud.google.com/iam/docs/principal-identifiers#v2). Supported
|
|
594
|
+
# principal types: * User * Group * Service account
|
|
595
|
+
# Corresponds to the JSON property `grantees`
|
|
596
|
+
# @return [Array<String>]
|
|
597
|
+
attr_accessor :grantees
|
|
598
|
+
|
|
599
|
+
def initialize(**args)
|
|
600
|
+
update!(**args)
|
|
601
|
+
end
|
|
602
|
+
|
|
603
|
+
# Update properties of this object
|
|
604
|
+
def update!(**args)
|
|
605
|
+
@grantees = args[:grantees] if args.key?(:grantees)
|
|
606
|
+
end
|
|
607
|
+
end
|
|
608
|
+
|
|
609
|
+
# Request message for `SetIamPolicy` method.
|
|
610
|
+
class SetIamPolicyRequest
|
|
611
|
+
include Google::Apis::Core::Hashable
|
|
612
|
+
|
|
613
|
+
# An Identity and Access Management (IAM) policy, which specifies access
|
|
614
|
+
# controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
|
|
615
|
+
# A `binding` binds one or more `members`, or principals, to a single `role`.
|
|
616
|
+
# Principals can be user accounts, service accounts, Google groups, and domains (
|
|
617
|
+
# such as G Suite). A `role` is a named list of permissions; each `role` can be
|
|
618
|
+
# an IAM predefined role or a user-created custom role. For some types of Google
|
|
619
|
+
# Cloud resources, a `binding` can also specify a `condition`, which is a
|
|
620
|
+
# logical expression that allows access to a resource only if the expression
|
|
621
|
+
# evaluates to `true`. A condition can add constraints based on attributes of
|
|
622
|
+
# the request, the resource, or both. To learn which resources support
|
|
623
|
+
# conditions in their IAM policies, see the [IAM documentation](https://cloud.
|
|
624
|
+
# google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
|
|
625
|
+
# bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
|
|
626
|
+
# "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
|
|
627
|
+
# serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
|
|
628
|
+
# roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
|
|
629
|
+
# ], "condition": ` "title": "expirable access", "description": "Does not grant
|
|
630
|
+
# access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
|
|
631
|
+
# 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
|
|
632
|
+
# example:** ``` bindings: - members: - user:mike@example.com - group:admins@
|
|
633
|
+
# example.com - domain:google.com - serviceAccount:my-project-id@appspot.
|
|
634
|
+
# gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
|
|
635
|
+
# user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
|
|
636
|
+
# title: expirable access description: Does not grant access after Sep 2020
|
|
637
|
+
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
|
|
638
|
+
# BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
|
|
639
|
+
# [IAM documentation](https://cloud.google.com/iam/docs/).
|
|
640
|
+
# Corresponds to the JSON property `policy`
|
|
641
|
+
# @return [Google::Apis::BigquerydatapolicyV2::Policy]
|
|
642
|
+
attr_accessor :policy
|
|
643
|
+
|
|
644
|
+
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
|
645
|
+
# the fields in the mask will be modified. If no mask is provided, the following
|
|
646
|
+
# default mask is used: `paths: "bindings, etag"`
|
|
647
|
+
# Corresponds to the JSON property `updateMask`
|
|
648
|
+
# @return [String]
|
|
649
|
+
attr_accessor :update_mask
|
|
650
|
+
|
|
651
|
+
def initialize(**args)
|
|
652
|
+
update!(**args)
|
|
653
|
+
end
|
|
654
|
+
|
|
655
|
+
# Update properties of this object
|
|
656
|
+
def update!(**args)
|
|
657
|
+
@policy = args[:policy] if args.key?(:policy)
|
|
658
|
+
@update_mask = args[:update_mask] if args.key?(:update_mask)
|
|
659
|
+
end
|
|
660
|
+
end
|
|
661
|
+
|
|
662
|
+
# Request message for `TestIamPermissions` method.
|
|
663
|
+
class TestIamPermissionsRequest
|
|
664
|
+
include Google::Apis::Core::Hashable
|
|
665
|
+
|
|
666
|
+
# The set of permissions to check for the `resource`. Permissions with wildcards
|
|
667
|
+
# (such as `*` or `storage.*`) are not allowed. For more information see [IAM
|
|
668
|
+
# Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
|
669
|
+
# Corresponds to the JSON property `permissions`
|
|
670
|
+
# @return [Array<String>]
|
|
671
|
+
attr_accessor :permissions
|
|
672
|
+
|
|
673
|
+
def initialize(**args)
|
|
674
|
+
update!(**args)
|
|
675
|
+
end
|
|
676
|
+
|
|
677
|
+
# Update properties of this object
|
|
678
|
+
def update!(**args)
|
|
679
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
|
680
|
+
end
|
|
681
|
+
end
|
|
682
|
+
|
|
683
|
+
# Response message for `TestIamPermissions` method.
|
|
684
|
+
class TestIamPermissionsResponse
|
|
685
|
+
include Google::Apis::Core::Hashable
|
|
686
|
+
|
|
687
|
+
# A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
|
|
688
|
+
# Corresponds to the JSON property `permissions`
|
|
689
|
+
# @return [Array<String>]
|
|
690
|
+
attr_accessor :permissions
|
|
691
|
+
|
|
692
|
+
def initialize(**args)
|
|
693
|
+
update!(**args)
|
|
694
|
+
end
|
|
695
|
+
|
|
696
|
+
# Update properties of this object
|
|
697
|
+
def update!(**args)
|
|
698
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
|
699
|
+
end
|
|
700
|
+
end
|
|
701
|
+
end
|
|
702
|
+
end
|
|
703
|
+
end
|