google-apis-cloudasset_v1 0.50.0 → 0.51.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -179,6 +179,188 @@ module Google
|
|
179
179
|
end
|
180
180
|
end
|
181
181
|
|
182
|
+
# The response message for AssetService.AnalyzeOrgPolicies.
|
183
|
+
class AnalyzeOrgPoliciesResponse
|
184
|
+
include Google::Apis::Core::Hashable
|
185
|
+
|
186
|
+
# The organization policy constraint definition.
|
187
|
+
# Corresponds to the JSON property `constraint`
|
188
|
+
# @return [Google::Apis::CloudassetV1::AnalyzerOrgPolicyConstraint]
|
189
|
+
attr_accessor :constraint
|
190
|
+
|
191
|
+
# The page token to fetch the next page for AnalyzeOrgPoliciesResponse.
|
192
|
+
# org_policy_results.
|
193
|
+
# Corresponds to the JSON property `nextPageToken`
|
194
|
+
# @return [String]
|
195
|
+
attr_accessor :next_page_token
|
196
|
+
|
197
|
+
# The organization policies under the AnalyzeOrgPoliciesRequest.scope with the
|
198
|
+
# AnalyzeOrgPoliciesRequest.constraint.
|
199
|
+
# Corresponds to the JSON property `orgPolicyResults`
|
200
|
+
# @return [Array<Google::Apis::CloudassetV1::OrgPolicyResult>]
|
201
|
+
attr_accessor :org_policy_results
|
202
|
+
|
203
|
+
def initialize(**args)
|
204
|
+
update!(**args)
|
205
|
+
end
|
206
|
+
|
207
|
+
# Update properties of this object
|
208
|
+
def update!(**args)
|
209
|
+
@constraint = args[:constraint] if args.key?(:constraint)
|
210
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
211
|
+
@org_policy_results = args[:org_policy_results] if args.key?(:org_policy_results)
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
# The response message for AssetService.AnalyzeOrgPolicyGovernedAssets.
|
216
|
+
class AnalyzeOrgPolicyGovernedAssetsResponse
|
217
|
+
include Google::Apis::Core::Hashable
|
218
|
+
|
219
|
+
# The organization policy constraint definition.
|
220
|
+
# Corresponds to the JSON property `constraint`
|
221
|
+
# @return [Google::Apis::CloudassetV1::AnalyzerOrgPolicyConstraint]
|
222
|
+
attr_accessor :constraint
|
223
|
+
|
224
|
+
# The list of the analyzed governed assets.
|
225
|
+
# Corresponds to the JSON property `governedAssets`
|
226
|
+
# @return [Array<Google::Apis::CloudassetV1::GoogleCloudAssetV1AnalyzeOrgPolicyGovernedAssetsResponseGovernedAsset>]
|
227
|
+
attr_accessor :governed_assets
|
228
|
+
|
229
|
+
# The page token to fetch the next page for
|
230
|
+
# AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets.
|
231
|
+
# Corresponds to the JSON property `nextPageToken`
|
232
|
+
# @return [String]
|
233
|
+
attr_accessor :next_page_token
|
234
|
+
|
235
|
+
def initialize(**args)
|
236
|
+
update!(**args)
|
237
|
+
end
|
238
|
+
|
239
|
+
# Update properties of this object
|
240
|
+
def update!(**args)
|
241
|
+
@constraint = args[:constraint] if args.key?(:constraint)
|
242
|
+
@governed_assets = args[:governed_assets] if args.key?(:governed_assets)
|
243
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
# The response message for AssetService.AnalyzeOrgPolicyGovernedContainers.
|
248
|
+
class AnalyzeOrgPolicyGovernedContainersResponse
|
249
|
+
include Google::Apis::Core::Hashable
|
250
|
+
|
251
|
+
# The organization policy constraint definition.
|
252
|
+
# Corresponds to the JSON property `constraint`
|
253
|
+
# @return [Google::Apis::CloudassetV1::AnalyzerOrgPolicyConstraint]
|
254
|
+
attr_accessor :constraint
|
255
|
+
|
256
|
+
# The list of the analyzed governed containers.
|
257
|
+
# Corresponds to the JSON property `governedContainers`
|
258
|
+
# @return [Array<Google::Apis::CloudassetV1::GoogleCloudAssetV1GovernedContainer>]
|
259
|
+
attr_accessor :governed_containers
|
260
|
+
|
261
|
+
# The page token to fetch the next page for
|
262
|
+
# AnalyzeOrgPolicyGovernedContainersResponse.governed_containers.
|
263
|
+
# Corresponds to the JSON property `nextPageToken`
|
264
|
+
# @return [String]
|
265
|
+
attr_accessor :next_page_token
|
266
|
+
|
267
|
+
def initialize(**args)
|
268
|
+
update!(**args)
|
269
|
+
end
|
270
|
+
|
271
|
+
# Update properties of this object
|
272
|
+
def update!(**args)
|
273
|
+
@constraint = args[:constraint] if args.key?(:constraint)
|
274
|
+
@governed_containers = args[:governed_containers] if args.key?(:governed_containers)
|
275
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
279
|
+
# This organization policy message is a modified version of the one defined in
|
280
|
+
# the OrgPolicy system. This message contains several fields defined in the
|
281
|
+
# original organization policy with some new fields for analysis purpose.
|
282
|
+
class AnalyzerOrgPolicy
|
283
|
+
include Google::Apis::Core::Hashable
|
284
|
+
|
285
|
+
# The [full resource name] (https://cloud.google.com/asset-inventory/docs/
|
286
|
+
# resource-name-format) of an organization/folder/project resource where this
|
287
|
+
# organization policy applies to. For any user defined org policies, this field
|
288
|
+
# has the same value as the [attached_resource] field. Only for default policy,
|
289
|
+
# this field has the different value.
|
290
|
+
# Corresponds to the JSON property `appliedResource`
|
291
|
+
# @return [String]
|
292
|
+
attr_accessor :applied_resource
|
293
|
+
|
294
|
+
# The [full resource name] (https://cloud.google.com/asset-inventory/docs/
|
295
|
+
# resource-name-format) of an organization/folder/project resource where this
|
296
|
+
# organization policy is set. Notice that some type of constraints are defined
|
297
|
+
# with default policy. This field will be empty for them.
|
298
|
+
# Corresponds to the JSON property `attachedResource`
|
299
|
+
# @return [String]
|
300
|
+
attr_accessor :attached_resource
|
301
|
+
|
302
|
+
# If `inherit_from_parent` is true, Rules set higher up in the hierarchy (up to
|
303
|
+
# the closest root) are inherited and present in the effective policy. If it is
|
304
|
+
# false, then no rules are inherited, and this policy becomes the effective root
|
305
|
+
# for evaluation.
|
306
|
+
# Corresponds to the JSON property `inheritFromParent`
|
307
|
+
# @return [Boolean]
|
308
|
+
attr_accessor :inherit_from_parent
|
309
|
+
alias_method :inherit_from_parent?, :inherit_from_parent
|
310
|
+
|
311
|
+
# Ignores policies set above this resource and restores the default behavior of
|
312
|
+
# the constraint at this resource. This field can be set in policies for either
|
313
|
+
# list or boolean constraints. If set, `rules` must be empty and `
|
314
|
+
# inherit_from_parent` must be set to false.
|
315
|
+
# Corresponds to the JSON property `reset`
|
316
|
+
# @return [Boolean]
|
317
|
+
attr_accessor :reset
|
318
|
+
alias_method :reset?, :reset
|
319
|
+
|
320
|
+
# List of rules for this organization policy.
|
321
|
+
# Corresponds to the JSON property `rules`
|
322
|
+
# @return [Array<Google::Apis::CloudassetV1::GoogleCloudAssetV1Rule>]
|
323
|
+
attr_accessor :rules
|
324
|
+
|
325
|
+
def initialize(**args)
|
326
|
+
update!(**args)
|
327
|
+
end
|
328
|
+
|
329
|
+
# Update properties of this object
|
330
|
+
def update!(**args)
|
331
|
+
@applied_resource = args[:applied_resource] if args.key?(:applied_resource)
|
332
|
+
@attached_resource = args[:attached_resource] if args.key?(:attached_resource)
|
333
|
+
@inherit_from_parent = args[:inherit_from_parent] if args.key?(:inherit_from_parent)
|
334
|
+
@reset = args[:reset] if args.key?(:reset)
|
335
|
+
@rules = args[:rules] if args.key?(:rules)
|
336
|
+
end
|
337
|
+
end
|
338
|
+
|
339
|
+
# The organization policy constraint definition.
|
340
|
+
class AnalyzerOrgPolicyConstraint
|
341
|
+
include Google::Apis::Core::Hashable
|
342
|
+
|
343
|
+
# The definition of a custom constraint.
|
344
|
+
# Corresponds to the JSON property `customConstraint`
|
345
|
+
# @return [Google::Apis::CloudassetV1::GoogleCloudAssetV1CustomConstraint]
|
346
|
+
attr_accessor :custom_constraint
|
347
|
+
|
348
|
+
# The definition of a constraint.
|
349
|
+
# Corresponds to the JSON property `googleDefinedConstraint`
|
350
|
+
# @return [Google::Apis::CloudassetV1::GoogleCloudAssetV1Constraint]
|
351
|
+
attr_accessor :google_defined_constraint
|
352
|
+
|
353
|
+
def initialize(**args)
|
354
|
+
update!(**args)
|
355
|
+
end
|
356
|
+
|
357
|
+
# Update properties of this object
|
358
|
+
def update!(**args)
|
359
|
+
@custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
|
360
|
+
@google_defined_constraint = args[:google_defined_constraint] if args.key?(:google_defined_constraint)
|
361
|
+
end
|
362
|
+
end
|
363
|
+
|
182
364
|
# An asset in Google Cloud. An asset can be any resource in the Google Cloud [
|
183
365
|
# resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-
|
184
366
|
# platform-resource-hierarchy), a resource outside the Google Cloud resource
|
@@ -1181,6 +1363,184 @@ module Google
|
|
1181
1363
|
end
|
1182
1364
|
end
|
1183
1365
|
|
1366
|
+
# Represents a GCP asset(resource or IAM policy) governed by the organization
|
1367
|
+
# policies of the AnalyzeOrgPolicyGovernedAssetsRequest.constraint.
|
1368
|
+
class GoogleCloudAssetV1AnalyzeOrgPolicyGovernedAssetsResponseGovernedAsset
|
1369
|
+
include Google::Apis::Core::Hashable
|
1370
|
+
|
1371
|
+
# This organization policy message is a modified version of the one defined in
|
1372
|
+
# the OrgPolicy system. This message contains several fields defined in the
|
1373
|
+
# original organization policy with some new fields for analysis purpose.
|
1374
|
+
# Corresponds to the JSON property `consolidatedPolicy`
|
1375
|
+
# @return [Google::Apis::CloudassetV1::AnalyzerOrgPolicy]
|
1376
|
+
attr_accessor :consolidated_policy
|
1377
|
+
|
1378
|
+
# The IAM policies governed by the organization policies of the
|
1379
|
+
# AnalyzeOrgPolicyGovernedAssetsRequest.constraint.
|
1380
|
+
# Corresponds to the JSON property `governedIamPolicy`
|
1381
|
+
# @return [Google::Apis::CloudassetV1::GoogleCloudAssetV1AnalyzeOrgPolicyGovernedAssetsResponseGovernedIamPolicy]
|
1382
|
+
attr_accessor :governed_iam_policy
|
1383
|
+
|
1384
|
+
# The GCP resources governed by the organization policies of the
|
1385
|
+
# AnalyzeOrgPolicyGovernedAssetsRequest.constraint.
|
1386
|
+
# Corresponds to the JSON property `governedResource`
|
1387
|
+
# @return [Google::Apis::CloudassetV1::GoogleCloudAssetV1AnalyzeOrgPolicyGovernedAssetsResponseGovernedResource]
|
1388
|
+
attr_accessor :governed_resource
|
1389
|
+
|
1390
|
+
# The ordered list of all organization policies from the
|
1391
|
+
# AnalyzeOrgPoliciesResponse.OrgPolicyResult.consolidated_policy.
|
1392
|
+
# attached_resource to the scope specified in the request. If the constraint is
|
1393
|
+
# defined with default policy, it will also appear in the list.
|
1394
|
+
# Corresponds to the JSON property `policyBundle`
|
1395
|
+
# @return [Array<Google::Apis::CloudassetV1::AnalyzerOrgPolicy>]
|
1396
|
+
attr_accessor :policy_bundle
|
1397
|
+
|
1398
|
+
def initialize(**args)
|
1399
|
+
update!(**args)
|
1400
|
+
end
|
1401
|
+
|
1402
|
+
# Update properties of this object
|
1403
|
+
def update!(**args)
|
1404
|
+
@consolidated_policy = args[:consolidated_policy] if args.key?(:consolidated_policy)
|
1405
|
+
@governed_iam_policy = args[:governed_iam_policy] if args.key?(:governed_iam_policy)
|
1406
|
+
@governed_resource = args[:governed_resource] if args.key?(:governed_resource)
|
1407
|
+
@policy_bundle = args[:policy_bundle] if args.key?(:policy_bundle)
|
1408
|
+
end
|
1409
|
+
end
|
1410
|
+
|
1411
|
+
# The IAM policies governed by the organization policies of the
|
1412
|
+
# AnalyzeOrgPolicyGovernedAssetsRequest.constraint.
|
1413
|
+
class GoogleCloudAssetV1AnalyzeOrgPolicyGovernedAssetsResponseGovernedIamPolicy
|
1414
|
+
include Google::Apis::Core::Hashable
|
1415
|
+
|
1416
|
+
# The full resource name of the resource associated with this IAM policy.
|
1417
|
+
# Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/
|
1418
|
+
# instances/instance1`. See [Cloud Asset Inventory Resource Name Format](https://
|
1419
|
+
# cloud.google.com/asset-inventory/docs/resource-name-format) for more
|
1420
|
+
# information.
|
1421
|
+
# Corresponds to the JSON property `attachedResource`
|
1422
|
+
# @return [String]
|
1423
|
+
attr_accessor :attached_resource
|
1424
|
+
|
1425
|
+
# The folder(s) that this IAM policy belongs to, in the form of folders/`
|
1426
|
+
# FOLDER_NUMBER`. This field is available when the IAM policy belongs(directly
|
1427
|
+
# or cascadingly) to one or more folders.
|
1428
|
+
# Corresponds to the JSON property `folders`
|
1429
|
+
# @return [Array<String>]
|
1430
|
+
attr_accessor :folders
|
1431
|
+
|
1432
|
+
# The organization that this IAM policy belongs to, in the form of organizations/
|
1433
|
+
# `ORGANIZATION_NUMBER`. This field is available when the IAM policy belongs(
|
1434
|
+
# directly or cascadingly) to an organization.
|
1435
|
+
# Corresponds to the JSON property `organization`
|
1436
|
+
# @return [String]
|
1437
|
+
attr_accessor :organization
|
1438
|
+
|
1439
|
+
# An Identity and Access Management (IAM) policy, which specifies access
|
1440
|
+
# controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
|
1441
|
+
# A `binding` binds one or more `members`, or principals, to a single `role`.
|
1442
|
+
# Principals can be user accounts, service accounts, Google groups, and domains (
|
1443
|
+
# such as G Suite). A `role` is a named list of permissions; each `role` can be
|
1444
|
+
# an IAM predefined role or a user-created custom role. For some types of Google
|
1445
|
+
# Cloud resources, a `binding` can also specify a `condition`, which is a
|
1446
|
+
# logical expression that allows access to a resource only if the expression
|
1447
|
+
# evaluates to `true`. A condition can add constraints based on attributes of
|
1448
|
+
# the request, the resource, or both. To learn which resources support
|
1449
|
+
# conditions in their IAM policies, see the [IAM documentation](https://cloud.
|
1450
|
+
# google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
|
1451
|
+
# bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
|
1452
|
+
# "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
|
1453
|
+
# serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
|
1454
|
+
# roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
|
1455
|
+
# ], "condition": ` "title": "expirable access", "description": "Does not grant
|
1456
|
+
# access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
|
1457
|
+
# 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
|
1458
|
+
# bindings: - members: - user:mike@example.com - group:admins@example.com -
|
1459
|
+
# domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
|
1460
|
+
# role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
|
1461
|
+
# com role: roles/resourcemanager.organizationViewer condition: title: expirable
|
1462
|
+
# access description: Does not grant access after Sep 2020 expression: request.
|
1463
|
+
# time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
|
1464
|
+
# a description of IAM and its features, see the [IAM documentation](https://
|
1465
|
+
# cloud.google.com/iam/docs/).
|
1466
|
+
# Corresponds to the JSON property `policy`
|
1467
|
+
# @return [Google::Apis::CloudassetV1::Policy]
|
1468
|
+
attr_accessor :policy
|
1469
|
+
|
1470
|
+
# The project that this IAM policy belongs to, in the form of projects/`
|
1471
|
+
# PROJECT_NUMBER`. This field is available when the IAM policy belongs to a
|
1472
|
+
# project.
|
1473
|
+
# Corresponds to the JSON property `project`
|
1474
|
+
# @return [String]
|
1475
|
+
attr_accessor :project
|
1476
|
+
|
1477
|
+
def initialize(**args)
|
1478
|
+
update!(**args)
|
1479
|
+
end
|
1480
|
+
|
1481
|
+
# Update properties of this object
|
1482
|
+
def update!(**args)
|
1483
|
+
@attached_resource = args[:attached_resource] if args.key?(:attached_resource)
|
1484
|
+
@folders = args[:folders] if args.key?(:folders)
|
1485
|
+
@organization = args[:organization] if args.key?(:organization)
|
1486
|
+
@policy = args[:policy] if args.key?(:policy)
|
1487
|
+
@project = args[:project] if args.key?(:project)
|
1488
|
+
end
|
1489
|
+
end
|
1490
|
+
|
1491
|
+
# The GCP resources governed by the organization policies of the
|
1492
|
+
# AnalyzeOrgPolicyGovernedAssetsRequest.constraint.
|
1493
|
+
class GoogleCloudAssetV1AnalyzeOrgPolicyGovernedAssetsResponseGovernedResource
|
1494
|
+
include Google::Apis::Core::Hashable
|
1495
|
+
|
1496
|
+
# The folder(s) that this resource belongs to, in the form of folders/`
|
1497
|
+
# FOLDER_NUMBER`. This field is available when the resource belongs(directly or
|
1498
|
+
# cascadingly) to one or more folders.
|
1499
|
+
# Corresponds to the JSON property `folders`
|
1500
|
+
# @return [Array<String>]
|
1501
|
+
attr_accessor :folders
|
1502
|
+
|
1503
|
+
# The [full resource name] (https://cloud.google.com/asset-inventory/docs/
|
1504
|
+
# resource-name-format) of the GCP resource.
|
1505
|
+
# Corresponds to the JSON property `fullResourceName`
|
1506
|
+
# @return [String]
|
1507
|
+
attr_accessor :full_resource_name
|
1508
|
+
|
1509
|
+
# The organization that this resource belongs to, in the form of organizations/`
|
1510
|
+
# ORGANIZATION_NUMBER`. This field is available when the resource belongs(
|
1511
|
+
# directly or cascadingly) to an organization.
|
1512
|
+
# Corresponds to the JSON property `organization`
|
1513
|
+
# @return [String]
|
1514
|
+
attr_accessor :organization
|
1515
|
+
|
1516
|
+
# The [full resource name] (https://cloud.google.com/asset-inventory/docs/
|
1517
|
+
# resource-name-format) of the parent of AnalyzeOrgPolicyGovernedAssetsResponse.
|
1518
|
+
# GovernedResource.full_resource_name.
|
1519
|
+
# Corresponds to the JSON property `parent`
|
1520
|
+
# @return [String]
|
1521
|
+
attr_accessor :parent
|
1522
|
+
|
1523
|
+
# The project that this resource belongs to, in the form of projects/`
|
1524
|
+
# PROJECT_NUMBER`. This field is available when the resource belongs to a
|
1525
|
+
# project.
|
1526
|
+
# Corresponds to the JSON property `project`
|
1527
|
+
# @return [String]
|
1528
|
+
attr_accessor :project
|
1529
|
+
|
1530
|
+
def initialize(**args)
|
1531
|
+
update!(**args)
|
1532
|
+
end
|
1533
|
+
|
1534
|
+
# Update properties of this object
|
1535
|
+
def update!(**args)
|
1536
|
+
@folders = args[:folders] if args.key?(:folders)
|
1537
|
+
@full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
|
1538
|
+
@organization = args[:organization] if args.key?(:organization)
|
1539
|
+
@parent = args[:parent] if args.key?(:parent)
|
1540
|
+
@project = args[:project] if args.key?(:project)
|
1541
|
+
end
|
1542
|
+
end
|
1543
|
+
|
1184
1544
|
# A BigQuery destination.
|
1185
1545
|
class GoogleCloudAssetV1BigQueryDestination
|
1186
1546
|
include Google::Apis::Core::Hashable
|
@@ -1233,6 +1593,136 @@ module Google
|
|
1233
1593
|
end
|
1234
1594
|
end
|
1235
1595
|
|
1596
|
+
# A `Constraint` that is either enforced or not. For example a constraint `
|
1597
|
+
# constraints/compute.disableSerialPortAccess`. If it is enforced on a VM
|
1598
|
+
# instance, serial port connections will not be opened to that instance.
|
1599
|
+
class GoogleCloudAssetV1BooleanConstraint
|
1600
|
+
include Google::Apis::Core::Hashable
|
1601
|
+
|
1602
|
+
def initialize(**args)
|
1603
|
+
update!(**args)
|
1604
|
+
end
|
1605
|
+
|
1606
|
+
# Update properties of this object
|
1607
|
+
def update!(**args)
|
1608
|
+
end
|
1609
|
+
end
|
1610
|
+
|
1611
|
+
# The definition of a constraint.
|
1612
|
+
class GoogleCloudAssetV1Constraint
|
1613
|
+
include Google::Apis::Core::Hashable
|
1614
|
+
|
1615
|
+
# A `Constraint` that is either enforced or not. For example a constraint `
|
1616
|
+
# constraints/compute.disableSerialPortAccess`. If it is enforced on a VM
|
1617
|
+
# instance, serial port connections will not be opened to that instance.
|
1618
|
+
# Corresponds to the JSON property `booleanConstraint`
|
1619
|
+
# @return [Google::Apis::CloudassetV1::GoogleCloudAssetV1BooleanConstraint]
|
1620
|
+
attr_accessor :boolean_constraint
|
1621
|
+
|
1622
|
+
# The evaluation behavior of this constraint in the absence of 'Policy'.
|
1623
|
+
# Corresponds to the JSON property `constraintDefault`
|
1624
|
+
# @return [String]
|
1625
|
+
attr_accessor :constraint_default
|
1626
|
+
|
1627
|
+
# Detailed description of what this `Constraint` controls as well as how and
|
1628
|
+
# where it is enforced.
|
1629
|
+
# Corresponds to the JSON property `description`
|
1630
|
+
# @return [String]
|
1631
|
+
attr_accessor :description
|
1632
|
+
|
1633
|
+
# The human readable name of the constraint.
|
1634
|
+
# Corresponds to the JSON property `displayName`
|
1635
|
+
# @return [String]
|
1636
|
+
attr_accessor :display_name
|
1637
|
+
|
1638
|
+
# A `Constraint` that allows or disallows a list of string values, which are
|
1639
|
+
# configured by an Organization's policy administrator with a `Policy`.
|
1640
|
+
# Corresponds to the JSON property `listConstraint`
|
1641
|
+
# @return [Google::Apis::CloudassetV1::GoogleCloudAssetV1ListConstraint]
|
1642
|
+
attr_accessor :list_constraint
|
1643
|
+
|
1644
|
+
# The unique name of the constraint. Format of the name should be * `constraints/
|
1645
|
+
# `constraint_name`` For example, `constraints/compute.disableSerialPortAccess`.
|
1646
|
+
# Corresponds to the JSON property `name`
|
1647
|
+
# @return [String]
|
1648
|
+
attr_accessor :name
|
1649
|
+
|
1650
|
+
def initialize(**args)
|
1651
|
+
update!(**args)
|
1652
|
+
end
|
1653
|
+
|
1654
|
+
# Update properties of this object
|
1655
|
+
def update!(**args)
|
1656
|
+
@boolean_constraint = args[:boolean_constraint] if args.key?(:boolean_constraint)
|
1657
|
+
@constraint_default = args[:constraint_default] if args.key?(:constraint_default)
|
1658
|
+
@description = args[:description] if args.key?(:description)
|
1659
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
1660
|
+
@list_constraint = args[:list_constraint] if args.key?(:list_constraint)
|
1661
|
+
@name = args[:name] if args.key?(:name)
|
1662
|
+
end
|
1663
|
+
end
|
1664
|
+
|
1665
|
+
# The definition of a custom constraint.
|
1666
|
+
class GoogleCloudAssetV1CustomConstraint
|
1667
|
+
include Google::Apis::Core::Hashable
|
1668
|
+
|
1669
|
+
# Allow or deny type.
|
1670
|
+
# Corresponds to the JSON property `actionType`
|
1671
|
+
# @return [String]
|
1672
|
+
attr_accessor :action_type
|
1673
|
+
|
1674
|
+
# Organization policy condition/expression. For example: `resource.instanceName.
|
1675
|
+
# matches("[production|test]_.*_(\d)+")'` or, `resource.management.auto_upgrade =
|
1676
|
+
# = true`
|
1677
|
+
# Corresponds to the JSON property `condition`
|
1678
|
+
# @return [String]
|
1679
|
+
attr_accessor :condition
|
1680
|
+
|
1681
|
+
# Detailed information about this custom policy constraint.
|
1682
|
+
# Corresponds to the JSON property `description`
|
1683
|
+
# @return [String]
|
1684
|
+
attr_accessor :description
|
1685
|
+
|
1686
|
+
# One line display name for the UI.
|
1687
|
+
# Corresponds to the JSON property `displayName`
|
1688
|
+
# @return [String]
|
1689
|
+
attr_accessor :display_name
|
1690
|
+
|
1691
|
+
# All the operations being applied for this constraint.
|
1692
|
+
# Corresponds to the JSON property `methodTypes`
|
1693
|
+
# @return [Array<String>]
|
1694
|
+
attr_accessor :method_types
|
1695
|
+
|
1696
|
+
# Name of the constraint. This is unique within the organization. Format of the
|
1697
|
+
# name should be * `organizations/`organization_id`/customConstraints/`
|
1698
|
+
# custom_constraint_id`` Example : "organizations/123/customConstraints/custom.
|
1699
|
+
# createOnlyE2TypeVms"
|
1700
|
+
# Corresponds to the JSON property `name`
|
1701
|
+
# @return [String]
|
1702
|
+
attr_accessor :name
|
1703
|
+
|
1704
|
+
# The Resource Instance type on which this policy applies to. Format will be of
|
1705
|
+
# the form : "/" Example: * `compute.googleapis.com/Instance`.
|
1706
|
+
# Corresponds to the JSON property `resourceTypes`
|
1707
|
+
# @return [Array<String>]
|
1708
|
+
attr_accessor :resource_types
|
1709
|
+
|
1710
|
+
def initialize(**args)
|
1711
|
+
update!(**args)
|
1712
|
+
end
|
1713
|
+
|
1714
|
+
# Update properties of this object
|
1715
|
+
def update!(**args)
|
1716
|
+
@action_type = args[:action_type] if args.key?(:action_type)
|
1717
|
+
@condition = args[:condition] if args.key?(:condition)
|
1718
|
+
@description = args[:description] if args.key?(:description)
|
1719
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
1720
|
+
@method_types = args[:method_types] if args.key?(:method_types)
|
1721
|
+
@name = args[:name] if args.key?(:name)
|
1722
|
+
@resource_types = args[:resource_types] if args.key?(:resource_types)
|
1723
|
+
end
|
1724
|
+
end
|
1725
|
+
|
1236
1726
|
# A directional edge.
|
1237
1727
|
class GoogleCloudAssetV1Edge
|
1238
1728
|
include Google::Apis::Core::Hashable
|
@@ -1272,7 +1762,51 @@ module Google
|
|
1272
1762
|
# holds), it will be overwritten with the analysis result.
|
1273
1763
|
# Corresponds to the JSON property `uri`
|
1274
1764
|
# @return [String]
|
1275
|
-
attr_accessor :uri
|
1765
|
+
attr_accessor :uri
|
1766
|
+
|
1767
|
+
def initialize(**args)
|
1768
|
+
update!(**args)
|
1769
|
+
end
|
1770
|
+
|
1771
|
+
# Update properties of this object
|
1772
|
+
def update!(**args)
|
1773
|
+
@uri = args[:uri] if args.key?(:uri)
|
1774
|
+
end
|
1775
|
+
end
|
1776
|
+
|
1777
|
+
# The organization/folder/project resource governed by organization policies of
|
1778
|
+
# AnalyzeOrgPolicyGovernedContainersRequest.constraint.
|
1779
|
+
class GoogleCloudAssetV1GovernedContainer
|
1780
|
+
include Google::Apis::Core::Hashable
|
1781
|
+
|
1782
|
+
# This organization policy message is a modified version of the one defined in
|
1783
|
+
# the OrgPolicy system. This message contains several fields defined in the
|
1784
|
+
# original organization policy with some new fields for analysis purpose.
|
1785
|
+
# Corresponds to the JSON property `consolidatedPolicy`
|
1786
|
+
# @return [Google::Apis::CloudassetV1::AnalyzerOrgPolicy]
|
1787
|
+
attr_accessor :consolidated_policy
|
1788
|
+
|
1789
|
+
# The [full resource name] (https://cloud.google.com/asset-inventory/docs/
|
1790
|
+
# resource-name-format) of an organization/folder/project resource.
|
1791
|
+
# Corresponds to the JSON property `fullResourceName`
|
1792
|
+
# @return [String]
|
1793
|
+
attr_accessor :full_resource_name
|
1794
|
+
|
1795
|
+
# The [full resource name] (https://cloud.google.com/asset-inventory/docs/
|
1796
|
+
# resource-name-format) of the parent of
|
1797
|
+
# AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.
|
1798
|
+
# full_resource_name.
|
1799
|
+
# Corresponds to the JSON property `parent`
|
1800
|
+
# @return [String]
|
1801
|
+
attr_accessor :parent
|
1802
|
+
|
1803
|
+
# The ordered list of all organization policies from the
|
1804
|
+
# AnalyzeOrgPoliciesResponse.OrgPolicyResult.consolidated_policy.
|
1805
|
+
# attached_resource. to the scope specified in the request. If the constraint is
|
1806
|
+
# defined with default policy, it will also appear in the list.
|
1807
|
+
# Corresponds to the JSON property `policyBundle`
|
1808
|
+
# @return [Array<Google::Apis::CloudassetV1::AnalyzerOrgPolicy>]
|
1809
|
+
attr_accessor :policy_bundle
|
1276
1810
|
|
1277
1811
|
def initialize(**args)
|
1278
1812
|
update!(**args)
|
@@ -1280,7 +1814,10 @@ module Google
|
|
1280
1814
|
|
1281
1815
|
# Update properties of this object
|
1282
1816
|
def update!(**args)
|
1283
|
-
@
|
1817
|
+
@consolidated_policy = args[:consolidated_policy] if args.key?(:consolidated_policy)
|
1818
|
+
@full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
|
1819
|
+
@parent = args[:parent] if args.key?(:parent)
|
1820
|
+
@policy_bundle = args[:policy_bundle] if args.key?(:policy_bundle)
|
1284
1821
|
end
|
1285
1822
|
end
|
1286
1823
|
|
@@ -1344,6 +1881,77 @@ module Google
|
|
1344
1881
|
end
|
1345
1882
|
end
|
1346
1883
|
|
1884
|
+
# A `Constraint` that allows or disallows a list of string values, which are
|
1885
|
+
# configured by an Organization's policy administrator with a `Policy`.
|
1886
|
+
class GoogleCloudAssetV1ListConstraint
|
1887
|
+
include Google::Apis::Core::Hashable
|
1888
|
+
|
1889
|
+
# Indicates whether values grouped into categories can be used in `Policy.
|
1890
|
+
# allowed_values` and `Policy.denied_values`. For example, `"in:Python"` would
|
1891
|
+
# match any value in the 'Python' group.
|
1892
|
+
# Corresponds to the JSON property `supportsIn`
|
1893
|
+
# @return [Boolean]
|
1894
|
+
attr_accessor :supports_in
|
1895
|
+
alias_method :supports_in?, :supports_in
|
1896
|
+
|
1897
|
+
# Indicates whether subtrees of Cloud Resource Manager resource hierarchy can be
|
1898
|
+
# used in `Policy.allowed_values` and `Policy.denied_values`. For example, `"
|
1899
|
+
# under:folders/123"` would match any resource under the 'folders/123' folder.
|
1900
|
+
# Corresponds to the JSON property `supportsUnder`
|
1901
|
+
# @return [Boolean]
|
1902
|
+
attr_accessor :supports_under
|
1903
|
+
alias_method :supports_under?, :supports_under
|
1904
|
+
|
1905
|
+
def initialize(**args)
|
1906
|
+
update!(**args)
|
1907
|
+
end
|
1908
|
+
|
1909
|
+
# Update properties of this object
|
1910
|
+
def update!(**args)
|
1911
|
+
@supports_in = args[:supports_in] if args.key?(:supports_in)
|
1912
|
+
@supports_under = args[:supports_under] if args.key?(:supports_under)
|
1913
|
+
end
|
1914
|
+
end
|
1915
|
+
|
1916
|
+
# BigQuery destination.
|
1917
|
+
class GoogleCloudAssetV1QueryAssetsOutputConfigBigQueryDestination
|
1918
|
+
include Google::Apis::Core::Hashable
|
1919
|
+
|
1920
|
+
# Required. The BigQuery dataset where the query results will be saved. It has
|
1921
|
+
# the format of "projects/`projectId`/datasets/`datasetId`".
|
1922
|
+
# Corresponds to the JSON property `dataset`
|
1923
|
+
# @return [String]
|
1924
|
+
attr_accessor :dataset
|
1925
|
+
|
1926
|
+
# Required. The BigQuery table where the query results will be saved. If this
|
1927
|
+
# table does not exist, a new table with the given name will be created.
|
1928
|
+
# Corresponds to the JSON property `table`
|
1929
|
+
# @return [String]
|
1930
|
+
attr_accessor :table
|
1931
|
+
|
1932
|
+
# Specifies the action that occurs if the destination table or partition already
|
1933
|
+
# exists. The following values are supported: * WRITE_TRUNCATE: If the table or
|
1934
|
+
# partition already exists, BigQuery overwrites the entire table or all the
|
1935
|
+
# partitions data. * WRITE_APPEND: If the table or partition already exists,
|
1936
|
+
# BigQuery appends the data to the table or the latest partition. * WRITE_EMPTY:
|
1937
|
+
# If the table already exists and contains data, a 'duplicate' error is returned
|
1938
|
+
# in the job result. The default value is WRITE_EMPTY.
|
1939
|
+
# Corresponds to the JSON property `writeDisposition`
|
1940
|
+
# @return [String]
|
1941
|
+
attr_accessor :write_disposition
|
1942
|
+
|
1943
|
+
def initialize(**args)
|
1944
|
+
update!(**args)
|
1945
|
+
end
|
1946
|
+
|
1947
|
+
# Update properties of this object
|
1948
|
+
def update!(**args)
|
1949
|
+
@dataset = args[:dataset] if args.key?(:dataset)
|
1950
|
+
@table = args[:table] if args.key?(:table)
|
1951
|
+
@write_disposition = args[:write_disposition] if args.key?(:write_disposition)
|
1952
|
+
end
|
1953
|
+
end
|
1954
|
+
|
1347
1955
|
# A Google Cloud resource under analysis.
|
1348
1956
|
class GoogleCloudAssetV1Resource
|
1349
1957
|
include Google::Apis::Core::Hashable
|
@@ -1371,6 +1979,94 @@ module Google
|
|
1371
1979
|
end
|
1372
1980
|
end
|
1373
1981
|
|
1982
|
+
# Represents a rule defined in an organization policy
|
1983
|
+
class GoogleCloudAssetV1Rule
|
1984
|
+
include Google::Apis::Core::Hashable
|
1985
|
+
|
1986
|
+
# Setting this to true means that all values are allowed. This field can be set
|
1987
|
+
# only in Policies for list constraints.
|
1988
|
+
# Corresponds to the JSON property `allowAll`
|
1989
|
+
# @return [Boolean]
|
1990
|
+
attr_accessor :allow_all
|
1991
|
+
alias_method :allow_all?, :allow_all
|
1992
|
+
|
1993
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
1994
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
1995
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
1996
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
1997
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
1998
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
1999
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
2000
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
2001
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
2002
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
2003
|
+
# string" description: "Create a notification string with a timestamp."
|
2004
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
2005
|
+
# exact variables and functions that may be referenced within an expression are
|
2006
|
+
# determined by the service that evaluates it. See the service documentation for
|
2007
|
+
# additional information.
|
2008
|
+
# Corresponds to the JSON property `condition`
|
2009
|
+
# @return [Google::Apis::CloudassetV1::Expr]
|
2010
|
+
attr_accessor :condition
|
2011
|
+
|
2012
|
+
# Setting this to true means that all values are denied. This field can be set
|
2013
|
+
# only in Policies for list constraints.
|
2014
|
+
# Corresponds to the JSON property `denyAll`
|
2015
|
+
# @return [Boolean]
|
2016
|
+
attr_accessor :deny_all
|
2017
|
+
alias_method :deny_all?, :deny_all
|
2018
|
+
|
2019
|
+
# If `true`, then the `Policy` is enforced. If `false`, then any configuration
|
2020
|
+
# is acceptable. This field can be set only in Policies for boolean constraints.
|
2021
|
+
# Corresponds to the JSON property `enforce`
|
2022
|
+
# @return [Boolean]
|
2023
|
+
attr_accessor :enforce
|
2024
|
+
alias_method :enforce?, :enforce
|
2025
|
+
|
2026
|
+
# The string values for the list constraints.
|
2027
|
+
# Corresponds to the JSON property `values`
|
2028
|
+
# @return [Google::Apis::CloudassetV1::GoogleCloudAssetV1StringValues]
|
2029
|
+
attr_accessor :values
|
2030
|
+
|
2031
|
+
def initialize(**args)
|
2032
|
+
update!(**args)
|
2033
|
+
end
|
2034
|
+
|
2035
|
+
# Update properties of this object
|
2036
|
+
def update!(**args)
|
2037
|
+
@allow_all = args[:allow_all] if args.key?(:allow_all)
|
2038
|
+
@condition = args[:condition] if args.key?(:condition)
|
2039
|
+
@deny_all = args[:deny_all] if args.key?(:deny_all)
|
2040
|
+
@enforce = args[:enforce] if args.key?(:enforce)
|
2041
|
+
@values = args[:values] if args.key?(:values)
|
2042
|
+
end
|
2043
|
+
end
|
2044
|
+
|
2045
|
+
# The string values for the list constraints.
|
2046
|
+
class GoogleCloudAssetV1StringValues
|
2047
|
+
include Google::Apis::Core::Hashable
|
2048
|
+
|
2049
|
+
# List of values allowed at this resource.
|
2050
|
+
# Corresponds to the JSON property `allowedValues`
|
2051
|
+
# @return [Array<String>]
|
2052
|
+
attr_accessor :allowed_values
|
2053
|
+
|
2054
|
+
# List of values denied at this resource.
|
2055
|
+
# Corresponds to the JSON property `deniedValues`
|
2056
|
+
# @return [Array<String>]
|
2057
|
+
attr_accessor :denied_values
|
2058
|
+
|
2059
|
+
def initialize(**args)
|
2060
|
+
update!(**args)
|
2061
|
+
end
|
2062
|
+
|
2063
|
+
# Update properties of this object
|
2064
|
+
def update!(**args)
|
2065
|
+
@allowed_values = args[:allowed_values] if args.key?(:allowed_values)
|
2066
|
+
@denied_values = args[:denied_values] if args.key?(:denied_values)
|
2067
|
+
end
|
2068
|
+
end
|
2069
|
+
|
1374
2070
|
# An asset in Google Cloud. An asset can be any resource in the Google Cloud [
|
1375
2071
|
# resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-
|
1376
2072
|
# platform-resource-hierarchy), a resource outside the Google Cloud resource
|
@@ -1992,10 +2688,10 @@ module Google
|
|
1992
2688
|
# @return [String]
|
1993
2689
|
attr_accessor :description
|
1994
2690
|
|
1995
|
-
#
|
1996
|
-
#
|
1997
|
-
#
|
1998
|
-
#
|
2691
|
+
# Resource name for the `AccessLevel`. Format: `accessPolicies/`access_policy`/
|
2692
|
+
# accessLevels/`access_level``. The `access_level` component must begin with a
|
2693
|
+
# letter, followed by alphanumeric characters or `_`. Its maximum length is 50
|
2694
|
+
# characters. After you create an `AccessLevel`, you cannot change its `name`.
|
1999
2695
|
# Corresponds to the JSON property `name`
|
2000
2696
|
# @return [String]
|
2001
2697
|
attr_accessor :name
|
@@ -2666,9 +3362,10 @@ module Google
|
|
2666
3362
|
# @return [String]
|
2667
3363
|
attr_accessor :description
|
2668
3364
|
|
2669
|
-
#
|
2670
|
-
#
|
2671
|
-
#
|
3365
|
+
# Resource name for the `ServicePerimeter`. Format: `accessPolicies/`
|
3366
|
+
# access_policy`/servicePerimeters/`service_perimeter``. The `service_perimeter`
|
3367
|
+
# component must begin with a letter, followed by alphanumeric characters or `_`.
|
3368
|
+
# After you create a `ServicePerimeter`, you cannot change its `name`.
|
2672
3369
|
# Corresponds to the JSON property `name`
|
2673
3370
|
# @return [String]
|
2674
3371
|
attr_accessor :name
|
@@ -3579,6 +4276,36 @@ module Google
|
|
3579
4276
|
end
|
3580
4277
|
end
|
3581
4278
|
|
4279
|
+
# The organization policy result to the query.
|
4280
|
+
class OrgPolicyResult
|
4281
|
+
include Google::Apis::Core::Hashable
|
4282
|
+
|
4283
|
+
# This organization policy message is a modified version of the one defined in
|
4284
|
+
# the OrgPolicy system. This message contains several fields defined in the
|
4285
|
+
# original organization policy with some new fields for analysis purpose.
|
4286
|
+
# Corresponds to the JSON property `consolidatedPolicy`
|
4287
|
+
# @return [Google::Apis::CloudassetV1::AnalyzerOrgPolicy]
|
4288
|
+
attr_accessor :consolidated_policy
|
4289
|
+
|
4290
|
+
# The ordered list of all organization policies from the
|
4291
|
+
# AnalyzeOrgPoliciesResponse.OrgPolicyResult.consolidated_policy.
|
4292
|
+
# attached_resource. to the scope specified in the request. If the constraint is
|
4293
|
+
# defined with default policy, it will also appear in the list.
|
4294
|
+
# Corresponds to the JSON property `policyBundle`
|
4295
|
+
# @return [Array<Google::Apis::CloudassetV1::AnalyzerOrgPolicy>]
|
4296
|
+
attr_accessor :policy_bundle
|
4297
|
+
|
4298
|
+
def initialize(**args)
|
4299
|
+
update!(**args)
|
4300
|
+
end
|
4301
|
+
|
4302
|
+
# Update properties of this object
|
4303
|
+
def update!(**args)
|
4304
|
+
@consolidated_policy = args[:consolidated_policy] if args.key?(:consolidated_policy)
|
4305
|
+
@policy_bundle = args[:policy_bundle] if args.key?(:policy_bundle)
|
4306
|
+
end
|
4307
|
+
end
|
4308
|
+
|
3582
4309
|
# Operating system information for the VM.
|
3583
4310
|
class OsInfo
|
3584
4311
|
include Google::Apis::Core::Hashable
|
@@ -3870,6 +4597,154 @@ module Google
|
|
3870
4597
|
end
|
3871
4598
|
end
|
3872
4599
|
|
4600
|
+
# Output configuration query assets.
|
4601
|
+
class QueryAssetsOutputConfig
|
4602
|
+
include Google::Apis::Core::Hashable
|
4603
|
+
|
4604
|
+
# BigQuery destination.
|
4605
|
+
# Corresponds to the JSON property `bigqueryDestination`
|
4606
|
+
# @return [Google::Apis::CloudassetV1::GoogleCloudAssetV1QueryAssetsOutputConfigBigQueryDestination]
|
4607
|
+
attr_accessor :bigquery_destination
|
4608
|
+
|
4609
|
+
def initialize(**args)
|
4610
|
+
update!(**args)
|
4611
|
+
end
|
4612
|
+
|
4613
|
+
# Update properties of this object
|
4614
|
+
def update!(**args)
|
4615
|
+
@bigquery_destination = args[:bigquery_destination] if args.key?(:bigquery_destination)
|
4616
|
+
end
|
4617
|
+
end
|
4618
|
+
|
4619
|
+
# QueryAssets request.
|
4620
|
+
class QueryAssetsRequest
|
4621
|
+
include Google::Apis::Core::Hashable
|
4622
|
+
|
4623
|
+
# Optional. Reference to the query job, which is from the `QueryAssetsResponse`
|
4624
|
+
# of previous `QueryAssets` call.
|
4625
|
+
# Corresponds to the JSON property `jobReference`
|
4626
|
+
# @return [String]
|
4627
|
+
attr_accessor :job_reference
|
4628
|
+
|
4629
|
+
# Output configuration query assets.
|
4630
|
+
# Corresponds to the JSON property `outputConfig`
|
4631
|
+
# @return [Google::Apis::CloudassetV1::QueryAssetsOutputConfig]
|
4632
|
+
attr_accessor :output_config
|
4633
|
+
|
4634
|
+
# Optional. The maximum number of rows to return in the results. Responses are
|
4635
|
+
# limited to 10 MB and 1000 rows. By default, the maximum row count is 1000.
|
4636
|
+
# When the byte or row count limit is reached, the rest of the query results
|
4637
|
+
# will be paginated. The field will be ignored when [output_config] is specified.
|
4638
|
+
# Corresponds to the JSON property `pageSize`
|
4639
|
+
# @return [Fixnum]
|
4640
|
+
attr_accessor :page_size
|
4641
|
+
|
4642
|
+
# Optional. A page token received from previous `QueryAssets`. The field will be
|
4643
|
+
# ignored when [output_config] is specified.
|
4644
|
+
# Corresponds to the JSON property `pageToken`
|
4645
|
+
# @return [String]
|
4646
|
+
attr_accessor :page_token
|
4647
|
+
|
4648
|
+
# Optional. Queries cloud assets as they appeared at the specified point in time.
|
4649
|
+
# Corresponds to the JSON property `readTime`
|
4650
|
+
# @return [String]
|
4651
|
+
attr_accessor :read_time
|
4652
|
+
|
4653
|
+
# A time window specified by its `start_time` and `end_time`.
|
4654
|
+
# Corresponds to the JSON property `readTimeWindow`
|
4655
|
+
# @return [Google::Apis::CloudassetV1::TimeWindow]
|
4656
|
+
attr_accessor :read_time_window
|
4657
|
+
|
4658
|
+
# Optional. A SQL statement that's compatible with [BigQuery Standard SQL](http:/
|
4659
|
+
# /cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
|
4660
|
+
# Corresponds to the JSON property `statement`
|
4661
|
+
# @return [String]
|
4662
|
+
attr_accessor :statement
|
4663
|
+
|
4664
|
+
# Optional. Specifies the maximum amount of time that the client is willing to
|
4665
|
+
# wait for the query to complete. By default, this limit is 5 min for the first
|
4666
|
+
# query, and 1 minute for the following queries. If the query is complete, the `
|
4667
|
+
# done` field in the `QueryAssetsResponse` is true, otherwise false. Like
|
4668
|
+
# BigQuery [jobs.query API](https://cloud.google.com/bigquery/docs/reference/
|
4669
|
+
# rest/v2/jobs/query#queryrequest) The call is not guaranteed to wait for the
|
4670
|
+
# specified timeout; it typically returns after around 200 seconds (200,000
|
4671
|
+
# milliseconds), even if the query is not complete. The field will be ignored
|
4672
|
+
# when [output_config] is specified.
|
4673
|
+
# Corresponds to the JSON property `timeout`
|
4674
|
+
# @return [String]
|
4675
|
+
attr_accessor :timeout
|
4676
|
+
|
4677
|
+
def initialize(**args)
|
4678
|
+
update!(**args)
|
4679
|
+
end
|
4680
|
+
|
4681
|
+
# Update properties of this object
|
4682
|
+
def update!(**args)
|
4683
|
+
@job_reference = args[:job_reference] if args.key?(:job_reference)
|
4684
|
+
@output_config = args[:output_config] if args.key?(:output_config)
|
4685
|
+
@page_size = args[:page_size] if args.key?(:page_size)
|
4686
|
+
@page_token = args[:page_token] if args.key?(:page_token)
|
4687
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
4688
|
+
@read_time_window = args[:read_time_window] if args.key?(:read_time_window)
|
4689
|
+
@statement = args[:statement] if args.key?(:statement)
|
4690
|
+
@timeout = args[:timeout] if args.key?(:timeout)
|
4691
|
+
end
|
4692
|
+
end
|
4693
|
+
|
4694
|
+
# QueryAssets response.
|
4695
|
+
class QueryAssetsResponse
|
4696
|
+
include Google::Apis::Core::Hashable
|
4697
|
+
|
4698
|
+
# The query response, which can be either an `error` or a valid `response`. If `
|
4699
|
+
# done` == `false` and the query result is being saved in a output, the
|
4700
|
+
# output_config field will be set. If `done` == `true`, exactly one of `error`, `
|
4701
|
+
# query_result` or `output_config` will be set.
|
4702
|
+
# Corresponds to the JSON property `done`
|
4703
|
+
# @return [Boolean]
|
4704
|
+
attr_accessor :done
|
4705
|
+
alias_method :done?, :done
|
4706
|
+
|
4707
|
+
# The `Status` type defines a logical error model that is suitable for different
|
4708
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
4709
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
4710
|
+
# data: error code, error message, and error details. You can find out more
|
4711
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
4712
|
+
# //cloud.google.com/apis/design/errors).
|
4713
|
+
# Corresponds to the JSON property `error`
|
4714
|
+
# @return [Google::Apis::CloudassetV1::Status]
|
4715
|
+
attr_accessor :error
|
4716
|
+
|
4717
|
+
# Reference to a query job.
|
4718
|
+
# Corresponds to the JSON property `jobReference`
|
4719
|
+
# @return [String]
|
4720
|
+
attr_accessor :job_reference
|
4721
|
+
|
4722
|
+
# Output configuration query assets.
|
4723
|
+
# Corresponds to the JSON property `outputConfig`
|
4724
|
+
# @return [Google::Apis::CloudassetV1::QueryAssetsOutputConfig]
|
4725
|
+
attr_accessor :output_config
|
4726
|
+
|
4727
|
+
# Execution results of the query. The result is formatted as rows represented by
|
4728
|
+
# BigQuery compatible [schema]. When pagination is necessary, it will contains
|
4729
|
+
# the page token to retrieve the results of following pages.
|
4730
|
+
# Corresponds to the JSON property `queryResult`
|
4731
|
+
# @return [Google::Apis::CloudassetV1::QueryResult]
|
4732
|
+
attr_accessor :query_result
|
4733
|
+
|
4734
|
+
def initialize(**args)
|
4735
|
+
update!(**args)
|
4736
|
+
end
|
4737
|
+
|
4738
|
+
# Update properties of this object
|
4739
|
+
def update!(**args)
|
4740
|
+
@done = args[:done] if args.key?(:done)
|
4741
|
+
@error = args[:error] if args.key?(:error)
|
4742
|
+
@job_reference = args[:job_reference] if args.key?(:job_reference)
|
4743
|
+
@output_config = args[:output_config] if args.key?(:output_config)
|
4744
|
+
@query_result = args[:query_result] if args.key?(:query_result)
|
4745
|
+
end
|
4746
|
+
end
|
4747
|
+
|
3873
4748
|
# The query content.
|
3874
4749
|
class QueryContent
|
3875
4750
|
include Google::Apis::Core::Hashable
|
@@ -3889,6 +4764,45 @@ module Google
|
|
3889
4764
|
end
|
3890
4765
|
end
|
3891
4766
|
|
4767
|
+
# Execution results of the query. The result is formatted as rows represented by
|
4768
|
+
# BigQuery compatible [schema]. When pagination is necessary, it will contains
|
4769
|
+
# the page token to retrieve the results of following pages.
|
4770
|
+
class QueryResult
|
4771
|
+
include Google::Apis::Core::Hashable
|
4772
|
+
|
4773
|
+
# Token to retrieve the next page of the results.
|
4774
|
+
# Corresponds to the JSON property `nextPageToken`
|
4775
|
+
# @return [String]
|
4776
|
+
attr_accessor :next_page_token
|
4777
|
+
|
4778
|
+
# Each row hold a query result in the format of `Struct`.
|
4779
|
+
# Corresponds to the JSON property `rows`
|
4780
|
+
# @return [Array<Hash<String,Object>>]
|
4781
|
+
attr_accessor :rows
|
4782
|
+
|
4783
|
+
# BigQuery Compatible table schema.
|
4784
|
+
# Corresponds to the JSON property `schema`
|
4785
|
+
# @return [Google::Apis::CloudassetV1::TableSchema]
|
4786
|
+
attr_accessor :schema
|
4787
|
+
|
4788
|
+
# Total rows of the whole query results.
|
4789
|
+
# Corresponds to the JSON property `totalRows`
|
4790
|
+
# @return [Fixnum]
|
4791
|
+
attr_accessor :total_rows
|
4792
|
+
|
4793
|
+
def initialize(**args)
|
4794
|
+
update!(**args)
|
4795
|
+
end
|
4796
|
+
|
4797
|
+
# Update properties of this object
|
4798
|
+
def update!(**args)
|
4799
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
4800
|
+
@rows = args[:rows] if args.key?(:rows)
|
4801
|
+
@schema = args[:schema] if args.key?(:schema)
|
4802
|
+
@total_rows = args[:total_rows] if args.key?(:total_rows)
|
4803
|
+
end
|
4804
|
+
end
|
4805
|
+
|
3892
4806
|
# An asset identifier in Google Cloud which contains its name, type and
|
3893
4807
|
# ancestors. An asset can be any resource in the Google Cloud [resource
|
3894
4808
|
# hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-
|
@@ -4673,6 +5587,68 @@ module Google
|
|
4673
5587
|
end
|
4674
5588
|
end
|
4675
5589
|
|
5590
|
+
# A field in TableSchema.
|
5591
|
+
class TableFieldSchema
|
5592
|
+
include Google::Apis::Core::Hashable
|
5593
|
+
|
5594
|
+
# The field name. The name must contain only letters (a-z, A-Z), numbers (0-9),
|
5595
|
+
# or underscores (_), and must start with a letter or underscore. The maximum
|
5596
|
+
# length is 128 characters.
|
5597
|
+
# Corresponds to the JSON property `field`
|
5598
|
+
# @return [String]
|
5599
|
+
attr_accessor :field
|
5600
|
+
|
5601
|
+
# Describes the nested schema fields if the type property is set to RECORD.
|
5602
|
+
# Corresponds to the JSON property `fields`
|
5603
|
+
# @return [Array<Google::Apis::CloudassetV1::TableFieldSchema>]
|
5604
|
+
attr_accessor :fields
|
5605
|
+
|
5606
|
+
# The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The
|
5607
|
+
# default value is NULLABLE.
|
5608
|
+
# Corresponds to the JSON property `mode`
|
5609
|
+
# @return [String]
|
5610
|
+
attr_accessor :mode
|
5611
|
+
|
5612
|
+
# The field data type. Possible values include * STRING * BYTES * INTEGER *
|
5613
|
+
# FLOAT * BOOLEAN * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY, * NUMERIC, *
|
5614
|
+
# BIGNUMERIC, * RECORD (where RECORD indicates that the field contains a nested
|
5615
|
+
# schema).
|
5616
|
+
# Corresponds to the JSON property `type`
|
5617
|
+
# @return [String]
|
5618
|
+
attr_accessor :type
|
5619
|
+
|
5620
|
+
def initialize(**args)
|
5621
|
+
update!(**args)
|
5622
|
+
end
|
5623
|
+
|
5624
|
+
# Update properties of this object
|
5625
|
+
def update!(**args)
|
5626
|
+
@field = args[:field] if args.key?(:field)
|
5627
|
+
@fields = args[:fields] if args.key?(:fields)
|
5628
|
+
@mode = args[:mode] if args.key?(:mode)
|
5629
|
+
@type = args[:type] if args.key?(:type)
|
5630
|
+
end
|
5631
|
+
end
|
5632
|
+
|
5633
|
+
# BigQuery Compatible table schema.
|
5634
|
+
class TableSchema
|
5635
|
+
include Google::Apis::Core::Hashable
|
5636
|
+
|
5637
|
+
# Describes the fields in a table.
|
5638
|
+
# Corresponds to the JSON property `fields`
|
5639
|
+
# @return [Array<Google::Apis::CloudassetV1::TableFieldSchema>]
|
5640
|
+
attr_accessor :fields
|
5641
|
+
|
5642
|
+
def initialize(**args)
|
5643
|
+
update!(**args)
|
5644
|
+
end
|
5645
|
+
|
5646
|
+
# Update properties of this object
|
5647
|
+
def update!(**args)
|
5648
|
+
@fields = args[:fields] if args.key?(:fields)
|
5649
|
+
end
|
5650
|
+
end
|
5651
|
+
|
4676
5652
|
# An asset in Google Cloud and its temporal metadata, including the time window
|
4677
5653
|
# when it was observed and its status during that window.
|
4678
5654
|
class TemporalAsset
|