google-apis-cloudasset_v1p4beta1 0.1.0 → 0.2.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bd2b39932961f11c7b5680e5252073037ca77300d3572c22c334e697823eae7
|
4
|
+
data.tar.gz: a5cc4c72ceab6c60b18460922c91f3f9bc8b05265118f797169f2f582929356d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecb4d3c1d6bd0c95ee2b77eb79fb5f1ec6d4c2e78e83ec20965c66d2d8c3864ef915ff417499beb814f661fc20fd215681c9959b0741ebfe32ad67c0c12faf88
|
7
|
+
data.tar.gz: 1d7649f361a7672f965e26aefc72830a5950b7359f6779c86f1704ac10dbdf64675f2ee4ee0e1ae0d88ba1be2723ab9a3518b0443622381395a64efa39cce6ca
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Release history for google-apis-cloudasset_v1p4beta1
|
2
2
|
|
3
|
+
### v0.2.0 (2021-03-04)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20210226
|
6
|
+
* Regenerated using generator version 0.1.2
|
7
|
+
|
3
8
|
### v0.1.0 (2021-01-07)
|
4
9
|
|
5
10
|
* Regenerated using generator version 0.1.1
|
@@ -93,6 +93,77 @@ module Google
|
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
96
|
+
# Specifies the audit configuration for a service. The configuration determines
|
97
|
+
# which permission types are logged, and what identities, if any, are exempted
|
98
|
+
# from logging. An AuditConfig must have one or more AuditLogConfigs. If there
|
99
|
+
# are AuditConfigs for both `allServices` and a specific service, the union of
|
100
|
+
# the two AuditConfigs is used for that service: the log_types specified in each
|
101
|
+
# AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
|
102
|
+
# exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
|
103
|
+
# service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
|
104
|
+
# exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
|
105
|
+
# ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
|
106
|
+
# "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
|
107
|
+
# , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
|
108
|
+
# this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
|
109
|
+
# exempts jose@example.com from DATA_READ logging, and aliya@example.com from
|
110
|
+
# DATA_WRITE logging.
|
111
|
+
class AuditConfig
|
112
|
+
include Google::Apis::Core::Hashable
|
113
|
+
|
114
|
+
# The configuration for logging of each type of permission.
|
115
|
+
# Corresponds to the JSON property `auditLogConfigs`
|
116
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::AuditLogConfig>]
|
117
|
+
attr_accessor :audit_log_configs
|
118
|
+
|
119
|
+
# Specifies a service that will be enabled for audit logging. For example, `
|
120
|
+
# storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
|
121
|
+
# value that covers all services.
|
122
|
+
# Corresponds to the JSON property `service`
|
123
|
+
# @return [String]
|
124
|
+
attr_accessor :service
|
125
|
+
|
126
|
+
def initialize(**args)
|
127
|
+
update!(**args)
|
128
|
+
end
|
129
|
+
|
130
|
+
# Update properties of this object
|
131
|
+
def update!(**args)
|
132
|
+
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
|
133
|
+
@service = args[:service] if args.key?(:service)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
# Provides the configuration for logging a type of permissions. Example: ` "
|
138
|
+
# audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
|
139
|
+
# jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
|
140
|
+
# DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
|
141
|
+
# DATA_READ logging.
|
142
|
+
class AuditLogConfig
|
143
|
+
include Google::Apis::Core::Hashable
|
144
|
+
|
145
|
+
# Specifies the identities that do not cause logging for this type of permission.
|
146
|
+
# Follows the same format of Binding.members.
|
147
|
+
# Corresponds to the JSON property `exemptedMembers`
|
148
|
+
# @return [Array<String>]
|
149
|
+
attr_accessor :exempted_members
|
150
|
+
|
151
|
+
# The log type that this config enables.
|
152
|
+
# Corresponds to the JSON property `logType`
|
153
|
+
# @return [String]
|
154
|
+
attr_accessor :log_type
|
155
|
+
|
156
|
+
def initialize(**args)
|
157
|
+
update!(**args)
|
158
|
+
end
|
159
|
+
|
160
|
+
# Update properties of this object
|
161
|
+
def update!(**args)
|
162
|
+
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
|
163
|
+
@log_type = args[:log_type] if args.key?(:log_type)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
96
167
|
# Associates `members` with a `role`.
|
97
168
|
class Binding
|
98
169
|
include Google::Apis::Core::Hashable
|
@@ -492,27 +563,123 @@ module Google
|
|
492
563
|
end
|
493
564
|
end
|
494
565
|
|
495
|
-
# An
|
496
|
-
|
566
|
+
# An asset in Google Cloud. An asset can be any resource in the Google Cloud [
|
567
|
+
# resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-
|
568
|
+
# platform-resource-hierarchy), a resource outside the Google Cloud resource
|
569
|
+
# hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy
|
570
|
+
# (e.g. Cloud IAM policy). See [Supported asset types](https://cloud.google.com/
|
571
|
+
# asset-inventory/docs/supported-asset-types) for more information.
|
572
|
+
class GoogleCloudAssetV1p7beta1Asset
|
497
573
|
include Google::Apis::Core::Hashable
|
498
574
|
|
499
|
-
#
|
500
|
-
#
|
501
|
-
#
|
502
|
-
|
575
|
+
# An `AccessLevel` is a label that can be applied to requests to Google Cloud
|
576
|
+
# services, along with a list of requirements necessary for the label to be
|
577
|
+
# applied.
|
578
|
+
# Corresponds to the JSON property `accessLevel`
|
579
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1AccessLevel]
|
580
|
+
attr_accessor :access_level
|
581
|
+
|
582
|
+
# `AccessPolicy` is a container for `AccessLevels` (which define the necessary
|
583
|
+
# attributes to use Google Cloud services) and `ServicePerimeters` (which define
|
584
|
+
# regions of services able to freely pass data within a perimeter). An access
|
585
|
+
# policy is globally visible within an organization, and the restrictions it
|
586
|
+
# specifies apply to all projects within an organization.
|
587
|
+
# Corresponds to the JSON property `accessPolicy`
|
588
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1AccessPolicy]
|
589
|
+
attr_accessor :access_policy
|
590
|
+
|
591
|
+
# The ancestry path of an asset in Google Cloud [resource hierarchy](https://
|
592
|
+
# cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
|
593
|
+
# represented as a list of relative resource names. An ancestry path starts with
|
594
|
+
# the closest ancestor in the hierarchy and ends at root. If the asset is a
|
595
|
+
# project, folder, or organization, the ancestry path starts from the asset
|
596
|
+
# itself. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
|
597
|
+
# Corresponds to the JSON property `ancestors`
|
598
|
+
# @return [Array<String>]
|
599
|
+
attr_accessor :ancestors
|
503
600
|
|
504
|
-
#
|
505
|
-
#
|
506
|
-
#
|
507
|
-
#
|
508
|
-
|
601
|
+
# The type of the asset. Example: `compute.googleapis.com/Disk` See [Supported
|
602
|
+
# asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-
|
603
|
+
# types) for more information.
|
604
|
+
# Corresponds to the JSON property `assetType`
|
605
|
+
# @return [String]
|
606
|
+
attr_accessor :asset_type
|
607
|
+
|
608
|
+
# An Identity and Access Management (IAM) policy, which specifies access
|
609
|
+
# controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
|
610
|
+
# A `binding` binds one or more `members` to a single `role`. Members can be
|
611
|
+
# user accounts, service accounts, Google groups, and domains (such as G Suite).
|
612
|
+
# A `role` is a named list of permissions; each `role` can be an IAM predefined
|
613
|
+
# role or a user-created custom role. For some types of Google Cloud resources,
|
614
|
+
# a `binding` can also specify a `condition`, which is a logical expression that
|
615
|
+
# allows access to a resource only if the expression evaluates to `true`. A
|
616
|
+
# condition can add constraints based on attributes of the request, the resource,
|
617
|
+
# or both. To learn which resources support conditions in their IAM policies,
|
618
|
+
# see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
|
619
|
+
# resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
|
620
|
+
# resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
|
621
|
+
# group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
|
622
|
+
# appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
|
623
|
+
# organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
|
624
|
+
# title": "expirable access", "description": "Does not grant access after Sep
|
625
|
+
# 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
|
626
|
+
# ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
|
627
|
+
# members: - user:mike@example.com - group:admins@example.com - domain:google.
|
628
|
+
# com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
|
629
|
+
# resourcemanager.organizationAdmin - members: - user:eve@example.com role:
|
630
|
+
# roles/resourcemanager.organizationViewer condition: title: expirable access
|
631
|
+
# description: Does not grant access after Sep 2020 expression: request.time <
|
632
|
+
# timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
|
633
|
+
# description of IAM and its features, see the [IAM documentation](https://cloud.
|
634
|
+
# google.com/iam/docs/).
|
635
|
+
# Corresponds to the JSON property `iamPolicy`
|
636
|
+
# @return [Google::Apis::CloudassetV1p4beta1::Policy]
|
637
|
+
attr_accessor :iam_policy
|
638
|
+
|
639
|
+
# The full name of the asset. Example: `//compute.googleapis.com/projects/
|
640
|
+
# my_project_123/zones/zone1/instances/instance1` See [Resource names](https://
|
641
|
+
# cloud.google.com/apis/design/resource_names#full_resource_name) for more
|
642
|
+
# information.
|
643
|
+
# Corresponds to the JSON property `name`
|
644
|
+
# @return [String]
|
645
|
+
attr_accessor :name
|
509
646
|
|
510
|
-
#
|
511
|
-
#
|
512
|
-
#
|
513
|
-
#
|
514
|
-
|
515
|
-
|
647
|
+
# A representation of an [organization policy](https://cloud.google.com/resource-
|
648
|
+
# manager/docs/organization-policy/overview#organization_policy). There can be
|
649
|
+
# more than one organization policy with different constraints set on a given
|
650
|
+
# resource.
|
651
|
+
# Corresponds to the JSON property `orgPolicy`
|
652
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleCloudOrgpolicyV1Policy>]
|
653
|
+
attr_accessor :org_policy
|
654
|
+
|
655
|
+
# The detailed related assets with the `relationship_type`.
|
656
|
+
# Corresponds to the JSON property `relatedAssets`
|
657
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p7beta1RelatedAssets]
|
658
|
+
attr_accessor :related_assets
|
659
|
+
|
660
|
+
# A representation of a Google Cloud resource.
|
661
|
+
# Corresponds to the JSON property `resource`
|
662
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p7beta1Resource]
|
663
|
+
attr_accessor :resource
|
664
|
+
|
665
|
+
# `ServicePerimeter` describes a set of Google Cloud resources which can freely
|
666
|
+
# import and export data amongst themselves, but not export outside of the `
|
667
|
+
# ServicePerimeter`. If a request with a source within this `ServicePerimeter`
|
668
|
+
# has a target outside of the `ServicePerimeter`, the request will be blocked.
|
669
|
+
# Otherwise the request is allowed. There are two types of Service Perimeter -
|
670
|
+
# Regular and Bridge. Regular Service Perimeters cannot overlap, a single Google
|
671
|
+
# Cloud project can only belong to a single regular Service Perimeter. Service
|
672
|
+
# Perimeter Bridges can contain only Google Cloud projects as members, a single
|
673
|
+
# Google Cloud project may belong to multiple Service Perimeter Bridges.
|
674
|
+
# Corresponds to the JSON property `servicePerimeter`
|
675
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeter]
|
676
|
+
attr_accessor :service_perimeter
|
677
|
+
|
678
|
+
# The last update timestamp of an asset. update_time is updated when create/
|
679
|
+
# update/delete operation is performed.
|
680
|
+
# Corresponds to the JSON property `updateTime`
|
681
|
+
# @return [String]
|
682
|
+
attr_accessor :update_time
|
516
683
|
|
517
684
|
def initialize(**args)
|
518
685
|
update!(**args)
|
@@ -520,20 +687,53 @@ module Google
|
|
520
687
|
|
521
688
|
# Update properties of this object
|
522
689
|
def update!(**args)
|
523
|
-
@
|
524
|
-
@
|
525
|
-
@
|
690
|
+
@access_level = args[:access_level] if args.key?(:access_level)
|
691
|
+
@access_policy = args[:access_policy] if args.key?(:access_policy)
|
692
|
+
@ancestors = args[:ancestors] if args.key?(:ancestors)
|
693
|
+
@asset_type = args[:asset_type] if args.key?(:asset_type)
|
694
|
+
@iam_policy = args[:iam_policy] if args.key?(:iam_policy)
|
695
|
+
@name = args[:name] if args.key?(:name)
|
696
|
+
@org_policy = args[:org_policy] if args.key?(:org_policy)
|
697
|
+
@related_assets = args[:related_assets] if args.key?(:related_assets)
|
698
|
+
@resource = args[:resource] if args.key?(:resource)
|
699
|
+
@service_perimeter = args[:service_perimeter] if args.key?(:service_perimeter)
|
700
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
526
701
|
end
|
527
702
|
end
|
528
703
|
|
529
|
-
#
|
530
|
-
|
704
|
+
# An asset identify in Google Cloud which contains its name, type and ancestors.
|
705
|
+
# An asset can be any resource in the Google Cloud [resource hierarchy](https://
|
706
|
+
# cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), a
|
707
|
+
# resource outside the Google Cloud resource hierarchy (such as Google
|
708
|
+
# Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
|
709
|
+
# See [Supported asset types](https://cloud.google.com/asset-inventory/docs/
|
710
|
+
# supported-asset-types) for more information.
|
711
|
+
class GoogleCloudAssetV1p7beta1RelatedAsset
|
531
712
|
include Google::Apis::Core::Hashable
|
532
713
|
|
533
|
-
#
|
534
|
-
#
|
535
|
-
#
|
536
|
-
|
714
|
+
# The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.
|
715
|
+
# google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
|
716
|
+
# represented as a list of relative resource names. An ancestry path starts with
|
717
|
+
# the closest ancestor in the hierarchy and ends at root. Example: `["projects/
|
718
|
+
# 123456789", "folders/5432", "organizations/1234"]`
|
719
|
+
# Corresponds to the JSON property `ancestors`
|
720
|
+
# @return [Array<String>]
|
721
|
+
attr_accessor :ancestors
|
722
|
+
|
723
|
+
# The full name of the asset. Example: `//compute.googleapis.com/projects/
|
724
|
+
# my_project_123/zones/zone1/instances/instance1` See [Resource names](https://
|
725
|
+
# cloud.google.com/apis/design/resource_names#full_resource_name) for more
|
726
|
+
# information.
|
727
|
+
# Corresponds to the JSON property `asset`
|
728
|
+
# @return [String]
|
729
|
+
attr_accessor :asset
|
730
|
+
|
731
|
+
# The type of the asset. Example: `compute.googleapis.com/Disk` See [Supported
|
732
|
+
# asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-
|
733
|
+
# types) for more information.
|
734
|
+
# Corresponds to the JSON property `assetType`
|
735
|
+
# @return [String]
|
736
|
+
attr_accessor :asset_type
|
537
737
|
|
538
738
|
def initialize(**args)
|
539
739
|
update!(**args)
|
@@ -541,49 +741,63 @@ module Google
|
|
541
741
|
|
542
742
|
# Update properties of this object
|
543
743
|
def update!(**args)
|
544
|
-
@
|
744
|
+
@ancestors = args[:ancestors] if args.key?(:ancestors)
|
745
|
+
@asset = args[:asset] if args.key?(:asset)
|
746
|
+
@asset_type = args[:asset_type] if args.key?(:asset_type)
|
545
747
|
end
|
546
748
|
end
|
547
749
|
|
548
|
-
#
|
549
|
-
class
|
750
|
+
# The detailed related assets with the `relationship_type`.
|
751
|
+
class GoogleCloudAssetV1p7beta1RelatedAssets
|
550
752
|
include Google::Apis::Core::Hashable
|
551
753
|
|
552
|
-
#
|
553
|
-
#
|
554
|
-
#
|
555
|
-
|
556
|
-
# 10.
|
557
|
-
# Corresponds to the JSON property `accessSelector`
|
558
|
-
# @return [Google::Apis::CloudassetV1p4beta1::AccessSelector]
|
559
|
-
attr_accessor :access_selector
|
754
|
+
# The peer resources of the relationship.
|
755
|
+
# Corresponds to the JSON property `assets`
|
756
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p7beta1RelatedAsset>]
|
757
|
+
attr_accessor :assets
|
560
758
|
|
561
|
-
#
|
562
|
-
#
|
563
|
-
#
|
564
|
-
#
|
565
|
-
|
566
|
-
attr_accessor :identity_selector
|
759
|
+
# The relationship attributes which include `type`, `source_resource_type`, `
|
760
|
+
# target_resource_type` and `action`.
|
761
|
+
# Corresponds to the JSON property `relationshipAttributes`
|
762
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p7beta1RelationshipAttributes]
|
763
|
+
attr_accessor :relationship_attributes
|
567
764
|
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
#
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
765
|
+
def initialize(**args)
|
766
|
+
update!(**args)
|
767
|
+
end
|
768
|
+
|
769
|
+
# Update properties of this object
|
770
|
+
def update!(**args)
|
771
|
+
@assets = args[:assets] if args.key?(:assets)
|
772
|
+
@relationship_attributes = args[:relationship_attributes] if args.key?(:relationship_attributes)
|
773
|
+
end
|
774
|
+
end
|
775
|
+
|
776
|
+
# The relationship attributes which include `type`, `source_resource_type`, `
|
777
|
+
# target_resource_type` and `action`.
|
778
|
+
class GoogleCloudAssetV1p7beta1RelationshipAttributes
|
779
|
+
include Google::Apis::Core::Hashable
|
780
|
+
|
781
|
+
# The detail of the relationship, e.g. `contains`, `attaches`
|
782
|
+
# Corresponds to the JSON property `action`
|
578
783
|
# @return [String]
|
579
|
-
attr_accessor :
|
784
|
+
attr_accessor :action
|
580
785
|
|
581
|
-
#
|
582
|
-
#
|
583
|
-
#
|
584
|
-
|
585
|
-
|
586
|
-
|
786
|
+
# The source asset type. Example: `compute.googleapis.com/Instance`
|
787
|
+
# Corresponds to the JSON property `sourceResourceType`
|
788
|
+
# @return [String]
|
789
|
+
attr_accessor :source_resource_type
|
790
|
+
|
791
|
+
# The target asset type. Example: `compute.googleapis.com/Disk`
|
792
|
+
# Corresponds to the JSON property `targetResourceType`
|
793
|
+
# @return [String]
|
794
|
+
attr_accessor :target_resource_type
|
795
|
+
|
796
|
+
# The unique identifier of the relationship type. Example: `
|
797
|
+
# INSTANCE_TO_INSTANCEGROUP`
|
798
|
+
# Corresponds to the JSON property `type`
|
799
|
+
# @return [String]
|
800
|
+
attr_accessor :type
|
587
801
|
|
588
802
|
def initialize(**args)
|
589
803
|
update!(**args)
|
@@ -591,46 +805,67 @@ module Google
|
|
591
805
|
|
592
806
|
# Update properties of this object
|
593
807
|
def update!(**args)
|
594
|
-
@
|
595
|
-
@
|
596
|
-
@
|
597
|
-
@
|
808
|
+
@action = args[:action] if args.key?(:action)
|
809
|
+
@source_resource_type = args[:source_resource_type] if args.key?(:source_resource_type)
|
810
|
+
@target_resource_type = args[:target_resource_type] if args.key?(:target_resource_type)
|
811
|
+
@type = args[:type] if args.key?(:type)
|
598
812
|
end
|
599
813
|
end
|
600
814
|
|
601
|
-
#
|
602
|
-
|
603
|
-
class IamPolicyAnalysisResult
|
815
|
+
# A representation of a Google Cloud resource.
|
816
|
+
class GoogleCloudAssetV1p7beta1Resource
|
604
817
|
include Google::Apis::Core::Hashable
|
605
818
|
|
606
|
-
# The
|
607
|
-
#
|
608
|
-
# Corresponds to the JSON property `
|
609
|
-
# @return [
|
610
|
-
attr_accessor :
|
819
|
+
# The content of the resource, in which some sensitive fields are removed and
|
820
|
+
# may not be present.
|
821
|
+
# Corresponds to the JSON property `data`
|
822
|
+
# @return [Hash<String,Object>]
|
823
|
+
attr_accessor :data
|
611
824
|
|
612
|
-
# The
|
613
|
-
#
|
614
|
-
#
|
825
|
+
# The URL of the discovery document containing the resource's JSON schema.
|
826
|
+
# Example: `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest` This
|
827
|
+
# value is unspecified for resources that do not have an API based on a
|
828
|
+
# discovery document, such as Cloud Bigtable.
|
829
|
+
# Corresponds to the JSON property `discoveryDocumentUri`
|
615
830
|
# @return [String]
|
616
|
-
attr_accessor :
|
831
|
+
attr_accessor :discovery_document_uri
|
617
832
|
|
618
|
-
#
|
619
|
-
#
|
620
|
-
#
|
621
|
-
|
622
|
-
|
833
|
+
# The JSON schema name listed in the discovery document. Example: `Project` This
|
834
|
+
# value is unspecified for resources that do not have an API based on a
|
835
|
+
# discovery document, such as Cloud Bigtable.
|
836
|
+
# Corresponds to the JSON property `discoveryName`
|
837
|
+
# @return [String]
|
838
|
+
attr_accessor :discovery_name
|
623
839
|
|
624
|
-
#
|
625
|
-
#
|
626
|
-
#
|
627
|
-
|
840
|
+
# The location of the resource in Google Cloud, such as its zone and region. For
|
841
|
+
# more information, see https://cloud.google.com/about/locations/.
|
842
|
+
# Corresponds to the JSON property `location`
|
843
|
+
# @return [String]
|
844
|
+
attr_accessor :location
|
628
845
|
|
629
|
-
# The
|
630
|
-
#
|
631
|
-
#
|
632
|
-
#
|
633
|
-
|
846
|
+
# The full name of the immediate parent of this resource. See [Resource Names](
|
847
|
+
# https://cloud.google.com/apis/design/resource_names#full_resource_name) for
|
848
|
+
# more information. For Google Cloud assets, this value is the parent resource
|
849
|
+
# defined in the [Cloud IAM policy hierarchy](https://cloud.google.com/iam/docs/
|
850
|
+
# overview#policy_hierarchy). Example: `//cloudresourcemanager.googleapis.com/
|
851
|
+
# projects/my_project_123` For third-party assets, this field may be set
|
852
|
+
# differently.
|
853
|
+
# Corresponds to the JSON property `parent`
|
854
|
+
# @return [String]
|
855
|
+
attr_accessor :parent
|
856
|
+
|
857
|
+
# The REST URL for accessing the resource. An HTTP `GET` request using this URL
|
858
|
+
# returns the resource itself. Example: `https://cloudresourcemanager.googleapis.
|
859
|
+
# com/v1/projects/my-project-123` This value is unspecified for resources
|
860
|
+
# without a REST API.
|
861
|
+
# Corresponds to the JSON property `resourceUrl`
|
862
|
+
# @return [String]
|
863
|
+
attr_accessor :resource_url
|
864
|
+
|
865
|
+
# The API version. Example: `v1`
|
866
|
+
# Corresponds to the JSON property `version`
|
867
|
+
# @return [String]
|
868
|
+
attr_accessor :version
|
634
869
|
|
635
870
|
def initialize(**args)
|
636
871
|
update!(**args)
|
@@ -638,29 +873,48 @@ module Google
|
|
638
873
|
|
639
874
|
# Update properties of this object
|
640
875
|
def update!(**args)
|
641
|
-
@
|
642
|
-
@
|
643
|
-
@
|
644
|
-
@
|
645
|
-
@
|
876
|
+
@data = args[:data] if args.key?(:data)
|
877
|
+
@discovery_document_uri = args[:discovery_document_uri] if args.key?(:discovery_document_uri)
|
878
|
+
@discovery_name = args[:discovery_name] if args.key?(:discovery_name)
|
879
|
+
@location = args[:location] if args.key?(:location)
|
880
|
+
@parent = args[:parent] if args.key?(:parent)
|
881
|
+
@resource_url = args[:resource_url] if args.key?(:resource_url)
|
882
|
+
@version = args[:version] if args.key?(:version)
|
646
883
|
end
|
647
884
|
end
|
648
885
|
|
649
|
-
#
|
650
|
-
#
|
651
|
-
|
652
|
-
class IdentitySelector
|
886
|
+
# Used in `policy_type` to specify how `boolean_policy` will behave at this
|
887
|
+
# resource.
|
888
|
+
class GoogleCloudOrgpolicyV1BooleanPolicy
|
653
889
|
include Google::Apis::Core::Hashable
|
654
890
|
|
655
|
-
#
|
656
|
-
#
|
657
|
-
#
|
658
|
-
#
|
659
|
-
#
|
660
|
-
#
|
661
|
-
#
|
662
|
-
#
|
663
|
-
|
891
|
+
# If `true`, then the `Policy` is enforced. If `false`, then any configuration
|
892
|
+
# is acceptable. Suppose you have a `Constraint` `constraints/compute.
|
893
|
+
# disableSerialPortAccess` with `constraint_default` set to `ALLOW`. A `Policy`
|
894
|
+
# for that `Constraint` exhibits the following behavior: - If the `Policy` at
|
895
|
+
# this resource has enforced set to `false`, serial port connection attempts
|
896
|
+
# will be allowed. - If the `Policy` at this resource has enforced set to `true`,
|
897
|
+
# serial port connection attempts will be refused. - If the `Policy` at this
|
898
|
+
# resource is `RestoreDefault`, serial port connection attempts will be allowed.
|
899
|
+
# - If no `Policy` is set at this resource or anywhere higher in the resource
|
900
|
+
# hierarchy, serial port connection attempts will be allowed. - If no `Policy`
|
901
|
+
# is set at this resource, but one exists higher in the resource hierarchy, the
|
902
|
+
# behavior is as if the`Policy` were set at this resource. The following
|
903
|
+
# examples demonstrate the different possible layerings: Example 1 (nearest `
|
904
|
+
# Constraint` wins): `organizations/foo` has a `Policy` with: `enforced: false` `
|
905
|
+
# projects/bar` has no `Policy` set. The constraint at `projects/bar` and `
|
906
|
+
# organizations/foo` will not be enforced. Example 2 (enforcement gets replaced):
|
907
|
+
# `organizations/foo` has a `Policy` with: `enforced: false` `projects/bar` has
|
908
|
+
# a `Policy` with: `enforced: true` The constraint at `organizations/foo` is not
|
909
|
+
# enforced. The constraint at `projects/bar` is enforced. Example 3 (
|
910
|
+
# RestoreDefault): `organizations/foo` has a `Policy` with: `enforced: true` `
|
911
|
+
# projects/bar` has a `Policy` with: `RestoreDefault: ``` The constraint at `
|
912
|
+
# organizations/foo` is enforced. The constraint at `projects/bar` is not
|
913
|
+
# enforced, because `constraint_default` for the `Constraint` is `ALLOW`.
|
914
|
+
# Corresponds to the JSON property `enforced`
|
915
|
+
# @return [Boolean]
|
916
|
+
attr_accessor :enforced
|
917
|
+
alias_method :enforced?, :enforced
|
664
918
|
|
665
919
|
def initialize(**args)
|
666
920
|
update!(**args)
|
@@ -668,57 +922,207 @@ module Google
|
|
668
922
|
|
669
923
|
# Update properties of this object
|
670
924
|
def update!(**args)
|
671
|
-
@
|
925
|
+
@enforced = args[:enforced] if args.key?(:enforced)
|
672
926
|
end
|
673
927
|
end
|
674
928
|
|
675
|
-
#
|
676
|
-
#
|
677
|
-
|
929
|
+
# Used in `policy_type` to specify how `list_policy` behaves at this resource. `
|
930
|
+
# ListPolicy` can define specific values and subtrees of Cloud Resource Manager
|
931
|
+
# resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed
|
932
|
+
# or denied by setting the `allowed_values` and `denied_values` fields. This is
|
933
|
+
# achieved by using the `under:` and optional `is:` prefixes. The `under:`
|
934
|
+
# prefix is used to denote resource subtree values. The `is:` prefix is used to
|
935
|
+
# denote specific values, and is required only if the value contains a ":".
|
936
|
+
# Values prefixed with "is:" are treated the same as values with no prefix.
|
937
|
+
# Ancestry subtrees must be in one of the following formats: - "projects/", e.g.
|
938
|
+
# "projects/tokyo-rain-123" - "folders/", e.g. "folders/1234" - "organizations/",
|
939
|
+
# e.g. "organizations/1234" The `supports_under` field of the associated `
|
940
|
+
# Constraint` defines whether ancestry prefixes can be used. You can set `
|
941
|
+
# allowed_values` and `denied_values` in the same `Policy` if `all_values` is `
|
942
|
+
# ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
|
943
|
+
# values. If `all_values` is set to either `ALLOW` or `DENY`, `allowed_values`
|
944
|
+
# and `denied_values` must be unset.
|
945
|
+
class GoogleCloudOrgpolicyV1ListPolicy
|
678
946
|
include Google::Apis::Core::Hashable
|
679
947
|
|
680
|
-
#
|
681
|
-
#
|
682
|
-
#
|
948
|
+
# The policy all_values state.
|
949
|
+
# Corresponds to the JSON property `allValues`
|
950
|
+
# @return [String]
|
951
|
+
attr_accessor :all_values
|
952
|
+
|
953
|
+
# List of values allowed at this resource. Can only be set if `all_values` is
|
954
|
+
# set to `ALL_VALUES_UNSPECIFIED`.
|
955
|
+
# Corresponds to the JSON property `allowedValues`
|
956
|
+
# @return [Array<String>]
|
957
|
+
attr_accessor :allowed_values
|
958
|
+
|
959
|
+
# List of values denied at this resource. Can only be set if `all_values` is set
|
960
|
+
# to `ALL_VALUES_UNSPECIFIED`.
|
961
|
+
# Corresponds to the JSON property `deniedValues`
|
962
|
+
# @return [Array<String>]
|
963
|
+
attr_accessor :denied_values
|
964
|
+
|
965
|
+
# Determines the inheritance behavior for this `Policy`. By default, a `
|
966
|
+
# ListPolicy` set at a resource supersedes any `Policy` set anywhere up the
|
967
|
+
# resource hierarchy. However, if `inherit_from_parent` is set to `true`, then
|
968
|
+
# the values from the effective `Policy` of the parent resource are inherited,
|
969
|
+
# meaning the values set in this `Policy` are added to the values inherited up
|
970
|
+
# the hierarchy. Setting `Policy` hierarchies that inherit both allowed values
|
971
|
+
# and denied values isn't recommended in most circumstances to keep the
|
972
|
+
# configuration simple and understandable. However, it is possible to set a `
|
973
|
+
# Policy` with `allowed_values` set that inherits a `Policy` with `denied_values`
|
974
|
+
# set. In this case, the values that are allowed must be in `allowed_values`
|
975
|
+
# and not present in `denied_values`. For example, suppose you have a `
|
976
|
+
# Constraint` `constraints/serviceuser.services`, which has a `constraint_type`
|
977
|
+
# of `list_constraint`, and with `constraint_default` set to `ALLOW`. Suppose
|
978
|
+
# that at the Organization level, a `Policy` is applied that restricts the
|
979
|
+
# allowed API activations to ``E1`, `E2``. Then, if a `Policy` is applied to a
|
980
|
+
# project below the Organization that has `inherit_from_parent` set to `false`
|
981
|
+
# and field all_values set to DENY, then an attempt to activate any API will be
|
982
|
+
# denied. The following examples demonstrate different possible layerings for `
|
983
|
+
# projects/bar` parented by `organizations/foo`: Example 1 (no inherited values):
|
984
|
+
# `organizations/foo` has a `Policy` with values: `allowed_values: "E1"
|
985
|
+
# allowed_values:"E2"` `projects/bar` has `inherit_from_parent` `false` and
|
986
|
+
# values: `allowed_values: "E3" allowed_values: "E4"` The accepted values at `
|
987
|
+
# organizations/foo` are `E1`, `E2`. The accepted values at `projects/bar` are `
|
988
|
+
# E3`, and `E4`. Example 2 (inherited values): `organizations/foo` has a `Policy`
|
989
|
+
# with values: `allowed_values: "E1" allowed_values:"E2"` `projects/bar` has a `
|
990
|
+
# Policy` with values: `value: "E3" value: "E4" inherit_from_parent: true` The
|
991
|
+
# accepted values at `organizations/foo` are `E1`, `E2`. The accepted values at `
|
992
|
+
# projects/bar` are `E1`, `E2`, `E3`, and `E4`. Example 3 (inheriting both
|
993
|
+
# allowed and denied values): `organizations/foo` has a `Policy` with values: `
|
994
|
+
# allowed_values: "E1" allowed_values: "E2"` `projects/bar` has a `Policy` with:
|
995
|
+
# `denied_values: "E1"` The accepted values at `organizations/foo` are `E1`, `E2`
|
996
|
+
# . The value accepted at `projects/bar` is `E2`. Example 4 (RestoreDefault): `
|
997
|
+
# organizations/foo` has a `Policy` with values: `allowed_values: "E1"
|
998
|
+
# allowed_values:"E2"` `projects/bar` has a `Policy` with values: `
|
999
|
+
# RestoreDefault: ``` The accepted values at `organizations/foo` are `E1`, `E2`.
|
1000
|
+
# The accepted values at `projects/bar` are either all or none depending on the
|
1001
|
+
# value of `constraint_default` (if `ALLOW`, all; if `DENY`, none). Example 5 (
|
1002
|
+
# no policy inherits parent policy): `organizations/foo` has no `Policy` set. `
|
1003
|
+
# projects/bar` has no `Policy` set. The accepted values at both levels are
|
1004
|
+
# either all or none depending on the value of `constraint_default` (if `ALLOW`,
|
1005
|
+
# all; if `DENY`, none). Example 6 (ListConstraint allowing all): `organizations/
|
1006
|
+
# foo` has a `Policy` with values: `allowed_values: "E1" allowed_values: "E2"` `
|
1007
|
+
# projects/bar` has a `Policy` with: `all: ALLOW` The accepted values at `
|
1008
|
+
# organizations/foo` are `E1`, E2`. Any value is accepted at `projects/bar`.
|
1009
|
+
# Example 7 (ListConstraint allowing none): `organizations/foo` has a `Policy`
|
1010
|
+
# with values: `allowed_values: "E1" allowed_values: "E2"` `projects/bar` has a `
|
1011
|
+
# Policy` with: `all: DENY` The accepted values at `organizations/foo` are `E1`,
|
1012
|
+
# E2`. No value is accepted at `projects/bar`. Example 10 (allowed and denied
|
1013
|
+
# subtrees of Resource Manager hierarchy): Given the following resource
|
1014
|
+
# hierarchy O1->`F1, F2`; F1->`P1`; F2->`P2, P3`, `organizations/foo` has a `
|
1015
|
+
# Policy` with values: `allowed_values: "under:organizations/O1"` `projects/bar`
|
1016
|
+
# has a `Policy` with: `allowed_values: "under:projects/P3"` `denied_values: "
|
1017
|
+
# under:folders/F2"` The accepted values at `organizations/foo` are `
|
1018
|
+
# organizations/O1`, `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`, `
|
1019
|
+
# projects/P3`. The accepted values at `projects/bar` are `organizations/O1`, `
|
1020
|
+
# folders/F1`, `projects/P1`.
|
1021
|
+
# Corresponds to the JSON property `inheritFromParent`
|
683
1022
|
# @return [Boolean]
|
684
|
-
attr_accessor :
|
685
|
-
alias_method :
|
1023
|
+
attr_accessor :inherit_from_parent
|
1024
|
+
alias_method :inherit_from_parent?, :inherit_from_parent
|
1025
|
+
|
1026
|
+
# Optional. The Google Cloud Console will try to default to a configuration that
|
1027
|
+
# matches the value specified in this `Policy`. If `suggested_value` is not set,
|
1028
|
+
# it will inherit the value specified higher in the hierarchy, unless `
|
1029
|
+
# inherit_from_parent` is `false`.
|
1030
|
+
# Corresponds to the JSON property `suggestedValue`
|
1031
|
+
# @return [String]
|
1032
|
+
attr_accessor :suggested_value
|
686
1033
|
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
# data: error code, error message, and error details. You can find out more
|
691
|
-
# about this error model and how to work with it in the [API Design Guide](https:
|
692
|
-
# //cloud.google.com/apis/design/errors).
|
693
|
-
# Corresponds to the JSON property `error`
|
694
|
-
# @return [Google::Apis::CloudassetV1p4beta1::Status]
|
695
|
-
attr_accessor :error
|
1034
|
+
def initialize(**args)
|
1035
|
+
update!(**args)
|
1036
|
+
end
|
696
1037
|
|
697
|
-
#
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
1038
|
+
# Update properties of this object
|
1039
|
+
def update!(**args)
|
1040
|
+
@all_values = args[:all_values] if args.key?(:all_values)
|
1041
|
+
@allowed_values = args[:allowed_values] if args.key?(:allowed_values)
|
1042
|
+
@denied_values = args[:denied_values] if args.key?(:denied_values)
|
1043
|
+
@inherit_from_parent = args[:inherit_from_parent] if args.key?(:inherit_from_parent)
|
1044
|
+
@suggested_value = args[:suggested_value] if args.key?(:suggested_value)
|
1045
|
+
end
|
1046
|
+
end
|
704
1047
|
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
1048
|
+
# Defines a Cloud Organization `Policy` which is used to specify `Constraints`
|
1049
|
+
# for configurations of Cloud Platform resources.
|
1050
|
+
class GoogleCloudOrgpolicyV1Policy
|
1051
|
+
include Google::Apis::Core::Hashable
|
1052
|
+
|
1053
|
+
# Used in `policy_type` to specify how `boolean_policy` will behave at this
|
1054
|
+
# resource.
|
1055
|
+
# Corresponds to the JSON property `booleanPolicy`
|
1056
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleCloudOrgpolicyV1BooleanPolicy]
|
1057
|
+
attr_accessor :boolean_policy
|
1058
|
+
|
1059
|
+
# The name of the `Constraint` the `Policy` is configuring, for example, `
|
1060
|
+
# constraints/serviceuser.services`. A [list of available constraints](/resource-
|
1061
|
+
# manager/docs/organization-policy/org-policy-constraints) is available.
|
1062
|
+
# Immutable after creation.
|
1063
|
+
# Corresponds to the JSON property `constraint`
|
709
1064
|
# @return [String]
|
710
|
-
attr_accessor :
|
1065
|
+
attr_accessor :constraint
|
1066
|
+
|
1067
|
+
# An opaque tag indicating the current version of the `Policy`, used for
|
1068
|
+
# concurrency control. When the `Policy` is returned from either a `GetPolicy`
|
1069
|
+
# or a `ListOrgPolicy` request, this `etag` indicates the version of the current
|
1070
|
+
# `Policy` to use when executing a read-modify-write loop. When the `Policy` is
|
1071
|
+
# returned from a `GetEffectivePolicy` request, the `etag` will be unset. When
|
1072
|
+
# the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value that was
|
1073
|
+
# returned from a `GetOrgPolicy` request as part of a read-modify-write loop for
|
1074
|
+
# concurrency control. Not setting the `etag`in a `SetOrgPolicy` request will
|
1075
|
+
# result in an unconditional write of the `Policy`.
|
1076
|
+
# Corresponds to the JSON property `etag`
|
1077
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1078
|
+
# @return [String]
|
1079
|
+
attr_accessor :etag
|
1080
|
+
|
1081
|
+
# Used in `policy_type` to specify how `list_policy` behaves at this resource. `
|
1082
|
+
# ListPolicy` can define specific values and subtrees of Cloud Resource Manager
|
1083
|
+
# resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed
|
1084
|
+
# or denied by setting the `allowed_values` and `denied_values` fields. This is
|
1085
|
+
# achieved by using the `under:` and optional `is:` prefixes. The `under:`
|
1086
|
+
# prefix is used to denote resource subtree values. The `is:` prefix is used to
|
1087
|
+
# denote specific values, and is required only if the value contains a ":".
|
1088
|
+
# Values prefixed with "is:" are treated the same as values with no prefix.
|
1089
|
+
# Ancestry subtrees must be in one of the following formats: - "projects/", e.g.
|
1090
|
+
# "projects/tokyo-rain-123" - "folders/", e.g. "folders/1234" - "organizations/",
|
1091
|
+
# e.g. "organizations/1234" The `supports_under` field of the associated `
|
1092
|
+
# Constraint` defines whether ancestry prefixes can be used. You can set `
|
1093
|
+
# allowed_values` and `denied_values` in the same `Policy` if `all_values` is `
|
1094
|
+
# ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
|
1095
|
+
# values. If `all_values` is set to either `ALLOW` or `DENY`, `allowed_values`
|
1096
|
+
# and `denied_values` must be unset.
|
1097
|
+
# Corresponds to the JSON property `listPolicy`
|
1098
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleCloudOrgpolicyV1ListPolicy]
|
1099
|
+
attr_accessor :list_policy
|
1100
|
+
|
1101
|
+
# Ignores policies set above this resource and restores the `constraint_default`
|
1102
|
+
# enforcement behavior of the specific `Constraint` at this resource. Suppose
|
1103
|
+
# that `constraint_default` is set to `ALLOW` for the `Constraint` `constraints/
|
1104
|
+
# serviceuser.services`. Suppose that organization foo.com sets a `Policy` at
|
1105
|
+
# their Organization resource node that restricts the allowed service
|
1106
|
+
# activations to deny all service activations. They could then set a `Policy`
|
1107
|
+
# with the `policy_type` `restore_default` on several experimental projects,
|
1108
|
+
# restoring the `constraint_default` enforcement of the `Constraint` for only
|
1109
|
+
# those projects, allowing those projects to have all services activated.
|
1110
|
+
# Corresponds to the JSON property `restoreDefault`
|
1111
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleCloudOrgpolicyV1RestoreDefault]
|
1112
|
+
attr_accessor :restore_default
|
1113
|
+
|
1114
|
+
# The time stamp the `Policy` was previously updated. This is set by the server,
|
1115
|
+
# not specified by the caller, and represents the last time a call to `
|
1116
|
+
# SetOrgPolicy` was made for that `Policy`. Any value set by the client will be
|
1117
|
+
# ignored.
|
1118
|
+
# Corresponds to the JSON property `updateTime`
|
1119
|
+
# @return [String]
|
1120
|
+
attr_accessor :update_time
|
711
1121
|
|
712
|
-
#
|
713
|
-
#
|
714
|
-
#
|
715
|
-
|
716
|
-
# have the type `XxxResponse`, where `Xxx` is the original method name. For
|
717
|
-
# example, if the original method name is `TakeSnapshot()`, the inferred
|
718
|
-
# response type is `TakeSnapshotResponse`.
|
719
|
-
# Corresponds to the JSON property `response`
|
720
|
-
# @return [Hash<String,Object>]
|
721
|
-
attr_accessor :response
|
1122
|
+
# Version of the `Policy`. Default version is 0;
|
1123
|
+
# Corresponds to the JSON property `version`
|
1124
|
+
# @return [Fixnum]
|
1125
|
+
attr_accessor :version
|
722
1126
|
|
723
1127
|
def initialize(**args)
|
724
1128
|
update!(**args)
|
@@ -726,29 +1130,1109 @@ module Google
|
|
726
1130
|
|
727
1131
|
# Update properties of this object
|
728
1132
|
def update!(**args)
|
729
|
-
@
|
730
|
-
@
|
731
|
-
@
|
732
|
-
@
|
733
|
-
@
|
1133
|
+
@boolean_policy = args[:boolean_policy] if args.key?(:boolean_policy)
|
1134
|
+
@constraint = args[:constraint] if args.key?(:constraint)
|
1135
|
+
@etag = args[:etag] if args.key?(:etag)
|
1136
|
+
@list_policy = args[:list_policy] if args.key?(:list_policy)
|
1137
|
+
@restore_default = args[:restore_default] if args.key?(:restore_default)
|
1138
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
1139
|
+
@version = args[:version] if args.key?(:version)
|
734
1140
|
end
|
735
1141
|
end
|
736
1142
|
|
737
|
-
#
|
738
|
-
|
1143
|
+
# Ignores policies set above this resource and restores the `constraint_default`
|
1144
|
+
# enforcement behavior of the specific `Constraint` at this resource. Suppose
|
1145
|
+
# that `constraint_default` is set to `ALLOW` for the `Constraint` `constraints/
|
1146
|
+
# serviceuser.services`. Suppose that organization foo.com sets a `Policy` at
|
1147
|
+
# their Organization resource node that restricts the allowed service
|
1148
|
+
# activations to deny all service activations. They could then set a `Policy`
|
1149
|
+
# with the `policy_type` `restore_default` on several experimental projects,
|
1150
|
+
# restoring the `constraint_default` enforcement of the `Constraint` for only
|
1151
|
+
# those projects, allowing those projects to have all services activated.
|
1152
|
+
class GoogleCloudOrgpolicyV1RestoreDefault
|
739
1153
|
include Google::Apis::Core::Hashable
|
740
1154
|
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
#
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
1155
|
+
def initialize(**args)
|
1156
|
+
update!(**args)
|
1157
|
+
end
|
1158
|
+
|
1159
|
+
# Update properties of this object
|
1160
|
+
def update!(**args)
|
1161
|
+
end
|
1162
|
+
end
|
1163
|
+
|
1164
|
+
# An `AccessLevel` is a label that can be applied to requests to Google Cloud
|
1165
|
+
# services, along with a list of requirements necessary for the label to be
|
1166
|
+
# applied.
|
1167
|
+
class GoogleIdentityAccesscontextmanagerV1AccessLevel
|
1168
|
+
include Google::Apis::Core::Hashable
|
1169
|
+
|
1170
|
+
# `BasicLevel` is an `AccessLevel` using a set of recommended features.
|
1171
|
+
# Corresponds to the JSON property `basic`
|
1172
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1BasicLevel]
|
1173
|
+
attr_accessor :basic
|
1174
|
+
|
1175
|
+
# `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language
|
1176
|
+
# to represent the necessary conditions for the level to apply to a request. See
|
1177
|
+
# CEL spec at: https://github.com/google/cel-spec
|
1178
|
+
# Corresponds to the JSON property `custom`
|
1179
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1CustomLevel]
|
1180
|
+
attr_accessor :custom
|
1181
|
+
|
1182
|
+
# Description of the `AccessLevel` and its use. Does not affect behavior.
|
1183
|
+
# Corresponds to the JSON property `description`
|
1184
|
+
# @return [String]
|
1185
|
+
attr_accessor :description
|
1186
|
+
|
1187
|
+
# Required. Resource name for the Access Level. The `short_name` component must
|
1188
|
+
# begin with a letter and only include alphanumeric and '_'. Format: `
|
1189
|
+
# accessPolicies/`policy_id`/accessLevels/`short_name``. The maximum length of
|
1190
|
+
# the `short_name` component is 50 characters.
|
1191
|
+
# Corresponds to the JSON property `name`
|
1192
|
+
# @return [String]
|
1193
|
+
attr_accessor :name
|
1194
|
+
|
1195
|
+
# Human readable title. Must be unique within the Policy.
|
1196
|
+
# Corresponds to the JSON property `title`
|
1197
|
+
# @return [String]
|
1198
|
+
attr_accessor :title
|
1199
|
+
|
1200
|
+
def initialize(**args)
|
1201
|
+
update!(**args)
|
1202
|
+
end
|
1203
|
+
|
1204
|
+
# Update properties of this object
|
1205
|
+
def update!(**args)
|
1206
|
+
@basic = args[:basic] if args.key?(:basic)
|
1207
|
+
@custom = args[:custom] if args.key?(:custom)
|
1208
|
+
@description = args[:description] if args.key?(:description)
|
1209
|
+
@name = args[:name] if args.key?(:name)
|
1210
|
+
@title = args[:title] if args.key?(:title)
|
1211
|
+
end
|
1212
|
+
end
|
1213
|
+
|
1214
|
+
# `AccessPolicy` is a container for `AccessLevels` (which define the necessary
|
1215
|
+
# attributes to use Google Cloud services) and `ServicePerimeters` (which define
|
1216
|
+
# regions of services able to freely pass data within a perimeter). An access
|
1217
|
+
# policy is globally visible within an organization, and the restrictions it
|
1218
|
+
# specifies apply to all projects within an organization.
|
1219
|
+
class GoogleIdentityAccesscontextmanagerV1AccessPolicy
|
1220
|
+
include Google::Apis::Core::Hashable
|
1221
|
+
|
1222
|
+
# Output only. An opaque identifier for the current version of the `AccessPolicy`
|
1223
|
+
# . This will always be a strongly validated etag, meaning that two Access
|
1224
|
+
# Polices will be identical if and only if their etags are identical. Clients
|
1225
|
+
# should not expect this to be in any specific format.
|
1226
|
+
# Corresponds to the JSON property `etag`
|
1227
|
+
# @return [String]
|
1228
|
+
attr_accessor :etag
|
1229
|
+
|
1230
|
+
# Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/`
|
1231
|
+
# policy_id``
|
1232
|
+
# Corresponds to the JSON property `name`
|
1233
|
+
# @return [String]
|
1234
|
+
attr_accessor :name
|
1235
|
+
|
1236
|
+
# Required. The parent of this `AccessPolicy` in the Cloud Resource Hierarchy.
|
1237
|
+
# Currently immutable once created. Format: `organizations/`organization_id``
|
1238
|
+
# Corresponds to the JSON property `parent`
|
1239
|
+
# @return [String]
|
1240
|
+
attr_accessor :parent
|
1241
|
+
|
1242
|
+
# Required. Human readable title. Does not affect behavior.
|
1243
|
+
# Corresponds to the JSON property `title`
|
1244
|
+
# @return [String]
|
1245
|
+
attr_accessor :title
|
1246
|
+
|
1247
|
+
def initialize(**args)
|
1248
|
+
update!(**args)
|
1249
|
+
end
|
1250
|
+
|
1251
|
+
# Update properties of this object
|
1252
|
+
def update!(**args)
|
1253
|
+
@etag = args[:etag] if args.key?(:etag)
|
1254
|
+
@name = args[:name] if args.key?(:name)
|
1255
|
+
@parent = args[:parent] if args.key?(:parent)
|
1256
|
+
@title = args[:title] if args.key?(:title)
|
1257
|
+
end
|
1258
|
+
end
|
1259
|
+
|
1260
|
+
# Identification for an API Operation.
|
1261
|
+
class GoogleIdentityAccesscontextmanagerV1ApiOperation
|
1262
|
+
include Google::Apis::Core::Hashable
|
1263
|
+
|
1264
|
+
# API methods or permissions to allow. Method or permission must belong to the
|
1265
|
+
# service specified by `service_name` field. A single MethodSelector entry with `
|
1266
|
+
# *` specified for the `method` field will allow all methods AND permissions for
|
1267
|
+
# the service specified in `service_name`.
|
1268
|
+
# Corresponds to the JSON property `methodSelectors`
|
1269
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1MethodSelector>]
|
1270
|
+
attr_accessor :method_selectors
|
1271
|
+
|
1272
|
+
# The name of the API whose methods or permissions the IngressPolicy or
|
1273
|
+
# EgressPolicy want to allow. A single ApiOperation with `service_name` field
|
1274
|
+
# set to `*` will allow all methods AND permissions for all services.
|
1275
|
+
# Corresponds to the JSON property `serviceName`
|
1276
|
+
# @return [String]
|
1277
|
+
attr_accessor :service_name
|
1278
|
+
|
1279
|
+
def initialize(**args)
|
1280
|
+
update!(**args)
|
1281
|
+
end
|
1282
|
+
|
1283
|
+
# Update properties of this object
|
1284
|
+
def update!(**args)
|
1285
|
+
@method_selectors = args[:method_selectors] if args.key?(:method_selectors)
|
1286
|
+
@service_name = args[:service_name] if args.key?(:service_name)
|
1287
|
+
end
|
1288
|
+
end
|
1289
|
+
|
1290
|
+
# `BasicLevel` is an `AccessLevel` using a set of recommended features.
|
1291
|
+
class GoogleIdentityAccesscontextmanagerV1BasicLevel
|
1292
|
+
include Google::Apis::Core::Hashable
|
1293
|
+
|
1294
|
+
# How the `conditions` list should be combined to determine if a request is
|
1295
|
+
# granted this `AccessLevel`. If AND is used, each `Condition` in `conditions`
|
1296
|
+
# must be satisfied for the `AccessLevel` to be applied. If OR is used, at least
|
1297
|
+
# one `Condition` in `conditions` must be satisfied for the `AccessLevel` to be
|
1298
|
+
# applied. Default behavior is AND.
|
1299
|
+
# Corresponds to the JSON property `combiningFunction`
|
1300
|
+
# @return [String]
|
1301
|
+
attr_accessor :combining_function
|
1302
|
+
|
1303
|
+
# Required. A list of requirements for the `AccessLevel` to be granted.
|
1304
|
+
# Corresponds to the JSON property `conditions`
|
1305
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1Condition>]
|
1306
|
+
attr_accessor :conditions
|
1307
|
+
|
1308
|
+
def initialize(**args)
|
1309
|
+
update!(**args)
|
1310
|
+
end
|
1311
|
+
|
1312
|
+
# Update properties of this object
|
1313
|
+
def update!(**args)
|
1314
|
+
@combining_function = args[:combining_function] if args.key?(:combining_function)
|
1315
|
+
@conditions = args[:conditions] if args.key?(:conditions)
|
1316
|
+
end
|
1317
|
+
end
|
1318
|
+
|
1319
|
+
# A condition necessary for an `AccessLevel` to be granted. The Condition is an
|
1320
|
+
# AND over its fields. So a Condition is true if: 1) the request IP is from one
|
1321
|
+
# of the listed subnetworks AND 2) the originating device complies with the
|
1322
|
+
# listed device policy AND 3) all listed access levels are granted AND 4) the
|
1323
|
+
# request was sent at a time allowed by the DateTimeRestriction.
|
1324
|
+
class GoogleIdentityAccesscontextmanagerV1Condition
|
1325
|
+
include Google::Apis::Core::Hashable
|
1326
|
+
|
1327
|
+
# `DevicePolicy` specifies device specific restrictions necessary to acquire a
|
1328
|
+
# given access level. A `DevicePolicy` specifies requirements for requests from
|
1329
|
+
# devices to be granted access levels, it does not do any enforcement on the
|
1330
|
+
# device. `DevicePolicy` acts as an AND over all specified fields, and each
|
1331
|
+
# repeated field is an OR over its elements. Any unset fields are ignored. For
|
1332
|
+
# example, if the proto is ` os_type : DESKTOP_WINDOWS, os_type : DESKTOP_LINUX,
|
1333
|
+
# encryption_status: ENCRYPTED`, then the DevicePolicy will be true for requests
|
1334
|
+
# originating from encrypted Linux desktops and encrypted Windows desktops.
|
1335
|
+
# Corresponds to the JSON property `devicePolicy`
|
1336
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1DevicePolicy]
|
1337
|
+
attr_accessor :device_policy
|
1338
|
+
|
1339
|
+
# CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a
|
1340
|
+
# CIDR IP address block, the specified IP address portion must be properly
|
1341
|
+
# truncated (i.e. all the host bits must be zero) or the input is considered
|
1342
|
+
# malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not.
|
1343
|
+
# Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is
|
1344
|
+
# not. The originating IP of a request must be in one of the listed subnets in
|
1345
|
+
# order for this Condition to be true. If empty, all IP addresses are allowed.
|
1346
|
+
# Corresponds to the JSON property `ipSubnetworks`
|
1347
|
+
# @return [Array<String>]
|
1348
|
+
attr_accessor :ip_subnetworks
|
1349
|
+
|
1350
|
+
# The request must be made by one of the provided user or service accounts.
|
1351
|
+
# Groups are not supported. Syntax: `user:`emailid`` `serviceAccount:`emailid``
|
1352
|
+
# If not specified, a request may come from any user.
|
1353
|
+
# Corresponds to the JSON property `members`
|
1354
|
+
# @return [Array<String>]
|
1355
|
+
attr_accessor :members
|
1356
|
+
|
1357
|
+
# Whether to negate the Condition. If true, the Condition becomes a NAND over
|
1358
|
+
# its non-empty fields, each field must be false for the Condition overall to be
|
1359
|
+
# satisfied. Defaults to false.
|
1360
|
+
# Corresponds to the JSON property `negate`
|
1361
|
+
# @return [Boolean]
|
1362
|
+
attr_accessor :negate
|
1363
|
+
alias_method :negate?, :negate
|
1364
|
+
|
1365
|
+
# The request must originate from one of the provided countries/regions. Must be
|
1366
|
+
# valid ISO 3166-1 alpha-2 codes.
|
1367
|
+
# Corresponds to the JSON property `regions`
|
1368
|
+
# @return [Array<String>]
|
1369
|
+
attr_accessor :regions
|
1370
|
+
|
1371
|
+
# A list of other access levels defined in the same `Policy`, referenced by
|
1372
|
+
# resource name. Referencing an `AccessLevel` which does not exist is an error.
|
1373
|
+
# All access levels listed must be granted for the Condition to be true. Example:
|
1374
|
+
# "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"`
|
1375
|
+
# Corresponds to the JSON property `requiredAccessLevels`
|
1376
|
+
# @return [Array<String>]
|
1377
|
+
attr_accessor :required_access_levels
|
1378
|
+
|
1379
|
+
def initialize(**args)
|
1380
|
+
update!(**args)
|
1381
|
+
end
|
1382
|
+
|
1383
|
+
# Update properties of this object
|
1384
|
+
def update!(**args)
|
1385
|
+
@device_policy = args[:device_policy] if args.key?(:device_policy)
|
1386
|
+
@ip_subnetworks = args[:ip_subnetworks] if args.key?(:ip_subnetworks)
|
1387
|
+
@members = args[:members] if args.key?(:members)
|
1388
|
+
@negate = args[:negate] if args.key?(:negate)
|
1389
|
+
@regions = args[:regions] if args.key?(:regions)
|
1390
|
+
@required_access_levels = args[:required_access_levels] if args.key?(:required_access_levels)
|
1391
|
+
end
|
1392
|
+
end
|
1393
|
+
|
1394
|
+
# `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language
|
1395
|
+
# to represent the necessary conditions for the level to apply to a request. See
|
1396
|
+
# CEL spec at: https://github.com/google/cel-spec
|
1397
|
+
class GoogleIdentityAccesscontextmanagerV1CustomLevel
|
1398
|
+
include Google::Apis::Core::Hashable
|
1399
|
+
|
1400
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
1401
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
1402
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
1403
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
1404
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
1405
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
1406
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
1407
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
1408
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
1409
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
1410
|
+
# string" description: "Create a notification string with a timestamp."
|
1411
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
1412
|
+
# exact variables and functions that may be referenced within an expression are
|
1413
|
+
# determined by the service that evaluates it. See the service documentation for
|
1414
|
+
# additional information.
|
1415
|
+
# Corresponds to the JSON property `expr`
|
1416
|
+
# @return [Google::Apis::CloudassetV1p4beta1::Expr]
|
1417
|
+
attr_accessor :expr
|
1418
|
+
|
1419
|
+
def initialize(**args)
|
1420
|
+
update!(**args)
|
1421
|
+
end
|
1422
|
+
|
1423
|
+
# Update properties of this object
|
1424
|
+
def update!(**args)
|
1425
|
+
@expr = args[:expr] if args.key?(:expr)
|
1426
|
+
end
|
1427
|
+
end
|
1428
|
+
|
1429
|
+
# `DevicePolicy` specifies device specific restrictions necessary to acquire a
|
1430
|
+
# given access level. A `DevicePolicy` specifies requirements for requests from
|
1431
|
+
# devices to be granted access levels, it does not do any enforcement on the
|
1432
|
+
# device. `DevicePolicy` acts as an AND over all specified fields, and each
|
1433
|
+
# repeated field is an OR over its elements. Any unset fields are ignored. For
|
1434
|
+
# example, if the proto is ` os_type : DESKTOP_WINDOWS, os_type : DESKTOP_LINUX,
|
1435
|
+
# encryption_status: ENCRYPTED`, then the DevicePolicy will be true for requests
|
1436
|
+
# originating from encrypted Linux desktops and encrypted Windows desktops.
|
1437
|
+
class GoogleIdentityAccesscontextmanagerV1DevicePolicy
|
1438
|
+
include Google::Apis::Core::Hashable
|
1439
|
+
|
1440
|
+
# Allowed device management levels, an empty list allows all management levels.
|
1441
|
+
# Corresponds to the JSON property `allowedDeviceManagementLevels`
|
1442
|
+
# @return [Array<String>]
|
1443
|
+
attr_accessor :allowed_device_management_levels
|
1444
|
+
|
1445
|
+
# Allowed encryptions statuses, an empty list allows all statuses.
|
1446
|
+
# Corresponds to the JSON property `allowedEncryptionStatuses`
|
1447
|
+
# @return [Array<String>]
|
1448
|
+
attr_accessor :allowed_encryption_statuses
|
1449
|
+
|
1450
|
+
# Allowed OS versions, an empty list allows all types and all versions.
|
1451
|
+
# Corresponds to the JSON property `osConstraints`
|
1452
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1OsConstraint>]
|
1453
|
+
attr_accessor :os_constraints
|
1454
|
+
|
1455
|
+
# Whether the device needs to be approved by the customer admin.
|
1456
|
+
# Corresponds to the JSON property `requireAdminApproval`
|
1457
|
+
# @return [Boolean]
|
1458
|
+
attr_accessor :require_admin_approval
|
1459
|
+
alias_method :require_admin_approval?, :require_admin_approval
|
1460
|
+
|
1461
|
+
# Whether the device needs to be corp owned.
|
1462
|
+
# Corresponds to the JSON property `requireCorpOwned`
|
1463
|
+
# @return [Boolean]
|
1464
|
+
attr_accessor :require_corp_owned
|
1465
|
+
alias_method :require_corp_owned?, :require_corp_owned
|
1466
|
+
|
1467
|
+
# Whether or not screenlock is required for the DevicePolicy to be true.
|
1468
|
+
# Defaults to `false`.
|
1469
|
+
# Corresponds to the JSON property `requireScreenlock`
|
1470
|
+
# @return [Boolean]
|
1471
|
+
attr_accessor :require_screenlock
|
1472
|
+
alias_method :require_screenlock?, :require_screenlock
|
1473
|
+
|
1474
|
+
def initialize(**args)
|
1475
|
+
update!(**args)
|
1476
|
+
end
|
1477
|
+
|
1478
|
+
# Update properties of this object
|
1479
|
+
def update!(**args)
|
1480
|
+
@allowed_device_management_levels = args[:allowed_device_management_levels] if args.key?(:allowed_device_management_levels)
|
1481
|
+
@allowed_encryption_statuses = args[:allowed_encryption_statuses] if args.key?(:allowed_encryption_statuses)
|
1482
|
+
@os_constraints = args[:os_constraints] if args.key?(:os_constraints)
|
1483
|
+
@require_admin_approval = args[:require_admin_approval] if args.key?(:require_admin_approval)
|
1484
|
+
@require_corp_owned = args[:require_corp_owned] if args.key?(:require_corp_owned)
|
1485
|
+
@require_screenlock = args[:require_screenlock] if args.key?(:require_screenlock)
|
1486
|
+
end
|
1487
|
+
end
|
1488
|
+
|
1489
|
+
# Defines the conditions under which an EgressPolicy matches a request.
|
1490
|
+
# Conditions based on information about the source of the request. Note that if
|
1491
|
+
# the destination of the request is protected by a ServicePerimeter, then that
|
1492
|
+
# ServicePerimeter must have an IngressPolicy which allows access in order for
|
1493
|
+
# this request to succeed.
|
1494
|
+
class GoogleIdentityAccesscontextmanagerV1EgressFrom
|
1495
|
+
include Google::Apis::Core::Hashable
|
1496
|
+
|
1497
|
+
# A list of identities that are allowed access through this [EgressPolicy].
|
1498
|
+
# Should be in the format of email address. The email address should represent
|
1499
|
+
# individual user or service account only.
|
1500
|
+
# Corresponds to the JSON property `identities`
|
1501
|
+
# @return [Array<String>]
|
1502
|
+
attr_accessor :identities
|
1503
|
+
|
1504
|
+
# Specifies the type of identities that are allowed access to outside the
|
1505
|
+
# perimeter. If left unspecified, then members of `identities` field will be
|
1506
|
+
# allowed access.
|
1507
|
+
# Corresponds to the JSON property `identityType`
|
1508
|
+
# @return [String]
|
1509
|
+
attr_accessor :identity_type
|
1510
|
+
|
1511
|
+
def initialize(**args)
|
1512
|
+
update!(**args)
|
1513
|
+
end
|
1514
|
+
|
1515
|
+
# Update properties of this object
|
1516
|
+
def update!(**args)
|
1517
|
+
@identities = args[:identities] if args.key?(:identities)
|
1518
|
+
@identity_type = args[:identity_type] if args.key?(:identity_type)
|
1519
|
+
end
|
1520
|
+
end
|
1521
|
+
|
1522
|
+
# Policy for egress from perimeter. EgressPolicies match requests based on `
|
1523
|
+
# egress_from` and `egress_to` stanzas. For an EgressPolicy to match, both `
|
1524
|
+
# egress_from` and `egress_to` stanzas must be matched. If an EgressPolicy
|
1525
|
+
# matches a request, the request is allowed to span the ServicePerimeter
|
1526
|
+
# boundary. For example, an EgressPolicy can be used to allow VMs on networks
|
1527
|
+
# within the ServicePerimeter to access a defined set of projects outside the
|
1528
|
+
# perimeter in certain contexts (e.g. to read data from a Cloud Storage bucket
|
1529
|
+
# or query against a BigQuery dataset). EgressPolicies are concerned with the *
|
1530
|
+
# resources* that a request relates as well as the API services and API actions
|
1531
|
+
# being used. They do not related to the direction of data movement. More
|
1532
|
+
# detailed documentation for this concept can be found in the descriptions of
|
1533
|
+
# EgressFrom and EgressTo.
|
1534
|
+
class GoogleIdentityAccesscontextmanagerV1EgressPolicy
|
1535
|
+
include Google::Apis::Core::Hashable
|
1536
|
+
|
1537
|
+
# Defines the conditions under which an EgressPolicy matches a request.
|
1538
|
+
# Conditions based on information about the source of the request. Note that if
|
1539
|
+
# the destination of the request is protected by a ServicePerimeter, then that
|
1540
|
+
# ServicePerimeter must have an IngressPolicy which allows access in order for
|
1541
|
+
# this request to succeed.
|
1542
|
+
# Corresponds to the JSON property `egressFrom`
|
1543
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1EgressFrom]
|
1544
|
+
attr_accessor :egress_from
|
1545
|
+
|
1546
|
+
# Defines the conditions under which an EgressPolicy matches a request.
|
1547
|
+
# Conditions are based on information about the ApiOperation intended to be
|
1548
|
+
# performed on the `resources` specified. Note that if the destination of the
|
1549
|
+
# request is protected by a ServicePerimeter, then that ServicePerimeter must
|
1550
|
+
# have an IngressPolicy which allows access in order for this request to succeed.
|
1551
|
+
# Corresponds to the JSON property `egressTo`
|
1552
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1EgressTo]
|
1553
|
+
attr_accessor :egress_to
|
1554
|
+
|
1555
|
+
def initialize(**args)
|
1556
|
+
update!(**args)
|
1557
|
+
end
|
1558
|
+
|
1559
|
+
# Update properties of this object
|
1560
|
+
def update!(**args)
|
1561
|
+
@egress_from = args[:egress_from] if args.key?(:egress_from)
|
1562
|
+
@egress_to = args[:egress_to] if args.key?(:egress_to)
|
1563
|
+
end
|
1564
|
+
end
|
1565
|
+
|
1566
|
+
# Defines the conditions under which an EgressPolicy matches a request.
|
1567
|
+
# Conditions are based on information about the ApiOperation intended to be
|
1568
|
+
# performed on the `resources` specified. Note that if the destination of the
|
1569
|
+
# request is protected by a ServicePerimeter, then that ServicePerimeter must
|
1570
|
+
# have an IngressPolicy which allows access in order for this request to succeed.
|
1571
|
+
class GoogleIdentityAccesscontextmanagerV1EgressTo
|
1572
|
+
include Google::Apis::Core::Hashable
|
1573
|
+
|
1574
|
+
# A list of ApiOperations that this egress rule applies to. A request matches if
|
1575
|
+
# it contains an operation/service in this list.
|
1576
|
+
# Corresponds to the JSON property `operations`
|
1577
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1ApiOperation>]
|
1578
|
+
attr_accessor :operations
|
1579
|
+
|
1580
|
+
# A list of resources, currently only projects in the form `projects/`, that
|
1581
|
+
# match this to stanza. A request matches if it contains a resource in this list.
|
1582
|
+
# If `*` is specified for resources, then this EgressTo rule will authorize
|
1583
|
+
# access to all resources outside the perimeter.
|
1584
|
+
# Corresponds to the JSON property `resources`
|
1585
|
+
# @return [Array<String>]
|
1586
|
+
attr_accessor :resources
|
1587
|
+
|
1588
|
+
def initialize(**args)
|
1589
|
+
update!(**args)
|
1590
|
+
end
|
1591
|
+
|
1592
|
+
# Update properties of this object
|
1593
|
+
def update!(**args)
|
1594
|
+
@operations = args[:operations] if args.key?(:operations)
|
1595
|
+
@resources = args[:resources] if args.key?(:resources)
|
1596
|
+
end
|
1597
|
+
end
|
1598
|
+
|
1599
|
+
# Defines the conditions under which an IngressPolicy matches a request.
|
1600
|
+
# Conditions are based on information about the source of the request.
|
1601
|
+
class GoogleIdentityAccesscontextmanagerV1IngressFrom
|
1602
|
+
include Google::Apis::Core::Hashable
|
1603
|
+
|
1604
|
+
# A list of identities that are allowed access through this ingress policy.
|
1605
|
+
# Should be in the format of email address. The email address should represent
|
1606
|
+
# individual user or service account only.
|
1607
|
+
# Corresponds to the JSON property `identities`
|
1608
|
+
# @return [Array<String>]
|
1609
|
+
attr_accessor :identities
|
1610
|
+
|
1611
|
+
# Specifies the type of identities that are allowed access from outside the
|
1612
|
+
# perimeter. If left unspecified, then members of `identities` field will be
|
1613
|
+
# allowed access.
|
1614
|
+
# Corresponds to the JSON property `identityType`
|
1615
|
+
# @return [String]
|
1616
|
+
attr_accessor :identity_type
|
1617
|
+
|
1618
|
+
# Sources that this IngressPolicy authorizes access from.
|
1619
|
+
# Corresponds to the JSON property `sources`
|
1620
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1IngressSource>]
|
1621
|
+
attr_accessor :sources
|
1622
|
+
|
1623
|
+
def initialize(**args)
|
1624
|
+
update!(**args)
|
1625
|
+
end
|
1626
|
+
|
1627
|
+
# Update properties of this object
|
1628
|
+
def update!(**args)
|
1629
|
+
@identities = args[:identities] if args.key?(:identities)
|
1630
|
+
@identity_type = args[:identity_type] if args.key?(:identity_type)
|
1631
|
+
@sources = args[:sources] if args.key?(:sources)
|
1632
|
+
end
|
1633
|
+
end
|
1634
|
+
|
1635
|
+
# Policy for ingress into ServicePerimeter. IngressPolicies match requests based
|
1636
|
+
# on `ingress_from` and `ingress_to` stanzas. For an ingress policy to match,
|
1637
|
+
# both the `ingress_from` and `ingress_to` stanzas must be matched. If an
|
1638
|
+
# IngressPolicy matches a request, the request is allowed through the perimeter
|
1639
|
+
# boundary from outside the perimeter. For example, access from the internet can
|
1640
|
+
# be allowed either based on an AccessLevel or, for traffic hosted on Google
|
1641
|
+
# Cloud, the project of the source network. For access from private networks,
|
1642
|
+
# using the project of the hosting network is required. Individual ingress
|
1643
|
+
# policies can be limited by restricting which services and/or actions they
|
1644
|
+
# match using the `ingress_to` field.
|
1645
|
+
class GoogleIdentityAccesscontextmanagerV1IngressPolicy
|
1646
|
+
include Google::Apis::Core::Hashable
|
1647
|
+
|
1648
|
+
# Defines the conditions under which an IngressPolicy matches a request.
|
1649
|
+
# Conditions are based on information about the source of the request.
|
1650
|
+
# Corresponds to the JSON property `ingressFrom`
|
1651
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1IngressFrom]
|
1652
|
+
attr_accessor :ingress_from
|
1653
|
+
|
1654
|
+
# Defines the conditions under which an IngressPolicy matches a request.
|
1655
|
+
# Conditions are based on information about the ApiOperation intended to be
|
1656
|
+
# performed on the destination of the request.
|
1657
|
+
# Corresponds to the JSON property `ingressTo`
|
1658
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1IngressTo]
|
1659
|
+
attr_accessor :ingress_to
|
1660
|
+
|
1661
|
+
def initialize(**args)
|
1662
|
+
update!(**args)
|
1663
|
+
end
|
1664
|
+
|
1665
|
+
# Update properties of this object
|
1666
|
+
def update!(**args)
|
1667
|
+
@ingress_from = args[:ingress_from] if args.key?(:ingress_from)
|
1668
|
+
@ingress_to = args[:ingress_to] if args.key?(:ingress_to)
|
1669
|
+
end
|
1670
|
+
end
|
1671
|
+
|
1672
|
+
# The source that IngressPolicy authorizes access from.
|
1673
|
+
class GoogleIdentityAccesscontextmanagerV1IngressSource
|
1674
|
+
include Google::Apis::Core::Hashable
|
1675
|
+
|
1676
|
+
# An AccessLevel resource name that allow resources within the ServicePerimeters
|
1677
|
+
# to be accessed from the internet. AccessLevels listed must be in the same
|
1678
|
+
# policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will
|
1679
|
+
# cause an error. If no AccessLevel names are listed, resources within the
|
1680
|
+
# perimeter can only be accessed via Google Cloud calls with request origins
|
1681
|
+
# within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`
|
1682
|
+
# . If `*` is specified, then all IngressSources will be allowed.
|
1683
|
+
# Corresponds to the JSON property `accessLevel`
|
1684
|
+
# @return [String]
|
1685
|
+
attr_accessor :access_level
|
1686
|
+
|
1687
|
+
# A Google Cloud resource that is allowed to ingress the perimeter. Requests
|
1688
|
+
# from these resources will be allowed to access perimeter data. Currently only
|
1689
|
+
# projects are allowed. Format: `projects/`project_number`` The project may be
|
1690
|
+
# in any Google Cloud organization, not just the organization that the perimeter
|
1691
|
+
# is defined in. `*` is not allowed, the case of allowing all Google Cloud
|
1692
|
+
# resources only is not supported.
|
1693
|
+
# Corresponds to the JSON property `resource`
|
1694
|
+
# @return [String]
|
1695
|
+
attr_accessor :resource
|
1696
|
+
|
1697
|
+
def initialize(**args)
|
1698
|
+
update!(**args)
|
1699
|
+
end
|
1700
|
+
|
1701
|
+
# Update properties of this object
|
1702
|
+
def update!(**args)
|
1703
|
+
@access_level = args[:access_level] if args.key?(:access_level)
|
1704
|
+
@resource = args[:resource] if args.key?(:resource)
|
1705
|
+
end
|
1706
|
+
end
|
1707
|
+
|
1708
|
+
# Defines the conditions under which an IngressPolicy matches a request.
|
1709
|
+
# Conditions are based on information about the ApiOperation intended to be
|
1710
|
+
# performed on the destination of the request.
|
1711
|
+
class GoogleIdentityAccesscontextmanagerV1IngressTo
|
1712
|
+
include Google::Apis::Core::Hashable
|
1713
|
+
|
1714
|
+
# A list of ApiOperations the sources specified in corresponding IngressFrom are
|
1715
|
+
# allowed to perform in this ServicePerimeter.
|
1716
|
+
# Corresponds to the JSON property `operations`
|
1717
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1ApiOperation>]
|
1718
|
+
attr_accessor :operations
|
1719
|
+
|
1720
|
+
# A list of resources, currently only projects in the form `projects/`,
|
1721
|
+
# protected by this ServicePerimeter that are allowed to be accessed by sources
|
1722
|
+
# defined in the corresponding IngressFrom. A request matches if it contains a
|
1723
|
+
# resource in this list. If `*` is specified for resources, then this IngressTo
|
1724
|
+
# rule will authorize access to all resources inside the perimeter, provided
|
1725
|
+
# that the request also matches the `operations` field.
|
1726
|
+
# Corresponds to the JSON property `resources`
|
1727
|
+
# @return [Array<String>]
|
1728
|
+
attr_accessor :resources
|
1729
|
+
|
1730
|
+
def initialize(**args)
|
1731
|
+
update!(**args)
|
1732
|
+
end
|
1733
|
+
|
1734
|
+
# Update properties of this object
|
1735
|
+
def update!(**args)
|
1736
|
+
@operations = args[:operations] if args.key?(:operations)
|
1737
|
+
@resources = args[:resources] if args.key?(:resources)
|
1738
|
+
end
|
1739
|
+
end
|
1740
|
+
|
1741
|
+
# An allowed method or permission of a service specified in ApiOperation.
|
1742
|
+
class GoogleIdentityAccesscontextmanagerV1MethodSelector
|
1743
|
+
include Google::Apis::Core::Hashable
|
1744
|
+
|
1745
|
+
# Value for `method` should be a valid method name for the corresponding `
|
1746
|
+
# service_name` in ApiOperation. If `*` used as value for `method`, then ALL
|
1747
|
+
# methods and permissions are allowed.
|
1748
|
+
# Corresponds to the JSON property `method`
|
1749
|
+
# @return [String]
|
1750
|
+
attr_accessor :method_prop
|
1751
|
+
|
1752
|
+
# Value for `permission` should be a valid Cloud IAM permission for the
|
1753
|
+
# corresponding `service_name` in ApiOperation.
|
1754
|
+
# Corresponds to the JSON property `permission`
|
1755
|
+
# @return [String]
|
1756
|
+
attr_accessor :permission
|
1757
|
+
|
1758
|
+
def initialize(**args)
|
1759
|
+
update!(**args)
|
1760
|
+
end
|
1761
|
+
|
1762
|
+
# Update properties of this object
|
1763
|
+
def update!(**args)
|
1764
|
+
@method_prop = args[:method_prop] if args.key?(:method_prop)
|
1765
|
+
@permission = args[:permission] if args.key?(:permission)
|
1766
|
+
end
|
1767
|
+
end
|
1768
|
+
|
1769
|
+
# A restriction on the OS type and version of devices making requests.
|
1770
|
+
class GoogleIdentityAccesscontextmanagerV1OsConstraint
|
1771
|
+
include Google::Apis::Core::Hashable
|
1772
|
+
|
1773
|
+
# The minimum allowed OS version. If not set, any version of this OS satisfies
|
1774
|
+
# the constraint. Format: `"major.minor.patch"`. Examples: `"10.5.301"`, `"9.2.1"
|
1775
|
+
# `.
|
1776
|
+
# Corresponds to the JSON property `minimumVersion`
|
1777
|
+
# @return [String]
|
1778
|
+
attr_accessor :minimum_version
|
1779
|
+
|
1780
|
+
# Required. The allowed OS type.
|
1781
|
+
# Corresponds to the JSON property `osType`
|
1782
|
+
# @return [String]
|
1783
|
+
attr_accessor :os_type
|
1784
|
+
|
1785
|
+
# Only allows requests from devices with a verified Chrome OS. Verifications
|
1786
|
+
# includes requirements that the device is enterprise-managed, conformant to
|
1787
|
+
# domain policies, and the caller has permission to call the API targeted by the
|
1788
|
+
# request.
|
1789
|
+
# Corresponds to the JSON property `requireVerifiedChromeOs`
|
1790
|
+
# @return [Boolean]
|
1791
|
+
attr_accessor :require_verified_chrome_os
|
1792
|
+
alias_method :require_verified_chrome_os?, :require_verified_chrome_os
|
1793
|
+
|
1794
|
+
def initialize(**args)
|
1795
|
+
update!(**args)
|
1796
|
+
end
|
1797
|
+
|
1798
|
+
# Update properties of this object
|
1799
|
+
def update!(**args)
|
1800
|
+
@minimum_version = args[:minimum_version] if args.key?(:minimum_version)
|
1801
|
+
@os_type = args[:os_type] if args.key?(:os_type)
|
1802
|
+
@require_verified_chrome_os = args[:require_verified_chrome_os] if args.key?(:require_verified_chrome_os)
|
1803
|
+
end
|
1804
|
+
end
|
1805
|
+
|
1806
|
+
# `ServicePerimeter` describes a set of Google Cloud resources which can freely
|
1807
|
+
# import and export data amongst themselves, but not export outside of the `
|
1808
|
+
# ServicePerimeter`. If a request with a source within this `ServicePerimeter`
|
1809
|
+
# has a target outside of the `ServicePerimeter`, the request will be blocked.
|
1810
|
+
# Otherwise the request is allowed. There are two types of Service Perimeter -
|
1811
|
+
# Regular and Bridge. Regular Service Perimeters cannot overlap, a single Google
|
1812
|
+
# Cloud project can only belong to a single regular Service Perimeter. Service
|
1813
|
+
# Perimeter Bridges can contain only Google Cloud projects as members, a single
|
1814
|
+
# Google Cloud project may belong to multiple Service Perimeter Bridges.
|
1815
|
+
class GoogleIdentityAccesscontextmanagerV1ServicePerimeter
|
1816
|
+
include Google::Apis::Core::Hashable
|
1817
|
+
|
1818
|
+
# Description of the `ServicePerimeter` and its use. Does not affect behavior.
|
1819
|
+
# Corresponds to the JSON property `description`
|
1820
|
+
# @return [String]
|
1821
|
+
attr_accessor :description
|
1822
|
+
|
1823
|
+
# Required. Resource name for the ServicePerimeter. The `short_name` component
|
1824
|
+
# must begin with a letter and only include alphanumeric and '_'. Format: `
|
1825
|
+
# accessPolicies/`policy_id`/servicePerimeters/`short_name``
|
1826
|
+
# Corresponds to the JSON property `name`
|
1827
|
+
# @return [String]
|
1828
|
+
attr_accessor :name
|
1829
|
+
|
1830
|
+
# Perimeter type indicator. A single project is allowed to be a member of single
|
1831
|
+
# regular perimeter, but multiple service perimeter bridges. A project cannot be
|
1832
|
+
# a included in a perimeter bridge without being included in regular perimeter.
|
1833
|
+
# For perimeter bridges, the restricted service list as well as access level
|
1834
|
+
# lists must be empty.
|
1835
|
+
# Corresponds to the JSON property `perimeterType`
|
1836
|
+
# @return [String]
|
1837
|
+
attr_accessor :perimeter_type
|
1838
|
+
|
1839
|
+
# `ServicePerimeterConfig` specifies a set of Google Cloud resources that
|
1840
|
+
# describe specific Service Perimeter configuration.
|
1841
|
+
# Corresponds to the JSON property `spec`
|
1842
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig]
|
1843
|
+
attr_accessor :spec
|
1844
|
+
|
1845
|
+
# `ServicePerimeterConfig` specifies a set of Google Cloud resources that
|
1846
|
+
# describe specific Service Perimeter configuration.
|
1847
|
+
# Corresponds to the JSON property `status`
|
1848
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig]
|
1849
|
+
attr_accessor :status
|
1850
|
+
|
1851
|
+
# Human readable title. Must be unique within the Policy.
|
1852
|
+
# Corresponds to the JSON property `title`
|
1853
|
+
# @return [String]
|
1854
|
+
attr_accessor :title
|
1855
|
+
|
1856
|
+
# Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly exists
|
1857
|
+
# for all Service Perimeters, and that spec is identical to the status for those
|
1858
|
+
# Service Perimeters. When this flag is set, it inhibits the generation of the
|
1859
|
+
# implicit spec, thereby allowing the user to explicitly provide a configuration
|
1860
|
+
# ("spec") to use in a dry-run version of the Service Perimeter. This allows the
|
1861
|
+
# user to test changes to the enforced config ("status") without actually
|
1862
|
+
# enforcing them. This testing is done through analyzing the differences between
|
1863
|
+
# currently enforced and suggested restrictions. use_explicit_dry_run_spec must
|
1864
|
+
# bet set to True if any of the fields in the spec are set to non-default values.
|
1865
|
+
# Corresponds to the JSON property `useExplicitDryRunSpec`
|
1866
|
+
# @return [Boolean]
|
1867
|
+
attr_accessor :use_explicit_dry_run_spec
|
1868
|
+
alias_method :use_explicit_dry_run_spec?, :use_explicit_dry_run_spec
|
1869
|
+
|
1870
|
+
def initialize(**args)
|
1871
|
+
update!(**args)
|
1872
|
+
end
|
1873
|
+
|
1874
|
+
# Update properties of this object
|
1875
|
+
def update!(**args)
|
1876
|
+
@description = args[:description] if args.key?(:description)
|
1877
|
+
@name = args[:name] if args.key?(:name)
|
1878
|
+
@perimeter_type = args[:perimeter_type] if args.key?(:perimeter_type)
|
1879
|
+
@spec = args[:spec] if args.key?(:spec)
|
1880
|
+
@status = args[:status] if args.key?(:status)
|
1881
|
+
@title = args[:title] if args.key?(:title)
|
1882
|
+
@use_explicit_dry_run_spec = args[:use_explicit_dry_run_spec] if args.key?(:use_explicit_dry_run_spec)
|
1883
|
+
end
|
1884
|
+
end
|
1885
|
+
|
1886
|
+
# `ServicePerimeterConfig` specifies a set of Google Cloud resources that
|
1887
|
+
# describe specific Service Perimeter configuration.
|
1888
|
+
class GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig
|
1889
|
+
include Google::Apis::Core::Hashable
|
1890
|
+
|
1891
|
+
# A list of `AccessLevel` resource names that allow resources within the `
|
1892
|
+
# ServicePerimeter` to be accessed from the internet. `AccessLevels` listed must
|
1893
|
+
# be in the same policy as this `ServicePerimeter`. Referencing a nonexistent `
|
1894
|
+
# AccessLevel` is a syntax error. If no `AccessLevel` names are listed,
|
1895
|
+
# resources within the perimeter can only be accessed via Google Cloud calls
|
1896
|
+
# with request origins within the perimeter. Example: `"accessPolicies/MY_POLICY/
|
1897
|
+
# accessLevels/MY_LEVEL"`. For Service Perimeter Bridge, must be empty.
|
1898
|
+
# Corresponds to the JSON property `accessLevels`
|
1899
|
+
# @return [Array<String>]
|
1900
|
+
attr_accessor :access_levels
|
1901
|
+
|
1902
|
+
# List of EgressPolicies to apply to the perimeter. A perimeter may have
|
1903
|
+
# multiple EgressPolicies, each of which is evaluated separately. Access is
|
1904
|
+
# granted if any EgressPolicy grants it. Must be empty for a perimeter bridge.
|
1905
|
+
# Corresponds to the JSON property `egressPolicies`
|
1906
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1EgressPolicy>]
|
1907
|
+
attr_accessor :egress_policies
|
1908
|
+
|
1909
|
+
# List of IngressPolicies to apply to the perimeter. A perimeter may have
|
1910
|
+
# multiple IngressPolicies, each of which is evaluated separately. Access is
|
1911
|
+
# granted if any Ingress Policy grants it. Must be empty for a perimeter bridge.
|
1912
|
+
# Corresponds to the JSON property `ingressPolicies`
|
1913
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1IngressPolicy>]
|
1914
|
+
attr_accessor :ingress_policies
|
1915
|
+
|
1916
|
+
# A list of Google Cloud resources that are inside of the service perimeter.
|
1917
|
+
# Currently only projects are allowed. Format: `projects/`project_number``
|
1918
|
+
# Corresponds to the JSON property `resources`
|
1919
|
+
# @return [Array<String>]
|
1920
|
+
attr_accessor :resources
|
1921
|
+
|
1922
|
+
# Google Cloud services that are subject to the Service Perimeter restrictions.
|
1923
|
+
# For example, if `storage.googleapis.com` is specified, access to the storage
|
1924
|
+
# buckets inside the perimeter must meet the perimeter's access restrictions.
|
1925
|
+
# Corresponds to the JSON property `restrictedServices`
|
1926
|
+
# @return [Array<String>]
|
1927
|
+
attr_accessor :restricted_services
|
1928
|
+
|
1929
|
+
# Specifies how APIs are allowed to communicate within the Service Perimeter.
|
1930
|
+
# Corresponds to the JSON property `vpcAccessibleServices`
|
1931
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices]
|
1932
|
+
attr_accessor :vpc_accessible_services
|
1933
|
+
|
1934
|
+
def initialize(**args)
|
1935
|
+
update!(**args)
|
1936
|
+
end
|
1937
|
+
|
1938
|
+
# Update properties of this object
|
1939
|
+
def update!(**args)
|
1940
|
+
@access_levels = args[:access_levels] if args.key?(:access_levels)
|
1941
|
+
@egress_policies = args[:egress_policies] if args.key?(:egress_policies)
|
1942
|
+
@ingress_policies = args[:ingress_policies] if args.key?(:ingress_policies)
|
1943
|
+
@resources = args[:resources] if args.key?(:resources)
|
1944
|
+
@restricted_services = args[:restricted_services] if args.key?(:restricted_services)
|
1945
|
+
@vpc_accessible_services = args[:vpc_accessible_services] if args.key?(:vpc_accessible_services)
|
1946
|
+
end
|
1947
|
+
end
|
1948
|
+
|
1949
|
+
# Specifies how APIs are allowed to communicate within the Service Perimeter.
|
1950
|
+
class GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices
|
1951
|
+
include Google::Apis::Core::Hashable
|
1952
|
+
|
1953
|
+
# The list of APIs usable within the Service Perimeter. Must be empty unless '
|
1954
|
+
# enable_restriction' is True. You can specify a list of individual services, as
|
1955
|
+
# well as include the 'RESTRICTED-SERVICES' value, which automatically includes
|
1956
|
+
# all of the services protected by the perimeter.
|
1957
|
+
# Corresponds to the JSON property `allowedServices`
|
1958
|
+
# @return [Array<String>]
|
1959
|
+
attr_accessor :allowed_services
|
1960
|
+
|
1961
|
+
# Whether to restrict API calls within the Service Perimeter to the list of APIs
|
1962
|
+
# specified in 'allowed_services'.
|
1963
|
+
# Corresponds to the JSON property `enableRestriction`
|
1964
|
+
# @return [Boolean]
|
1965
|
+
attr_accessor :enable_restriction
|
1966
|
+
alias_method :enable_restriction?, :enable_restriction
|
1967
|
+
|
1968
|
+
def initialize(**args)
|
1969
|
+
update!(**args)
|
1970
|
+
end
|
1971
|
+
|
1972
|
+
# Update properties of this object
|
1973
|
+
def update!(**args)
|
1974
|
+
@allowed_services = args[:allowed_services] if args.key?(:allowed_services)
|
1975
|
+
@enable_restriction = args[:enable_restriction] if args.key?(:enable_restriction)
|
1976
|
+
end
|
1977
|
+
end
|
1978
|
+
|
1979
|
+
# An analysis message to group the query and results.
|
1980
|
+
class IamPolicyAnalysis
|
1981
|
+
include Google::Apis::Core::Hashable
|
1982
|
+
|
1983
|
+
# IAM policy analysis query message.
|
1984
|
+
# Corresponds to the JSON property `analysisQuery`
|
1985
|
+
# @return [Google::Apis::CloudassetV1p4beta1::IamPolicyAnalysisQuery]
|
1986
|
+
attr_accessor :analysis_query
|
1987
|
+
|
1988
|
+
# A list of IamPolicyAnalysisResult that matches the analysis query, or empty if
|
1989
|
+
# no result is found.
|
1990
|
+
# Corresponds to the JSON property `analysisResults`
|
1991
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::IamPolicyAnalysisResult>]
|
1992
|
+
attr_accessor :analysis_results
|
1993
|
+
|
1994
|
+
# Represents whether all entries in the analysis_results have been fully
|
1995
|
+
# explored to answer the query.
|
1996
|
+
# Corresponds to the JSON property `fullyExplored`
|
1997
|
+
# @return [Boolean]
|
1998
|
+
attr_accessor :fully_explored
|
1999
|
+
alias_method :fully_explored?, :fully_explored
|
2000
|
+
|
2001
|
+
def initialize(**args)
|
2002
|
+
update!(**args)
|
2003
|
+
end
|
2004
|
+
|
2005
|
+
# Update properties of this object
|
2006
|
+
def update!(**args)
|
2007
|
+
@analysis_query = args[:analysis_query] if args.key?(:analysis_query)
|
2008
|
+
@analysis_results = args[:analysis_results] if args.key?(:analysis_results)
|
2009
|
+
@fully_explored = args[:fully_explored] if args.key?(:fully_explored)
|
2010
|
+
end
|
2011
|
+
end
|
2012
|
+
|
2013
|
+
# Output configuration for export IAM policy analysis destination.
|
2014
|
+
class IamPolicyAnalysisOutputConfig
|
2015
|
+
include Google::Apis::Core::Hashable
|
2016
|
+
|
2017
|
+
# A Cloud Storage location.
|
2018
|
+
# Corresponds to the JSON property `gcsDestination`
|
2019
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GcsDestination]
|
2020
|
+
attr_accessor :gcs_destination
|
2021
|
+
|
2022
|
+
def initialize(**args)
|
2023
|
+
update!(**args)
|
2024
|
+
end
|
2025
|
+
|
2026
|
+
# Update properties of this object
|
2027
|
+
def update!(**args)
|
2028
|
+
@gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
|
2029
|
+
end
|
2030
|
+
end
|
2031
|
+
|
2032
|
+
# IAM policy analysis query message.
|
2033
|
+
class IamPolicyAnalysisQuery
|
2034
|
+
include Google::Apis::Core::Hashable
|
2035
|
+
|
2036
|
+
# Specifies roles and/or permissions to analyze, to determine both the
|
2037
|
+
# identities possessing them and the resources they control. If multiple values
|
2038
|
+
# are specified, results will include identities and resources matching any of
|
2039
|
+
# them. The total number of roles and permissions should be equal or less than
|
2040
|
+
# 10.
|
2041
|
+
# Corresponds to the JSON property `accessSelector`
|
2042
|
+
# @return [Google::Apis::CloudassetV1p4beta1::AccessSelector]
|
2043
|
+
attr_accessor :access_selector
|
2044
|
+
|
2045
|
+
# Specifies an identity for which to determine resource access, based on roles
|
2046
|
+
# assigned either directly to them or to the groups they belong to, directly or
|
2047
|
+
# indirectly.
|
2048
|
+
# Corresponds to the JSON property `identitySelector`
|
2049
|
+
# @return [Google::Apis::CloudassetV1p4beta1::IdentitySelector]
|
2050
|
+
attr_accessor :identity_selector
|
2051
|
+
|
2052
|
+
# Required. The relative name of the root asset. Only resources and IAM policies
|
2053
|
+
# within the parent will be analyzed. This can only be an organization number (
|
2054
|
+
# such as "organizations/123"), a folder number (such as "folders/123"), a
|
2055
|
+
# project ID (such as "projects/my-project-id"), or a project number (such as "
|
2056
|
+
# projects/12345"). To know how to get organization id, visit [here ](https://
|
2057
|
+
# cloud.google.com/resource-manager/docs/creating-managing-organization#
|
2058
|
+
# retrieving_your_organization_id). To know how to get folder or project id,
|
2059
|
+
# visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-
|
2060
|
+
# folders#viewing_or_listing_folders_and_projects).
|
2061
|
+
# Corresponds to the JSON property `parent`
|
2062
|
+
# @return [String]
|
2063
|
+
attr_accessor :parent
|
2064
|
+
|
2065
|
+
# Specifies the resource to analyze for access policies, which may be set
|
2066
|
+
# directly on the resource, or on ancestors such as organizations, folders or
|
2067
|
+
# projects.
|
2068
|
+
# Corresponds to the JSON property `resourceSelector`
|
2069
|
+
# @return [Google::Apis::CloudassetV1p4beta1::ResourceSelector]
|
2070
|
+
attr_accessor :resource_selector
|
2071
|
+
|
2072
|
+
def initialize(**args)
|
2073
|
+
update!(**args)
|
2074
|
+
end
|
2075
|
+
|
2076
|
+
# Update properties of this object
|
2077
|
+
def update!(**args)
|
2078
|
+
@access_selector = args[:access_selector] if args.key?(:access_selector)
|
2079
|
+
@identity_selector = args[:identity_selector] if args.key?(:identity_selector)
|
2080
|
+
@parent = args[:parent] if args.key?(:parent)
|
2081
|
+
@resource_selector = args[:resource_selector] if args.key?(:resource_selector)
|
2082
|
+
end
|
2083
|
+
end
|
2084
|
+
|
2085
|
+
# IAM Policy analysis result, consisting of one IAM policy binding and derived
|
2086
|
+
# access control lists.
|
2087
|
+
class IamPolicyAnalysisResult
|
2088
|
+
include Google::Apis::Core::Hashable
|
2089
|
+
|
2090
|
+
# The access control lists derived from the iam_binding that match or
|
2091
|
+
# potentially match resource and access selectors specified in the request.
|
2092
|
+
# Corresponds to the JSON property `accessControlLists`
|
2093
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1AccessControlList>]
|
2094
|
+
attr_accessor :access_control_lists
|
2095
|
+
|
2096
|
+
# The [full resource name](https://cloud.google.com/asset-inventory/docs/
|
2097
|
+
# resource-name-format) of the resource to which the iam_binding policy attaches.
|
2098
|
+
# Corresponds to the JSON property `attachedResourceFullName`
|
2099
|
+
# @return [String]
|
2100
|
+
attr_accessor :attached_resource_full_name
|
2101
|
+
|
2102
|
+
# Represents whether all analyses on the iam_binding have successfully finished.
|
2103
|
+
# Corresponds to the JSON property `fullyExplored`
|
2104
|
+
# @return [Boolean]
|
2105
|
+
attr_accessor :fully_explored
|
2106
|
+
alias_method :fully_explored?, :fully_explored
|
2107
|
+
|
2108
|
+
# Associates `members` with a `role`.
|
2109
|
+
# Corresponds to the JSON property `iamBinding`
|
2110
|
+
# @return [Google::Apis::CloudassetV1p4beta1::Binding]
|
2111
|
+
attr_accessor :iam_binding
|
2112
|
+
|
2113
|
+
# The identity list derived from members of the iam_binding that match or
|
2114
|
+
# potentially match identity selector specified in the request.
|
2115
|
+
# Corresponds to the JSON property `identityList`
|
2116
|
+
# @return [Google::Apis::CloudassetV1p4beta1::GoogleCloudAssetV1p4beta1IdentityList]
|
2117
|
+
attr_accessor :identity_list
|
2118
|
+
|
2119
|
+
def initialize(**args)
|
2120
|
+
update!(**args)
|
2121
|
+
end
|
2122
|
+
|
2123
|
+
# Update properties of this object
|
2124
|
+
def update!(**args)
|
2125
|
+
@access_control_lists = args[:access_control_lists] if args.key?(:access_control_lists)
|
2126
|
+
@attached_resource_full_name = args[:attached_resource_full_name] if args.key?(:attached_resource_full_name)
|
2127
|
+
@fully_explored = args[:fully_explored] if args.key?(:fully_explored)
|
2128
|
+
@iam_binding = args[:iam_binding] if args.key?(:iam_binding)
|
2129
|
+
@identity_list = args[:identity_list] if args.key?(:identity_list)
|
2130
|
+
end
|
2131
|
+
end
|
2132
|
+
|
2133
|
+
# Specifies an identity for which to determine resource access, based on roles
|
2134
|
+
# assigned either directly to them or to the groups they belong to, directly or
|
2135
|
+
# indirectly.
|
2136
|
+
class IdentitySelector
|
2137
|
+
include Google::Apis::Core::Hashable
|
2138
|
+
|
2139
|
+
# Required. The identity appear in the form of members in [IAM policy binding](
|
2140
|
+
# https://cloud.google.com/iam/reference/rest/v1/Binding). The examples of
|
2141
|
+
# supported forms are: "user:mike@example.com", "group:admins@example.com", "
|
2142
|
+
# domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com".
|
2143
|
+
# Notice that wildcard characters (such as * and ?) are not supported. You must
|
2144
|
+
# give a specific identity.
|
2145
|
+
# Corresponds to the JSON property `identity`
|
2146
|
+
# @return [String]
|
2147
|
+
attr_accessor :identity
|
2148
|
+
|
2149
|
+
def initialize(**args)
|
2150
|
+
update!(**args)
|
2151
|
+
end
|
2152
|
+
|
2153
|
+
# Update properties of this object
|
2154
|
+
def update!(**args)
|
2155
|
+
@identity = args[:identity] if args.key?(:identity)
|
2156
|
+
end
|
2157
|
+
end
|
2158
|
+
|
2159
|
+
# This resource represents a long-running operation that is the result of a
|
2160
|
+
# network API call.
|
2161
|
+
class Operation
|
2162
|
+
include Google::Apis::Core::Hashable
|
2163
|
+
|
2164
|
+
# If the value is `false`, it means the operation is still in progress. If `true`
|
2165
|
+
# , the operation is completed, and either `error` or `response` is available.
|
2166
|
+
# Corresponds to the JSON property `done`
|
2167
|
+
# @return [Boolean]
|
2168
|
+
attr_accessor :done
|
2169
|
+
alias_method :done?, :done
|
2170
|
+
|
2171
|
+
# The `Status` type defines a logical error model that is suitable for different
|
2172
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
2173
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
2174
|
+
# data: error code, error message, and error details. You can find out more
|
2175
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
2176
|
+
# //cloud.google.com/apis/design/errors).
|
2177
|
+
# Corresponds to the JSON property `error`
|
2178
|
+
# @return [Google::Apis::CloudassetV1p4beta1::Status]
|
2179
|
+
attr_accessor :error
|
2180
|
+
|
2181
|
+
# Service-specific metadata associated with the operation. It typically contains
|
2182
|
+
# progress information and common metadata such as create time. Some services
|
2183
|
+
# might not provide such metadata. Any method that returns a long-running
|
2184
|
+
# operation should document the metadata type, if any.
|
2185
|
+
# Corresponds to the JSON property `metadata`
|
2186
|
+
# @return [Hash<String,Object>]
|
2187
|
+
attr_accessor :metadata
|
2188
|
+
|
2189
|
+
# The server-assigned name, which is only unique within the same service that
|
2190
|
+
# originally returns it. If you use the default HTTP mapping, the `name` should
|
2191
|
+
# be a resource name ending with `operations/`unique_id``.
|
2192
|
+
# Corresponds to the JSON property `name`
|
2193
|
+
# @return [String]
|
2194
|
+
attr_accessor :name
|
2195
|
+
|
2196
|
+
# The normal response of the operation in case of success. If the original
|
2197
|
+
# method returns no data on success, such as `Delete`, the response is `google.
|
2198
|
+
# protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
|
2199
|
+
# the response should be the resource. For other methods, the response should
|
2200
|
+
# have the type `XxxResponse`, where `Xxx` is the original method name. For
|
2201
|
+
# example, if the original method name is `TakeSnapshot()`, the inferred
|
2202
|
+
# response type is `TakeSnapshotResponse`.
|
2203
|
+
# Corresponds to the JSON property `response`
|
2204
|
+
# @return [Hash<String,Object>]
|
2205
|
+
attr_accessor :response
|
2206
|
+
|
2207
|
+
def initialize(**args)
|
2208
|
+
update!(**args)
|
2209
|
+
end
|
2210
|
+
|
2211
|
+
# Update properties of this object
|
2212
|
+
def update!(**args)
|
2213
|
+
@done = args[:done] if args.key?(:done)
|
2214
|
+
@error = args[:error] if args.key?(:error)
|
2215
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
2216
|
+
@name = args[:name] if args.key?(:name)
|
2217
|
+
@response = args[:response] if args.key?(:response)
|
2218
|
+
end
|
2219
|
+
end
|
2220
|
+
|
2221
|
+
# Contains request options.
|
2222
|
+
class Options
|
2223
|
+
include Google::Apis::Core::Hashable
|
2224
|
+
|
2225
|
+
# Optional. If true, the response will include access analysis from identities
|
2226
|
+
# to resources via service account impersonation. This is a very expensive
|
2227
|
+
# operation, because many derived queries will be executed. For example, if the
|
2228
|
+
# request analyzes for which resources user A has permission P, and there's an
|
2229
|
+
# IAM policy states user A has iam.serviceAccounts.getAccessToken permission to
|
2230
|
+
# a service account SA, and there's another IAM policy states service account SA
|
2231
|
+
# has permission P to a GCP folder F, then user A potentially has access to the
|
2232
|
+
# GCP folder F. And those advanced analysis results will be included in
|
2233
|
+
# AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Another
|
2234
|
+
# example, if the request analyzes for who has permission P to a GCP folder F,
|
2235
|
+
# and there's an IAM policy states user A has iam.serviceAccounts.actAs
|
752
2236
|
# permission to a service account SA, and there's another IAM policy states
|
753
2237
|
# service account SA has permission P to the GCP folder F, then user A
|
754
2238
|
# potentially has access to the GCP folder F. And those advanced analysis
|
@@ -820,6 +2304,96 @@ module Google
|
|
820
2304
|
end
|
821
2305
|
end
|
822
2306
|
|
2307
|
+
# An Identity and Access Management (IAM) policy, which specifies access
|
2308
|
+
# controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
|
2309
|
+
# A `binding` binds one or more `members` to a single `role`. Members can be
|
2310
|
+
# user accounts, service accounts, Google groups, and domains (such as G Suite).
|
2311
|
+
# A `role` is a named list of permissions; each `role` can be an IAM predefined
|
2312
|
+
# role or a user-created custom role. For some types of Google Cloud resources,
|
2313
|
+
# a `binding` can also specify a `condition`, which is a logical expression that
|
2314
|
+
# allows access to a resource only if the expression evaluates to `true`. A
|
2315
|
+
# condition can add constraints based on attributes of the request, the resource,
|
2316
|
+
# or both. To learn which resources support conditions in their IAM policies,
|
2317
|
+
# see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
|
2318
|
+
# resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
|
2319
|
+
# resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
|
2320
|
+
# group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
|
2321
|
+
# appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
|
2322
|
+
# organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
|
2323
|
+
# title": "expirable access", "description": "Does not grant access after Sep
|
2324
|
+
# 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
|
2325
|
+
# ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
|
2326
|
+
# members: - user:mike@example.com - group:admins@example.com - domain:google.
|
2327
|
+
# com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
|
2328
|
+
# resourcemanager.organizationAdmin - members: - user:eve@example.com role:
|
2329
|
+
# roles/resourcemanager.organizationViewer condition: title: expirable access
|
2330
|
+
# description: Does not grant access after Sep 2020 expression: request.time <
|
2331
|
+
# timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
|
2332
|
+
# description of IAM and its features, see the [IAM documentation](https://cloud.
|
2333
|
+
# google.com/iam/docs/).
|
2334
|
+
class Policy
|
2335
|
+
include Google::Apis::Core::Hashable
|
2336
|
+
|
2337
|
+
# Specifies cloud audit logging configuration for this policy.
|
2338
|
+
# Corresponds to the JSON property `auditConfigs`
|
2339
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::AuditConfig>]
|
2340
|
+
attr_accessor :audit_configs
|
2341
|
+
|
2342
|
+
# Associates a list of `members` to a `role`. Optionally, may specify a `
|
2343
|
+
# condition` that determines how and when the `bindings` are applied. Each of
|
2344
|
+
# the `bindings` must contain at least one member.
|
2345
|
+
# Corresponds to the JSON property `bindings`
|
2346
|
+
# @return [Array<Google::Apis::CloudassetV1p4beta1::Binding>]
|
2347
|
+
attr_accessor :bindings
|
2348
|
+
|
2349
|
+
# `etag` is used for optimistic concurrency control as a way to help prevent
|
2350
|
+
# simultaneous updates of a policy from overwriting each other. It is strongly
|
2351
|
+
# suggested that systems make use of the `etag` in the read-modify-write cycle
|
2352
|
+
# to perform policy updates in order to avoid race conditions: An `etag` is
|
2353
|
+
# returned in the response to `getIamPolicy`, and systems are expected to put
|
2354
|
+
# that etag in the request to `setIamPolicy` to ensure that their change will be
|
2355
|
+
# applied to the same version of the policy. **Important:** If you use IAM
|
2356
|
+
# Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
|
2357
|
+
# If you omit this field, then IAM allows you to overwrite a version `3` policy
|
2358
|
+
# with a version `1` policy, and all of the conditions in the version `3` policy
|
2359
|
+
# are lost.
|
2360
|
+
# Corresponds to the JSON property `etag`
|
2361
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2362
|
+
# @return [String]
|
2363
|
+
attr_accessor :etag
|
2364
|
+
|
2365
|
+
# Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
|
2366
|
+
# Requests that specify an invalid value are rejected. Any operation that
|
2367
|
+
# affects conditional role bindings must specify version `3`. This requirement
|
2368
|
+
# applies to the following operations: * Getting a policy that includes a
|
2369
|
+
# conditional role binding * Adding a conditional role binding to a policy *
|
2370
|
+
# Changing a conditional role binding in a policy * Removing any role binding,
|
2371
|
+
# with or without a condition, from a policy that includes conditions **
|
2372
|
+
# Important:** If you use IAM Conditions, you must include the `etag` field
|
2373
|
+
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
|
2374
|
+
# to overwrite a version `3` policy with a version `1` policy, and all of the
|
2375
|
+
# conditions in the version `3` policy are lost. If a policy does not include
|
2376
|
+
# any conditions, operations on that policy may specify any valid version or
|
2377
|
+
# leave the field unset. To learn which resources support conditions in their
|
2378
|
+
# IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
|
2379
|
+
# conditions/resource-policies).
|
2380
|
+
# Corresponds to the JSON property `version`
|
2381
|
+
# @return [Fixnum]
|
2382
|
+
attr_accessor :version
|
2383
|
+
|
2384
|
+
def initialize(**args)
|
2385
|
+
update!(**args)
|
2386
|
+
end
|
2387
|
+
|
2388
|
+
# Update properties of this object
|
2389
|
+
def update!(**args)
|
2390
|
+
@audit_configs = args[:audit_configs] if args.key?(:audit_configs)
|
2391
|
+
@bindings = args[:bindings] if args.key?(:bindings)
|
2392
|
+
@etag = args[:etag] if args.key?(:etag)
|
2393
|
+
@version = args[:version] if args.key?(:version)
|
2394
|
+
end
|
2395
|
+
end
|
2396
|
+
|
823
2397
|
# Specifies the resource to analyze for access policies, which may be set
|
824
2398
|
# directly on the resource, or on ancestors such as organizations, folders or
|
825
2399
|
# projects.
|