google-apis-policysimulator_v1beta 0.3.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -564,7 +564,10 @@ module Google
564
564
  # The OrgPolicy CustomConstraint changes to preview violations for. Any existing
565
565
  # CustomConstraints with the same name will be overridden in the simulation.
566
566
  # That is, violations will be determined as if all custom constraints in the
567
- # overlay were instantiated.
567
+ # overlay were instantiated. Only a single custom_constraint is supported in the
568
+ # overlay at a time. For evaluating multiple constraints, multiple `
569
+ # GenerateOrgPolicyViolationsPreview` requests are made, where each request
570
+ # evaluates a single constraint.
568
571
  # Corresponds to the JSON property `customConstraints`
569
572
  # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay>]
570
573
  attr_accessor :custom_constraints
@@ -649,6 +652,22 @@ module Google
649
652
  class GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview
650
653
  include Google::Apis::Core::Hashable
651
654
 
655
+ # Output only. Time when this `OrgPolicyViolationsPreview` was created.
656
+ # Corresponds to the JSON property `createTime`
657
+ # @return [String]
658
+ attr_accessor :create_time
659
+
660
+ # Output only. The names of the constraints against which all `
661
+ # OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `
662
+ # PolicyOverlay` then it contains the name of the configured custom constraint,
663
+ # applicable to the specified policies. Otherwise it contains the name of the
664
+ # constraint specified in `CustomConstraintOverlay`. Format: `organizations/`
665
+ # organization_id`/customConstraints/`custom_constraint_id`` Example: `
666
+ # organizations/123/customConstraints/custom.createOnlyE2TypeVms`
667
+ # Corresponds to the JSON property `customConstraints`
668
+ # @return [Array<String>]
669
+ attr_accessor :custom_constraints
670
+
652
671
  # Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the
653
672
  # following format: `organizations/`organization`/locations/`location`/
654
673
  # orgPolicyViolationsPreviews/`orgPolicyViolationsPreview`` Example: `
@@ -690,6 +709,8 @@ module Google
690
709
 
691
710
  # Update properties of this object
692
711
  def update!(**args)
712
+ @create_time = args[:create_time] if args.key?(:create_time)
713
+ @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
693
714
  @name = args[:name] if args.key?(:name)
694
715
  @overlay = args[:overlay] if args.key?(:overlay)
695
716
  @resource_counts = args[:resource_counts] if args.key?(:resource_counts)
@@ -744,6 +765,320 @@ module Google
744
765
  end
745
766
  end
746
767
 
768
+ # A summary and comparison of the principal's access under the current (baseline)
769
+ # policies and the proposed (simulated) policies for a single access tuple.
770
+ class GoogleCloudPolicysimulatorV1betaAccessStateDiff
771
+ include Google::Apis::Core::Hashable
772
+
773
+ # How the principal's access, specified in the AccessState field, changed
774
+ # between the current (baseline) policies and proposed (simulated) policies.
775
+ # Corresponds to the JSON property `accessChange`
776
+ # @return [String]
777
+ attr_accessor :access_change
778
+
779
+ # Details about how a set of policies, listed in ExplainedPolicy, resulted in a
780
+ # certain AccessState when replaying an access tuple.
781
+ # Corresponds to the JSON property `baseline`
782
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaExplainedAccess]
783
+ attr_accessor :baseline
784
+
785
+ # Details about how a set of policies, listed in ExplainedPolicy, resulted in a
786
+ # certain AccessState when replaying an access tuple.
787
+ # Corresponds to the JSON property `simulated`
788
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaExplainedAccess]
789
+ attr_accessor :simulated
790
+
791
+ def initialize(**args)
792
+ update!(**args)
793
+ end
794
+
795
+ # Update properties of this object
796
+ def update!(**args)
797
+ @access_change = args[:access_change] if args.key?(:access_change)
798
+ @baseline = args[:baseline] if args.key?(:baseline)
799
+ @simulated = args[:simulated] if args.key?(:simulated)
800
+ end
801
+ end
802
+
803
+ # Information about the principal, resource, and permission to check.
804
+ class GoogleCloudPolicysimulatorV1betaAccessTuple
805
+ include Google::Apis::Core::Hashable
806
+
807
+ # Required. The full resource name that identifies the resource. For example, `//
808
+ # compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-
809
+ # instance`. For examples of full resource names for Google Cloud services, see
810
+ # https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
811
+ # Corresponds to the JSON property `fullResourceName`
812
+ # @return [String]
813
+ attr_accessor :full_resource_name
814
+
815
+ # Required. The IAM permission to check for the specified principal and resource.
816
+ # For a complete list of IAM permissions, see https://cloud.google.com/iam/help/
817
+ # permissions/reference. For a complete list of predefined IAM roles and the
818
+ # permissions in each role, see https://cloud.google.com/iam/help/roles/
819
+ # reference.
820
+ # Corresponds to the JSON property `permission`
821
+ # @return [String]
822
+ attr_accessor :permission
823
+
824
+ # Required. The principal whose access you want to check, in the form of the
825
+ # email address that represents that principal. For example, `alice@example.com`
826
+ # or `my-service-account@my-project.iam.gserviceaccount.com`. The principal must
827
+ # be a Google Account or a service account. Other types of principals are not
828
+ # supported.
829
+ # Corresponds to the JSON property `principal`
830
+ # @return [String]
831
+ attr_accessor :principal
832
+
833
+ def initialize(**args)
834
+ update!(**args)
835
+ end
836
+
837
+ # Update properties of this object
838
+ def update!(**args)
839
+ @full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
840
+ @permission = args[:permission] if args.key?(:permission)
841
+ @principal = args[:principal] if args.key?(:principal)
842
+ end
843
+ end
844
+
845
+ # Details about how a binding in a policy affects a principal's ability to use a
846
+ # permission.
847
+ class GoogleCloudPolicysimulatorV1betaBindingExplanation
848
+ include Google::Apis::Core::Hashable
849
+
850
+ # Required. Indicates whether _this binding_ provides the specified permission
851
+ # to the specified principal for the specified resource. This field does _not_
852
+ # indicate whether the principal actually has the permission for the resource.
853
+ # There might be another binding that overrides this binding. To determine
854
+ # whether the principal actually has the permission, use the `access` field in
855
+ # the TroubleshootIamPolicyResponse.
856
+ # Corresponds to the JSON property `access`
857
+ # @return [String]
858
+ attr_accessor :access
859
+
860
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
861
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
862
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
863
+ # "Summary size limit" description: "Determines if a summary is less than 100
864
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
865
+ # Requestor is owner" description: "Determines if requestor is the document
866
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
867
+ # Logic): title: "Public documents" description: "Determine whether the document
868
+ # should be publicly visible" expression: "document.type != 'private' &&
869
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
870
+ # string" description: "Create a notification string with a timestamp."
871
+ # expression: "'New message received at ' + string(document.create_time)" The
872
+ # exact variables and functions that may be referenced within an expression are
873
+ # determined by the service that evaluates it. See the service documentation for
874
+ # additional information.
875
+ # Corresponds to the JSON property `condition`
876
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleTypeExpr]
877
+ attr_accessor :condition
878
+
879
+ # Indicates whether each principal in the binding includes the principal
880
+ # specified in the request, either directly or indirectly. Each key identifies a
881
+ # principal in the binding, and each value indicates whether the principal in
882
+ # the binding includes the principal in the request. For example, suppose that a
883
+ # binding includes the following principals: * `user:alice@example.com` * `group:
884
+ # product-eng@example.com` The principal in the replayed access tuple is `user:
885
+ # bob@example.com`. This user is a principal of the group `group:product-eng@
886
+ # example.com`. For the first principal in the binding, the key is `user:alice@
887
+ # example.com`, and the `membership` field in the value is set to `
888
+ # MEMBERSHIP_NOT_INCLUDED`. For the second principal in the binding, the key is `
889
+ # group:product-eng@example.com`, and the `membership` field in the value is set
890
+ # to `MEMBERSHIP_INCLUDED`.
891
+ # Corresponds to the JSON property `memberships`
892
+ # @return [Hash<String,Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership>]
893
+ attr_accessor :memberships
894
+
895
+ # The relevance of this binding to the overall determination for the entire
896
+ # policy.
897
+ # Corresponds to the JSON property `relevance`
898
+ # @return [String]
899
+ attr_accessor :relevance
900
+
901
+ # The role that this binding grants. For example, `roles/compute.serviceAgent`.
902
+ # For a complete list of predefined IAM roles, as well as the permissions in
903
+ # each role, see https://cloud.google.com/iam/help/roles/reference.
904
+ # Corresponds to the JSON property `role`
905
+ # @return [String]
906
+ attr_accessor :role
907
+
908
+ # Indicates whether the role granted by this binding contains the specified
909
+ # permission.
910
+ # Corresponds to the JSON property `rolePermission`
911
+ # @return [String]
912
+ attr_accessor :role_permission
913
+
914
+ # The relevance of the permission's existence, or nonexistence, in the role to
915
+ # the overall determination for the entire policy.
916
+ # Corresponds to the JSON property `rolePermissionRelevance`
917
+ # @return [String]
918
+ attr_accessor :role_permission_relevance
919
+
920
+ def initialize(**args)
921
+ update!(**args)
922
+ end
923
+
924
+ # Update properties of this object
925
+ def update!(**args)
926
+ @access = args[:access] if args.key?(:access)
927
+ @condition = args[:condition] if args.key?(:condition)
928
+ @memberships = args[:memberships] if args.key?(:memberships)
929
+ @relevance = args[:relevance] if args.key?(:relevance)
930
+ @role = args[:role] if args.key?(:role)
931
+ @role_permission = args[:role_permission] if args.key?(:role_permission)
932
+ @role_permission_relevance = args[:role_permission_relevance] if args.key?(:role_permission_relevance)
933
+ end
934
+ end
935
+
936
+ # Details about whether the binding includes the principal.
937
+ class GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership
938
+ include Google::Apis::Core::Hashable
939
+
940
+ # Indicates whether the binding includes the principal.
941
+ # Corresponds to the JSON property `membership`
942
+ # @return [String]
943
+ attr_accessor :membership
944
+
945
+ # The relevance of the principal's status to the overall determination for the
946
+ # binding.
947
+ # Corresponds to the JSON property `relevance`
948
+ # @return [String]
949
+ attr_accessor :relevance
950
+
951
+ def initialize(**args)
952
+ update!(**args)
953
+ end
954
+
955
+ # Update properties of this object
956
+ def update!(**args)
957
+ @membership = args[:membership] if args.key?(:membership)
958
+ @relevance = args[:relevance] if args.key?(:relevance)
959
+ end
960
+ end
961
+
962
+ # Details about how a set of policies, listed in ExplainedPolicy, resulted in a
963
+ # certain AccessState when replaying an access tuple.
964
+ class GoogleCloudPolicysimulatorV1betaExplainedAccess
965
+ include Google::Apis::Core::Hashable
966
+
967
+ # Whether the principal in the access tuple has permission to access the
968
+ # resource in the access tuple under the given policies.
969
+ # Corresponds to the JSON property `accessState`
970
+ # @return [String]
971
+ attr_accessor :access_state
972
+
973
+ # If the AccessState is `UNKNOWN`, this field contains a list of errors
974
+ # explaining why the result is `UNKNOWN`. If the `AccessState` is `GRANTED` or `
975
+ # NOT_GRANTED`, this field is omitted.
976
+ # Corresponds to the JSON property `errors`
977
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleRpcStatus>]
978
+ attr_accessor :errors
979
+
980
+ # If the AccessState is `UNKNOWN`, this field contains the policies that led to
981
+ # that result. If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is
982
+ # omitted.
983
+ # Corresponds to the JSON property `policies`
984
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaExplainedPolicy>]
985
+ attr_accessor :policies
986
+
987
+ def initialize(**args)
988
+ update!(**args)
989
+ end
990
+
991
+ # Update properties of this object
992
+ def update!(**args)
993
+ @access_state = args[:access_state] if args.key?(:access_state)
994
+ @errors = args[:errors] if args.key?(:errors)
995
+ @policies = args[:policies] if args.key?(:policies)
996
+ end
997
+ end
998
+
999
+ # Details about how a specific IAM Policy contributed to the access check.
1000
+ class GoogleCloudPolicysimulatorV1betaExplainedPolicy
1001
+ include Google::Apis::Core::Hashable
1002
+
1003
+ # Indicates whether _this policy_ provides the specified permission to the
1004
+ # specified principal for the specified resource. This field does _not_ indicate
1005
+ # whether the principal actually has the permission for the resource. There
1006
+ # might be another policy that overrides this policy. To determine whether the
1007
+ # principal actually has the permission, use the `access` field in the
1008
+ # TroubleshootIamPolicyResponse.
1009
+ # Corresponds to the JSON property `access`
1010
+ # @return [String]
1011
+ attr_accessor :access
1012
+
1013
+ # Details about how each binding in the policy affects the principal's ability,
1014
+ # or inability, to use the permission for the resource. If the user who created
1015
+ # the Replay does not have access to the policy, this field is omitted.
1016
+ # Corresponds to the JSON property `bindingExplanations`
1017
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaBindingExplanation>]
1018
+ attr_accessor :binding_explanations
1019
+
1020
+ # The full resource name that identifies the resource. For example, `//compute.
1021
+ # googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.
1022
+ # If the user who created the Replay does not have access to the policy, this
1023
+ # field is omitted. For examples of full resource names for Google Cloud
1024
+ # services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-
1025
+ # names.
1026
+ # Corresponds to the JSON property `fullResourceName`
1027
+ # @return [String]
1028
+ attr_accessor :full_resource_name
1029
+
1030
+ # An Identity and Access Management (IAM) policy, which specifies access
1031
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
1032
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
1033
+ # Principals can be user accounts, service accounts, Google groups, and domains (
1034
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
1035
+ # an IAM predefined role or a user-created custom role. For some types of Google
1036
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
1037
+ # logical expression that allows access to a resource only if the expression
1038
+ # evaluates to `true`. A condition can add constraints based on attributes of
1039
+ # the request, the resource, or both. To learn which resources support
1040
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
1041
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
1042
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
1043
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
1044
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
1045
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
1046
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
1047
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
1048
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
1049
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
1050
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
1051
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
1052
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
1053
+ # title: expirable access description: Does not grant access after Sep 2020
1054
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
1055
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
1056
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
1057
+ # Corresponds to the JSON property `policy`
1058
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleIamV1Policy]
1059
+ attr_accessor :policy
1060
+
1061
+ # The relevance of this policy to the overall determination in the
1062
+ # TroubleshootIamPolicyResponse. If the user who created the Replay does not
1063
+ # have access to the policy, this field is omitted.
1064
+ # Corresponds to the JSON property `relevance`
1065
+ # @return [String]
1066
+ attr_accessor :relevance
1067
+
1068
+ def initialize(**args)
1069
+ update!(**args)
1070
+ end
1071
+
1072
+ # Update properties of this object
1073
+ def update!(**args)
1074
+ @access = args[:access] if args.key?(:access)
1075
+ @binding_explanations = args[:binding_explanations] if args.key?(:binding_explanations)
1076
+ @full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
1077
+ @policy = args[:policy] if args.key?(:policy)
1078
+ @relevance = args[:relevance] if args.key?(:relevance)
1079
+ end
1080
+ end
1081
+
747
1082
  # GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
748
1083
  # OrgPolicyViolationsPreview generations operation.
749
1084
  class GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata
@@ -850,6 +1185,58 @@ module Google
850
1185
  end
851
1186
  end
852
1187
 
1188
+ # Response message for Simulator.ListReplayResults.
1189
+ class GoogleCloudPolicysimulatorV1betaListReplayResultsResponse
1190
+ include Google::Apis::Core::Hashable
1191
+
1192
+ # A token that you can use to retrieve the next page of ReplayResult objects. If
1193
+ # this field is omitted, there are no subsequent pages.
1194
+ # Corresponds to the JSON property `nextPageToken`
1195
+ # @return [String]
1196
+ attr_accessor :next_page_token
1197
+
1198
+ # The results of running a Replay.
1199
+ # Corresponds to the JSON property `replayResults`
1200
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaReplayResult>]
1201
+ attr_accessor :replay_results
1202
+
1203
+ def initialize(**args)
1204
+ update!(**args)
1205
+ end
1206
+
1207
+ # Update properties of this object
1208
+ def update!(**args)
1209
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1210
+ @replay_results = args[:replay_results] if args.key?(:replay_results)
1211
+ end
1212
+ end
1213
+
1214
+ # Response message for Simulator.ListReplays.
1215
+ class GoogleCloudPolicysimulatorV1betaListReplaysResponse
1216
+ include Google::Apis::Core::Hashable
1217
+
1218
+ # A token that you can use to retrieve the next page of results. If this field
1219
+ # is omitted, there are no subsequent pages.
1220
+ # Corresponds to the JSON property `nextPageToken`
1221
+ # @return [String]
1222
+ attr_accessor :next_page_token
1223
+
1224
+ # The list of Replay objects.
1225
+ # Corresponds to the JSON property `replays`
1226
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaReplay>]
1227
+ attr_accessor :replays
1228
+
1229
+ def initialize(**args)
1230
+ update!(**args)
1231
+ end
1232
+
1233
+ # Update properties of this object
1234
+ def update!(**args)
1235
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1236
+ @replays = args[:replays] if args.key?(:replays)
1237
+ end
1238
+ end
1239
+
853
1240
  # The proposed changes to OrgPolicy.
854
1241
  class GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay
855
1242
  include Google::Apis::Core::Hashable
@@ -857,7 +1244,10 @@ module Google
857
1244
  # The OrgPolicy CustomConstraint changes to preview violations for. Any existing
858
1245
  # CustomConstraints with the same name will be overridden in the simulation.
859
1246
  # That is, violations will be determined as if all custom constraints in the
860
- # overlay were instantiated.
1247
+ # overlay were instantiated. Only a single custom_constraint is supported in the
1248
+ # overlay at a time. For evaluating multiple constraints, multiple `
1249
+ # GenerateOrgPolicyViolationsPreview` requests are made, where each request
1250
+ # evaluates a single constraint.
861
1251
  # Corresponds to the JSON property `customConstraints`
862
1252
  # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay>]
863
1253
  attr_accessor :custom_constraints
@@ -991,6 +1381,22 @@ module Google
991
1381
  class GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview
992
1382
  include Google::Apis::Core::Hashable
993
1383
 
1384
+ # Output only. Time when this `OrgPolicyViolationsPreview` was created.
1385
+ # Corresponds to the JSON property `createTime`
1386
+ # @return [String]
1387
+ attr_accessor :create_time
1388
+
1389
+ # Output only. The names of the constraints against which all `
1390
+ # OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `
1391
+ # PolicyOverlay` then it contains the name of the configured custom constraint,
1392
+ # applicable to the specified policies. Otherwise it contains the name of the
1393
+ # constraint specified in `CustomConstraintOverlay`. Format: `organizations/`
1394
+ # organization_id`/customConstraints/`custom_constraint_id`` Example: `
1395
+ # organizations/123/customConstraints/custom.createOnlyE2TypeVms`
1396
+ # Corresponds to the JSON property `customConstraints`
1397
+ # @return [Array<String>]
1398
+ attr_accessor :custom_constraints
1399
+
994
1400
  # Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the
995
1401
  # following format: `organizations/`organization`/locations/`location`/
996
1402
  # orgPolicyViolationsPreviews/`orgPolicyViolationsPreview`` Example: `
@@ -1032,6 +1438,8 @@ module Google
1032
1438
 
1033
1439
  # Update properties of this object
1034
1440
  def update!(**args)
1441
+ @create_time = args[:create_time] if args.key?(:create_time)
1442
+ @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
1035
1443
  @name = args[:name] if args.key?(:name)
1036
1444
  @overlay = args[:overlay] if args.key?(:overlay)
1037
1445
  @resource_counts = args[:resource_counts] if args.key?(:resource_counts)
@@ -1086,6 +1494,237 @@ module Google
1086
1494
  end
1087
1495
  end
1088
1496
 
1497
+ # A resource describing a `Replay`, or simulation.
1498
+ class GoogleCloudPolicysimulatorV1betaReplay
1499
+ include Google::Apis::Core::Hashable
1500
+
1501
+ # The configuration used for a Replay.
1502
+ # Corresponds to the JSON property `config`
1503
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaReplayConfig]
1504
+ attr_accessor :config
1505
+
1506
+ # Output only. The resource name of the `Replay`, which has the following format:
1507
+ # ``projects|folders|organizations`/`resource-id`/locations/global/replays/`
1508
+ # replay-id``, where ``resource-id`` is the ID of the project, folder, or
1509
+ # organization that owns the Replay. Example: `projects/my-example-project/
1510
+ # locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
1511
+ # Corresponds to the JSON property `name`
1512
+ # @return [String]
1513
+ attr_accessor :name
1514
+
1515
+ # Summary statistics about the replayed log entries.
1516
+ # Corresponds to the JSON property `resultsSummary`
1517
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaReplayResultsSummary]
1518
+ attr_accessor :results_summary
1519
+
1520
+ # Output only. The current state of the `Replay`.
1521
+ # Corresponds to the JSON property `state`
1522
+ # @return [String]
1523
+ attr_accessor :state
1524
+
1525
+ def initialize(**args)
1526
+ update!(**args)
1527
+ end
1528
+
1529
+ # Update properties of this object
1530
+ def update!(**args)
1531
+ @config = args[:config] if args.key?(:config)
1532
+ @name = args[:name] if args.key?(:name)
1533
+ @results_summary = args[:results_summary] if args.key?(:results_summary)
1534
+ @state = args[:state] if args.key?(:state)
1535
+ end
1536
+ end
1537
+
1538
+ # The configuration used for a Replay.
1539
+ class GoogleCloudPolicysimulatorV1betaReplayConfig
1540
+ include Google::Apis::Core::Hashable
1541
+
1542
+ # The logs to use as input for the Replay.
1543
+ # Corresponds to the JSON property `logSource`
1544
+ # @return [String]
1545
+ attr_accessor :log_source
1546
+
1547
+ # A mapping of the resources that you want to simulate policies for and the
1548
+ # policies that you want to simulate. Keys are the full resource names for the
1549
+ # resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-
1550
+ # project`. For examples of full resource names for Google Cloud services, see
1551
+ # https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values
1552
+ # are Policy objects representing the policies that you want to simulate.
1553
+ # Replays automatically take into account any IAM policies inherited through the
1554
+ # resource hierarchy, and any policies set on descendant resources. You do not
1555
+ # need to include these policies in the policy overlay.
1556
+ # Corresponds to the JSON property `policyOverlay`
1557
+ # @return [Hash<String,Google::Apis::PolicysimulatorV1beta::GoogleIamV1Policy>]
1558
+ attr_accessor :policy_overlay
1559
+
1560
+ def initialize(**args)
1561
+ update!(**args)
1562
+ end
1563
+
1564
+ # Update properties of this object
1565
+ def update!(**args)
1566
+ @log_source = args[:log_source] if args.key?(:log_source)
1567
+ @policy_overlay = args[:policy_overlay] if args.key?(:policy_overlay)
1568
+ end
1569
+ end
1570
+
1571
+ # The difference between the results of evaluating an access tuple under the
1572
+ # current (baseline) policies and under the proposed (simulated) policies. This
1573
+ # difference explains how a principal's access could change if the proposed
1574
+ # policies were applied.
1575
+ class GoogleCloudPolicysimulatorV1betaReplayDiff
1576
+ include Google::Apis::Core::Hashable
1577
+
1578
+ # A summary and comparison of the principal's access under the current (baseline)
1579
+ # policies and the proposed (simulated) policies for a single access tuple.
1580
+ # Corresponds to the JSON property `accessDiff`
1581
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaAccessStateDiff]
1582
+ attr_accessor :access_diff
1583
+
1584
+ def initialize(**args)
1585
+ update!(**args)
1586
+ end
1587
+
1588
+ # Update properties of this object
1589
+ def update!(**args)
1590
+ @access_diff = args[:access_diff] if args.key?(:access_diff)
1591
+ end
1592
+ end
1593
+
1594
+ # The result of replaying a single access tuple against a simulated state.
1595
+ class GoogleCloudPolicysimulatorV1betaReplayResult
1596
+ include Google::Apis::Core::Hashable
1597
+
1598
+ # Information about the principal, resource, and permission to check.
1599
+ # Corresponds to the JSON property `accessTuple`
1600
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaAccessTuple]
1601
+ attr_accessor :access_tuple
1602
+
1603
+ # The difference between the results of evaluating an access tuple under the
1604
+ # current (baseline) policies and under the proposed (simulated) policies. This
1605
+ # difference explains how a principal's access could change if the proposed
1606
+ # policies were applied.
1607
+ # Corresponds to the JSON property `diff`
1608
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaReplayDiff]
1609
+ attr_accessor :diff
1610
+
1611
+ # The `Status` type defines a logical error model that is suitable for different
1612
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1613
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1614
+ # data: error code, error message, and error details. You can find out more
1615
+ # about this error model and how to work with it in the [API Design Guide](https:
1616
+ # //cloud.google.com/apis/design/errors).
1617
+ # Corresponds to the JSON property `error`
1618
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleRpcStatus]
1619
+ attr_accessor :error
1620
+
1621
+ # Represents a whole or partial calendar date, such as a birthday. The time of
1622
+ # day and time zone are either specified elsewhere or are insignificant. The
1623
+ # date is relative to the Gregorian Calendar. This can represent one of the
1624
+ # following: * A full date, with non-zero year, month, and day values. * A month
1625
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
1626
+ # with a zero month and a zero day. * A year and month, with a zero day (for
1627
+ # example, a credit card expiration date). Related types: * google.type.
1628
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
1629
+ # Corresponds to the JSON property `lastSeenDate`
1630
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleTypeDate]
1631
+ attr_accessor :last_seen_date
1632
+
1633
+ # The resource name of the `ReplayResult`, in the following format: ``projects|
1634
+ # folders|organizations`/`resource-id`/locations/global/replays/`replay-id`/
1635
+ # results/`replay-result-id``, where ``resource-id`` is the ID of the project,
1636
+ # folder, or organization that owns the Replay. Example: `projects/my-example-
1637
+ # project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36/results/
1638
+ # 1234`
1639
+ # Corresponds to the JSON property `name`
1640
+ # @return [String]
1641
+ attr_accessor :name
1642
+
1643
+ # The Replay that the access tuple was included in.
1644
+ # Corresponds to the JSON property `parent`
1645
+ # @return [String]
1646
+ attr_accessor :parent
1647
+
1648
+ def initialize(**args)
1649
+ update!(**args)
1650
+ end
1651
+
1652
+ # Update properties of this object
1653
+ def update!(**args)
1654
+ @access_tuple = args[:access_tuple] if args.key?(:access_tuple)
1655
+ @diff = args[:diff] if args.key?(:diff)
1656
+ @error = args[:error] if args.key?(:error)
1657
+ @last_seen_date = args[:last_seen_date] if args.key?(:last_seen_date)
1658
+ @name = args[:name] if args.key?(:name)
1659
+ @parent = args[:parent] if args.key?(:parent)
1660
+ end
1661
+ end
1662
+
1663
+ # Summary statistics about the replayed log entries.
1664
+ class GoogleCloudPolicysimulatorV1betaReplayResultsSummary
1665
+ include Google::Apis::Core::Hashable
1666
+
1667
+ # The number of replayed log entries with a difference between baseline and
1668
+ # simulated policies.
1669
+ # Corresponds to the JSON property `differenceCount`
1670
+ # @return [Fixnum]
1671
+ attr_accessor :difference_count
1672
+
1673
+ # The number of log entries that could not be replayed.
1674
+ # Corresponds to the JSON property `errorCount`
1675
+ # @return [Fixnum]
1676
+ attr_accessor :error_count
1677
+
1678
+ # The total number of log entries replayed.
1679
+ # Corresponds to the JSON property `logCount`
1680
+ # @return [Fixnum]
1681
+ attr_accessor :log_count
1682
+
1683
+ # Represents a whole or partial calendar date, such as a birthday. The time of
1684
+ # day and time zone are either specified elsewhere or are insignificant. The
1685
+ # date is relative to the Gregorian Calendar. This can represent one of the
1686
+ # following: * A full date, with non-zero year, month, and day values. * A month
1687
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
1688
+ # with a zero month and a zero day. * A year and month, with a zero day (for
1689
+ # example, a credit card expiration date). Related types: * google.type.
1690
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
1691
+ # Corresponds to the JSON property `newestDate`
1692
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleTypeDate]
1693
+ attr_accessor :newest_date
1694
+
1695
+ # Represents a whole or partial calendar date, such as a birthday. The time of
1696
+ # day and time zone are either specified elsewhere or are insignificant. The
1697
+ # date is relative to the Gregorian Calendar. This can represent one of the
1698
+ # following: * A full date, with non-zero year, month, and day values. * A month
1699
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
1700
+ # with a zero month and a zero day. * A year and month, with a zero day (for
1701
+ # example, a credit card expiration date). Related types: * google.type.
1702
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
1703
+ # Corresponds to the JSON property `oldestDate`
1704
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleTypeDate]
1705
+ attr_accessor :oldest_date
1706
+
1707
+ # The number of replayed log entries with no difference between baseline and
1708
+ # simulated policies.
1709
+ # Corresponds to the JSON property `unchangedCount`
1710
+ # @return [Fixnum]
1711
+ attr_accessor :unchanged_count
1712
+
1713
+ def initialize(**args)
1714
+ update!(**args)
1715
+ end
1716
+
1717
+ # Update properties of this object
1718
+ def update!(**args)
1719
+ @difference_count = args[:difference_count] if args.key?(:difference_count)
1720
+ @error_count = args[:error_count] if args.key?(:error_count)
1721
+ @log_count = args[:log_count] if args.key?(:log_count)
1722
+ @newest_date = args[:newest_date] if args.key?(:newest_date)
1723
+ @oldest_date = args[:oldest_date] if args.key?(:oldest_date)
1724
+ @unchanged_count = args[:unchanged_count] if args.key?(:unchanged_count)
1725
+ end
1726
+ end
1727
+
1089
1728
  # ResourceContext provides the context we know about a resource. It is similar
1090
1729
  # in concept to google.cloud.asset.v1.Resource, but focuses on the information
1091
1730
  # specifically used by Simulator.