google-apis-policysimulator_v1 0.32.0 → 0.34.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 692159db48c952140458d9511eb93eb1dd3a30a7463a98f0c3e50749b46f85cb
4
- data.tar.gz: 052a11b5d79676304e3eba705378d8d5708592f2d8837f0c211b8d41fd0a427e
3
+ metadata.gz: 9fb2e31350638d9237ac3c2dcf44cdd09e3b28e0c2ad2637c683dd9f861d31d9
4
+ data.tar.gz: 5d35928d0e0d7ee66ee5436f3b80ac4b5fe2b10c939d86f3223ab39b92b84f8f
5
5
  SHA512:
6
- metadata.gz: bcca58dd109a664f04849f5416d41ffb51a4df6465c1f9861d77da675654066f5cf6298670d0c814dd139d619d6a4a3814855598c93df4793383b67bfec8f123
7
- data.tar.gz: da31b415a3b673ae5163f328a539386157a0fa78459c67ffad89684ffa5cc7c7220bc711a2ff14c19ad3fde3b8a7cbc4edb2245abbfd3f637bfbb02d75fd18bd
6
+ metadata.gz: ffabf726d5e7ef3035953c75faa807cba4cbf3018ec50ee031ab3b592edea32f25c9e26cbf7641c310edee31c2c10f25530d4c76bd399914217156dad6c11c39
7
+ data.tar.gz: 8ab1d57de0707ab56d2cff189d087edc8992814dc1f36a45a9c994eb230e59a500a6a8a5aba2b5307dafc12fd6f9fcb6f078ea5f0c28bf398f159ea6517b897c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Release history for google-apis-policysimulator_v1
2
2
 
3
+ ### v0.34.0 (2024-02-23)
4
+
5
+ * Regenerated from discovery document revision 20240218
6
+
7
+ ### v0.33.0 (2024-01-28)
8
+
9
+ * Regenerated from discovery document revision 20240121
10
+ * Regenerated using generator version 0.13.1
11
+
3
12
  ### v0.32.0 (2024-01-22)
4
13
 
5
14
  * Regenerated using generator version 0.13.0
data/OVERVIEW.md CHANGED
@@ -83,9 +83,9 @@ The [product documentation](https://cloud.google.com/iam/docs/simulating-access)
83
83
 
84
84
  ## Supported Ruby versions
85
85
 
86
- This library is supported on Ruby 2.5+.
86
+ This library is supported on Ruby 2.7+.
87
87
 
88
- Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
88
+ Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
89
89
 
90
90
  ## License
91
91
 
@@ -670,6 +670,60 @@ module Google
670
670
  end
671
671
  end
672
672
 
673
+ # ListOrgPolicyViolationsPreviewsResponse is the response message for
674
+ # OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews.
675
+ class GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse
676
+ include Google::Apis::Core::Hashable
677
+
678
+ # A token that you can use to retrieve the next page of results. If this field
679
+ # is omitted, there are no subsequent pages.
680
+ # Corresponds to the JSON property `nextPageToken`
681
+ # @return [String]
682
+ attr_accessor :next_page_token
683
+
684
+ # The list of OrgPolicyViolationsPreview
685
+ # Corresponds to the JSON property `orgPolicyViolationsPreviews`
686
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview>]
687
+ attr_accessor :org_policy_violations_previews
688
+
689
+ def initialize(**args)
690
+ update!(**args)
691
+ end
692
+
693
+ # Update properties of this object
694
+ def update!(**args)
695
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
696
+ @org_policy_violations_previews = args[:org_policy_violations_previews] if args.key?(:org_policy_violations_previews)
697
+ end
698
+ end
699
+
700
+ # ListOrgPolicyViolationsResponse is the response message for
701
+ # OrgPolicyViolationsPreviewService.ListOrgPolicyViolations
702
+ class GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse
703
+ include Google::Apis::Core::Hashable
704
+
705
+ # A token that you can use to retrieve the next page of results. If this field
706
+ # is omitted, there are no subsequent pages.
707
+ # Corresponds to the JSON property `nextPageToken`
708
+ # @return [String]
709
+ attr_accessor :next_page_token
710
+
711
+ # The list of OrgPolicyViolations
712
+ # Corresponds to the JSON property `orgPolicyViolations`
713
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolation>]
714
+ attr_accessor :org_policy_violations
715
+
716
+ def initialize(**args)
717
+ update!(**args)
718
+ end
719
+
720
+ # Update properties of this object
721
+ def update!(**args)
722
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
723
+ @org_policy_violations = args[:org_policy_violations] if args.key?(:org_policy_violations)
724
+ end
725
+ end
726
+
673
727
  # Response message for Simulator.ListReplayResults.
674
728
  class GoogleCloudPolicysimulatorV1ListReplayResultsResponse
675
729
  include Google::Apis::Core::Hashable
@@ -696,6 +750,266 @@ module Google
696
750
  end
697
751
  end
698
752
 
753
+ # The proposed changes to OrgPolicy.
754
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlay
755
+ include Google::Apis::Core::Hashable
756
+
757
+ # Optional. The OrgPolicy CustomConstraint changes to preview violations for.
758
+ # Any existing CustomConstraints with the same name will be overridden in the
759
+ # simulation. That is, violations will be determined as if all custom
760
+ # constraints in the overlay were instantiated. Only a single custom_constraint
761
+ # is supported in the overlay at a time. For evaluating multiple constraints,
762
+ # multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each
763
+ # request evaluates a single constraint.
764
+ # Corresponds to the JSON property `customConstraints`
765
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay>]
766
+ attr_accessor :custom_constraints
767
+
768
+ # Optional. The OrgPolicy changes to preview violations for. Any existing
769
+ # OrgPolicies with the same name will be overridden in the simulation. That is,
770
+ # violations will be determined as if all policies in the overlay were created
771
+ # or updated.
772
+ # Corresponds to the JSON property `policies`
773
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay>]
774
+ attr_accessor :policies
775
+
776
+ def initialize(**args)
777
+ update!(**args)
778
+ end
779
+
780
+ # Update properties of this object
781
+ def update!(**args)
782
+ @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
783
+ @policies = args[:policies] if args.key?(:policies)
784
+ end
785
+ end
786
+
787
+ # A change to an OrgPolicy custom constraint.
788
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay
789
+ include Google::Apis::Core::Hashable
790
+
791
+ # A custom constraint defined by customers which can *only* be applied to the
792
+ # given resource types and organization. By creating a custom constraint,
793
+ # customers can apply policies of this custom constraint. *Creating a custom
794
+ # constraint itself does NOT apply any policy enforcement*.
795
+ # Corresponds to the JSON property `customConstraint`
796
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint]
797
+ attr_accessor :custom_constraint
798
+
799
+ # Optional. Resource the constraint is attached to. Example: "organization/
800
+ # 987654"
801
+ # Corresponds to the JSON property `customConstraintParent`
802
+ # @return [String]
803
+ attr_accessor :custom_constraint_parent
804
+
805
+ def initialize(**args)
806
+ update!(**args)
807
+ end
808
+
809
+ # Update properties of this object
810
+ def update!(**args)
811
+ @custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
812
+ @custom_constraint_parent = args[:custom_constraint_parent] if args.key?(:custom_constraint_parent)
813
+ end
814
+ end
815
+
816
+ # A change to an OrgPolicy.
817
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay
818
+ include Google::Apis::Core::Hashable
819
+
820
+ # Defines an organization policy which is used to specify constraints for
821
+ # configurations of Google Cloud resources.
822
+ # Corresponds to the JSON property `policy`
823
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2Policy]
824
+ attr_accessor :policy
825
+
826
+ # Optional. The parent of the policy we are attaching to. Example: "projects/
827
+ # 123456"
828
+ # Corresponds to the JSON property `policyParent`
829
+ # @return [String]
830
+ attr_accessor :policy_parent
831
+
832
+ def initialize(**args)
833
+ update!(**args)
834
+ end
835
+
836
+ # Update properties of this object
837
+ def update!(**args)
838
+ @policy = args[:policy] if args.key?(:policy)
839
+ @policy_parent = args[:policy_parent] if args.key?(:policy_parent)
840
+ end
841
+ end
842
+
843
+ # OrgPolicyViolation is a resource representing a single resource violating a
844
+ # single OrgPolicy constraint.
845
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolation
846
+ include Google::Apis::Core::Hashable
847
+
848
+ # A custom constraint defined by customers which can *only* be applied to the
849
+ # given resource types and organization. By creating a custom constraint,
850
+ # customers can apply policies of this custom constraint. *Creating a custom
851
+ # constraint itself does NOT apply any policy enforcement*.
852
+ # Corresponds to the JSON property `customConstraint`
853
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint]
854
+ attr_accessor :custom_constraint
855
+
856
+ # The `Status` type defines a logical error model that is suitable for different
857
+ # programming environments, including REST APIs and RPC APIs. It is used by [
858
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
859
+ # data: error code, error message, and error details. You can find out more
860
+ # about this error model and how to work with it in the [API Design Guide](https:
861
+ # //cloud.google.com/apis/design/errors).
862
+ # Corresponds to the JSON property `error`
863
+ # @return [Google::Apis::PolicysimulatorV1::GoogleRpcStatus]
864
+ attr_accessor :error
865
+
866
+ # The name of the `OrgPolicyViolation`. Example: organizations/my-example-org/
867
+ # locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`
868
+ # Corresponds to the JSON property `name`
869
+ # @return [String]
870
+ attr_accessor :name
871
+
872
+ # ResourceContext provides the context we know about a resource. It is similar
873
+ # in concept to google.cloud.asset.v1.Resource, but focuses on the information
874
+ # specifically used by Simulator.
875
+ # Corresponds to the JSON property `resource`
876
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ResourceContext]
877
+ attr_accessor :resource
878
+
879
+ def initialize(**args)
880
+ update!(**args)
881
+ end
882
+
883
+ # Update properties of this object
884
+ def update!(**args)
885
+ @custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
886
+ @error = args[:error] if args.key?(:error)
887
+ @name = args[:name] if args.key?(:name)
888
+ @resource = args[:resource] if args.key?(:resource)
889
+ end
890
+ end
891
+
892
+ # OrgPolicyViolationsPreview is a resource providing a preview of the violations
893
+ # that will exist if an OrgPolicy change is made. The list of violations are
894
+ # modeled as child resources and retrieved via a ListOrgPolicyViolations API
895
+ # call. There are potentially more OrgPolicyViolations than could fit in an
896
+ # embedded field. Thus, the use of a child resource instead of a field.
897
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview
898
+ include Google::Apis::Core::Hashable
899
+
900
+ # Output only. Time when this `OrgPolicyViolationsPreview` was created.
901
+ # Corresponds to the JSON property `createTime`
902
+ # @return [String]
903
+ attr_accessor :create_time
904
+
905
+ # Output only. The names of the constraints against which all `
906
+ # OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `
907
+ # PolicyOverlay` then it contains the name of the configured custom constraint,
908
+ # applicable to the specified policies. Otherwise it contains the name of the
909
+ # constraint specified in `CustomConstraintOverlay`. Format: `organizations/`
910
+ # organization_id`/customConstraints/`custom_constraint_id`` Example: `
911
+ # organizations/123/customConstraints/custom.createOnlyE2TypeVms`
912
+ # Corresponds to the JSON property `customConstraints`
913
+ # @return [Array<String>]
914
+ attr_accessor :custom_constraints
915
+
916
+ # Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the
917
+ # following format: `organizations/`organization`/locations/`location`/
918
+ # orgPolicyViolationsPreviews/`orgPolicyViolationsPreview`` Example: `
919
+ # organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/
920
+ # 506a5f7f`
921
+ # Corresponds to the JSON property `name`
922
+ # @return [String]
923
+ attr_accessor :name
924
+
925
+ # The proposed changes to OrgPolicy.
926
+ # Corresponds to the JSON property `overlay`
927
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlay]
928
+ attr_accessor :overlay
929
+
930
+ # A summary of the state of all resources scanned for compliance with the
931
+ # changed OrgPolicy.
932
+ # Corresponds to the JSON property `resourceCounts`
933
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts]
934
+ attr_accessor :resource_counts
935
+
936
+ # Output only. The state of the `OrgPolicyViolationsPreview`.
937
+ # Corresponds to the JSON property `state`
938
+ # @return [String]
939
+ attr_accessor :state
940
+
941
+ # Output only. The number of OrgPolicyViolations in this `
942
+ # OrgPolicyViolationsPreview`. This count may differ from `resource_summary.
943
+ # noncompliant_count` because each OrgPolicyViolation is specific to a resource *
944
+ # *and** constraint. If there are multiple constraints being evaluated (i.e.
945
+ # multiple policies in the overlay), a single resource may violate multiple
946
+ # constraints.
947
+ # Corresponds to the JSON property `violationsCount`
948
+ # @return [Fixnum]
949
+ attr_accessor :violations_count
950
+
951
+ def initialize(**args)
952
+ update!(**args)
953
+ end
954
+
955
+ # Update properties of this object
956
+ def update!(**args)
957
+ @create_time = args[:create_time] if args.key?(:create_time)
958
+ @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
959
+ @name = args[:name] if args.key?(:name)
960
+ @overlay = args[:overlay] if args.key?(:overlay)
961
+ @resource_counts = args[:resource_counts] if args.key?(:resource_counts)
962
+ @state = args[:state] if args.key?(:state)
963
+ @violations_count = args[:violations_count] if args.key?(:violations_count)
964
+ end
965
+ end
966
+
967
+ # A summary of the state of all resources scanned for compliance with the
968
+ # changed OrgPolicy.
969
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts
970
+ include Google::Apis::Core::Hashable
971
+
972
+ # Output only. Number of scanned resources with zero violations.
973
+ # Corresponds to the JSON property `compliant`
974
+ # @return [Fixnum]
975
+ attr_accessor :compliant
976
+
977
+ # Output only. Number of resources that returned an error when scanned.
978
+ # Corresponds to the JSON property `errors`
979
+ # @return [Fixnum]
980
+ attr_accessor :errors
981
+
982
+ # Output only. Number of scanned resources with at least one violation.
983
+ # Corresponds to the JSON property `noncompliant`
984
+ # @return [Fixnum]
985
+ attr_accessor :noncompliant
986
+
987
+ # Output only. Number of resources checked for compliance. Must equal:
988
+ # unenforced + noncompliant + compliant + error
989
+ # Corresponds to the JSON property `scanned`
990
+ # @return [Fixnum]
991
+ attr_accessor :scanned
992
+
993
+ # Output only. Number of resources where the constraint was not enforced, i.e.
994
+ # the Policy set `enforced: false` for that resource.
995
+ # Corresponds to the JSON property `unenforced`
996
+ # @return [Fixnum]
997
+ attr_accessor :unenforced
998
+
999
+ def initialize(**args)
1000
+ update!(**args)
1001
+ end
1002
+
1003
+ # Update properties of this object
1004
+ def update!(**args)
1005
+ @compliant = args[:compliant] if args.key?(:compliant)
1006
+ @errors = args[:errors] if args.key?(:errors)
1007
+ @noncompliant = args[:noncompliant] if args.key?(:noncompliant)
1008
+ @scanned = args[:scanned] if args.key?(:scanned)
1009
+ @unenforced = args[:unenforced] if args.key?(:unenforced)
1010
+ end
1011
+ end
1012
+
699
1013
  # A resource describing a `Replay`, or simulation.
700
1014
  class GoogleCloudPolicysimulatorV1Replay
701
1015
  include Google::Apis::Core::Hashable
@@ -946,6 +1260,101 @@ module Google
946
1260
  end
947
1261
  end
948
1262
 
1263
+ # ResourceContext provides the context we know about a resource. It is similar
1264
+ # in concept to google.cloud.asset.v1.Resource, but focuses on the information
1265
+ # specifically used by Simulator.
1266
+ class GoogleCloudPolicysimulatorV1ResourceContext
1267
+ include Google::Apis::Core::Hashable
1268
+
1269
+ # The ancestry path of the resource in Google Cloud [resource hierarchy](https://
1270
+ # cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
1271
+ # represented as a list of relative resource names. An ancestry path starts with
1272
+ # the closest ancestor in the hierarchy and ends at root. If the resource is a
1273
+ # project, folder, or organization, the ancestry path starts from the resource
1274
+ # itself. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
1275
+ # Corresponds to the JSON property `ancestors`
1276
+ # @return [Array<String>]
1277
+ attr_accessor :ancestors
1278
+
1279
+ # The asset type of the resource as defined by CAIS. Example: `compute.
1280
+ # googleapis.com/Firewall` See [Supported asset types](https://cloud.google.com/
1281
+ # asset-inventory/docs/supported-asset-types) for more information.
1282
+ # Corresponds to the JSON property `assetType`
1283
+ # @return [String]
1284
+ attr_accessor :asset_type
1285
+
1286
+ # The full name of the resource. Example: `//compute.googleapis.com/projects/
1287
+ # my_project_123/zones/zone1/instances/instance1` See [Resource names](https://
1288
+ # cloud.google.com/apis/design/resource_names#full_resource_name) for more
1289
+ # information.
1290
+ # Corresponds to the JSON property `resource`
1291
+ # @return [String]
1292
+ attr_accessor :resource
1293
+
1294
+ def initialize(**args)
1295
+ update!(**args)
1296
+ end
1297
+
1298
+ # Update properties of this object
1299
+ def update!(**args)
1300
+ @ancestors = args[:ancestors] if args.key?(:ancestors)
1301
+ @asset_type = args[:asset_type] if args.key?(:asset_type)
1302
+ @resource = args[:resource] if args.key?(:resource)
1303
+ end
1304
+ end
1305
+
1306
+ # CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
1307
+ # OrgPolicyViolationsPreview generations operation.
1308
+ class GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata
1309
+ include Google::Apis::Core::Hashable
1310
+
1311
+ # Time when the request was received.
1312
+ # Corresponds to the JSON property `requestTime`
1313
+ # @return [String]
1314
+ attr_accessor :request_time
1315
+
1316
+ # Total number of resources that need scanning. Should equal resource_scanned +
1317
+ # resources_pending
1318
+ # Corresponds to the JSON property `resourcesFound`
1319
+ # @return [Fixnum]
1320
+ attr_accessor :resources_found
1321
+
1322
+ # Number of resources still to scan.
1323
+ # Corresponds to the JSON property `resourcesPending`
1324
+ # @return [Fixnum]
1325
+ attr_accessor :resources_pending
1326
+
1327
+ # Number of resources already scanned.
1328
+ # Corresponds to the JSON property `resourcesScanned`
1329
+ # @return [Fixnum]
1330
+ attr_accessor :resources_scanned
1331
+
1332
+ # Time when the request started processing, i.e., when the state was set to
1333
+ # RUNNING.
1334
+ # Corresponds to the JSON property `startTime`
1335
+ # @return [String]
1336
+ attr_accessor :start_time
1337
+
1338
+ # Output only. The current state of the operation.
1339
+ # Corresponds to the JSON property `state`
1340
+ # @return [String]
1341
+ attr_accessor :state
1342
+
1343
+ def initialize(**args)
1344
+ update!(**args)
1345
+ end
1346
+
1347
+ # Update properties of this object
1348
+ def update!(**args)
1349
+ @request_time = args[:request_time] if args.key?(:request_time)
1350
+ @resources_found = args[:resources_found] if args.key?(:resources_found)
1351
+ @resources_pending = args[:resources_pending] if args.key?(:resources_pending)
1352
+ @resources_scanned = args[:resources_scanned] if args.key?(:resources_scanned)
1353
+ @start_time = args[:start_time] if args.key?(:start_time)
1354
+ @state = args[:state] if args.key?(:state)
1355
+ end
1356
+ end
1357
+
949
1358
  # GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
950
1359
  # OrgPolicyViolationsPreview generations operation.
951
1360
  class GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata
@@ -1002,20 +1411,21 @@ module Google
1002
1411
  class GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay
1003
1412
  include Google::Apis::Core::Hashable
1004
1413
 
1005
- # The OrgPolicy CustomConstraint changes to preview violations for. Any existing
1006
- # CustomConstraints with the same name will be overridden in the simulation.
1007
- # That is, violations will be determined as if all custom constraints in the
1008
- # overlay were instantiated. Only a single custom_constraint is supported in the
1009
- # overlay at a time. For evaluating multiple constraints, multiple `
1010
- # GenerateOrgPolicyViolationsPreview` requests are made, where each request
1011
- # evaluates a single constraint.
1414
+ # Optional. The OrgPolicy CustomConstraint changes to preview violations for.
1415
+ # Any existing CustomConstraints with the same name will be overridden in the
1416
+ # simulation. That is, violations will be determined as if all custom
1417
+ # constraints in the overlay were instantiated. Only a single custom_constraint
1418
+ # is supported in the overlay at a time. For evaluating multiple constraints,
1419
+ # multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each
1420
+ # request evaluates a single constraint.
1012
1421
  # Corresponds to the JSON property `customConstraints`
1013
1422
  # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay>]
1014
1423
  attr_accessor :custom_constraints
1015
1424
 
1016
- # The OrgPolicy changes to preview violations for. Any existing OrgPolicies with
1017
- # the same name will be overridden in the simulation. That is, violations will
1018
- # be determined as if all policies in the overlay were created or updated.
1425
+ # Optional. The OrgPolicy changes to preview violations for. Any existing
1426
+ # OrgPolicies with the same name will be overridden in the simulation. That is,
1427
+ # violations will be determined as if all policies in the overlay were created
1428
+ # or updated.
1019
1429
  # Corresponds to the JSON property `policies`
1020
1430
  # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay>]
1021
1431
  attr_accessor :policies
@@ -1043,7 +1453,8 @@ module Google
1043
1453
  # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint]
1044
1454
  attr_accessor :custom_constraint
1045
1455
 
1046
- # Resource the constraint is attached to. Example: "organization/987654"
1456
+ # Optional. Resource the constraint is attached to. Example: "organization/
1457
+ # 987654"
1047
1458
  # Corresponds to the JSON property `customConstraintParent`
1048
1459
  # @return [String]
1049
1460
  attr_accessor :custom_constraint_parent
@@ -1069,7 +1480,8 @@ module Google
1069
1480
  # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2Policy]
1070
1481
  attr_accessor :policy
1071
1482
 
1072
- # The parent of the policy we are attaching to. Example: "projects/123456"
1483
+ # Optional. The parent of the policy we are attaching to. Example: "projects/
1484
+ # 123456"
1073
1485
  # Corresponds to the JSON property `policyParent`
1074
1486
  # @return [String]
1075
1487
  attr_accessor :policy_parent
@@ -1165,29 +1577,29 @@ module Google
1165
1577
  class GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts
1166
1578
  include Google::Apis::Core::Hashable
1167
1579
 
1168
- # Number of scanned resources with zero violations.
1580
+ # Output only. Number of scanned resources with zero violations.
1169
1581
  # Corresponds to the JSON property `compliant`
1170
1582
  # @return [Fixnum]
1171
1583
  attr_accessor :compliant
1172
1584
 
1173
- # Number of resources that returned an error when scanned.
1585
+ # Output only. Number of resources that returned an error when scanned.
1174
1586
  # Corresponds to the JSON property `errors`
1175
1587
  # @return [Fixnum]
1176
1588
  attr_accessor :errors
1177
1589
 
1178
- # Number of scanned resources with at least one violation.
1590
+ # Output only. Number of scanned resources with at least one violation.
1179
1591
  # Corresponds to the JSON property `noncompliant`
1180
1592
  # @return [Fixnum]
1181
1593
  attr_accessor :noncompliant
1182
1594
 
1183
- # Number of resources checked for compliance. Must equal: unenforced +
1184
- # noncompliant + compliant + error
1595
+ # Output only. Number of resources checked for compliance. Must equal:
1596
+ # unenforced + noncompliant + compliant + error
1185
1597
  # Corresponds to the JSON property `scanned`
1186
1598
  # @return [Fixnum]
1187
1599
  attr_accessor :scanned
1188
1600
 
1189
- # Number of resources where the constraint was not enforced, i.e. the Policy set
1190
- # `enforced: false` for that resource.
1601
+ # Output only. Number of resources where the constraint was not enforced, i.e.
1602
+ # the Policy set `enforced: false` for that resource.
1191
1603
  # Corresponds to the JSON property `unenforced`
1192
1604
  # @return [Fixnum]
1193
1605
  attr_accessor :unenforced
@@ -1206,6 +1618,58 @@ module Google
1206
1618
  end
1207
1619
  end
1208
1620
 
1621
+ # CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
1622
+ # OrgPolicyViolationsPreview generations operation.
1623
+ class GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata
1624
+ include Google::Apis::Core::Hashable
1625
+
1626
+ # Time when the request was received.
1627
+ # Corresponds to the JSON property `requestTime`
1628
+ # @return [String]
1629
+ attr_accessor :request_time
1630
+
1631
+ # Total number of resources that need scanning. Should equal resource_scanned +
1632
+ # resources_pending
1633
+ # Corresponds to the JSON property `resourcesFound`
1634
+ # @return [Fixnum]
1635
+ attr_accessor :resources_found
1636
+
1637
+ # Number of resources still to scan.
1638
+ # Corresponds to the JSON property `resourcesPending`
1639
+ # @return [Fixnum]
1640
+ attr_accessor :resources_pending
1641
+
1642
+ # Number of resources already scanned.
1643
+ # Corresponds to the JSON property `resourcesScanned`
1644
+ # @return [Fixnum]
1645
+ attr_accessor :resources_scanned
1646
+
1647
+ # Time when the request started processing, i.e., when the state was set to
1648
+ # RUNNING.
1649
+ # Corresponds to the JSON property `startTime`
1650
+ # @return [String]
1651
+ attr_accessor :start_time
1652
+
1653
+ # Output only. The current state of the operation.
1654
+ # Corresponds to the JSON property `state`
1655
+ # @return [String]
1656
+ attr_accessor :state
1657
+
1658
+ def initialize(**args)
1659
+ update!(**args)
1660
+ end
1661
+
1662
+ # Update properties of this object
1663
+ def update!(**args)
1664
+ @request_time = args[:request_time] if args.key?(:request_time)
1665
+ @resources_found = args[:resources_found] if args.key?(:resources_found)
1666
+ @resources_pending = args[:resources_pending] if args.key?(:resources_pending)
1667
+ @resources_scanned = args[:resources_scanned] if args.key?(:resources_scanned)
1668
+ @start_time = args[:start_time] if args.key?(:start_time)
1669
+ @state = args[:state] if args.key?(:state)
1670
+ end
1671
+ end
1672
+
1209
1673
  # GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
1210
1674
  # OrgPolicyViolationsPreview generations operation.
1211
1675
  class GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata
@@ -1262,20 +1726,21 @@ module Google
1262
1726
  class GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay
1263
1727
  include Google::Apis::Core::Hashable
1264
1728
 
1265
- # The OrgPolicy CustomConstraint changes to preview violations for. Any existing
1266
- # CustomConstraints with the same name will be overridden in the simulation.
1267
- # That is, violations will be determined as if all custom constraints in the
1268
- # overlay were instantiated. Only a single custom_constraint is supported in the
1269
- # overlay at a time. For evaluating multiple constraints, multiple `
1270
- # GenerateOrgPolicyViolationsPreview` requests are made, where each request
1271
- # evaluates a single constraint.
1729
+ # Optional. The OrgPolicy CustomConstraint changes to preview violations for.
1730
+ # Any existing CustomConstraints with the same name will be overridden in the
1731
+ # simulation. That is, violations will be determined as if all custom
1732
+ # constraints in the overlay were instantiated. Only a single custom_constraint
1733
+ # is supported in the overlay at a time. For evaluating multiple constraints,
1734
+ # multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each
1735
+ # request evaluates a single constraint.
1272
1736
  # Corresponds to the JSON property `customConstraints`
1273
1737
  # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay>]
1274
1738
  attr_accessor :custom_constraints
1275
1739
 
1276
- # The OrgPolicy changes to preview violations for. Any existing OrgPolicies with
1277
- # the same name will be overridden in the simulation. That is, violations will
1278
- # be determined as if all policies in the overlay were created or updated.
1740
+ # Optional. The OrgPolicy changes to preview violations for. Any existing
1741
+ # OrgPolicies with the same name will be overridden in the simulation. That is,
1742
+ # violations will be determined as if all policies in the overlay were created
1743
+ # or updated.
1279
1744
  # Corresponds to the JSON property `policies`
1280
1745
  # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay>]
1281
1746
  attr_accessor :policies
@@ -1303,7 +1768,8 @@ module Google
1303
1768
  # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint]
1304
1769
  attr_accessor :custom_constraint
1305
1770
 
1306
- # Resource the constraint is attached to. Example: "organization/987654"
1771
+ # Optional. Resource the constraint is attached to. Example: "organization/
1772
+ # 987654"
1307
1773
  # Corresponds to the JSON property `customConstraintParent`
1308
1774
  # @return [String]
1309
1775
  attr_accessor :custom_constraint_parent
@@ -1329,7 +1795,8 @@ module Google
1329
1795
  # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2Policy]
1330
1796
  attr_accessor :policy
1331
1797
 
1332
- # The parent of the policy we are attaching to. Example: "projects/123456"
1798
+ # Optional. The parent of the policy we are attaching to. Example: "projects/
1799
+ # 123456"
1333
1800
  # Corresponds to the JSON property `policyParent`
1334
1801
  # @return [String]
1335
1802
  attr_accessor :policy_parent
@@ -1425,29 +1892,29 @@ module Google
1425
1892
  class GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts
1426
1893
  include Google::Apis::Core::Hashable
1427
1894
 
1428
- # Number of scanned resources with zero violations.
1895
+ # Output only. Number of scanned resources with zero violations.
1429
1896
  # Corresponds to the JSON property `compliant`
1430
1897
  # @return [Fixnum]
1431
1898
  attr_accessor :compliant
1432
1899
 
1433
- # Number of resources that returned an error when scanned.
1900
+ # Output only. Number of resources that returned an error when scanned.
1434
1901
  # Corresponds to the JSON property `errors`
1435
1902
  # @return [Fixnum]
1436
1903
  attr_accessor :errors
1437
1904
 
1438
- # Number of scanned resources with at least one violation.
1905
+ # Output only. Number of scanned resources with at least one violation.
1439
1906
  # Corresponds to the JSON property `noncompliant`
1440
1907
  # @return [Fixnum]
1441
1908
  attr_accessor :noncompliant
1442
1909
 
1443
- # Number of resources checked for compliance. Must equal: unenforced +
1444
- # noncompliant + compliant + error
1910
+ # Output only. Number of resources checked for compliance. Must equal:
1911
+ # unenforced + noncompliant + compliant + error
1445
1912
  # Corresponds to the JSON property `scanned`
1446
1913
  # @return [Fixnum]
1447
1914
  attr_accessor :scanned
1448
1915
 
1449
- # Number of resources where the constraint was not enforced, i.e. the Policy set
1450
- # `enforced: false` for that resource.
1916
+ # Output only. Number of resources where the constraint was not enforced, i.e.
1917
+ # the Policy set `enforced: false` for that resource.
1451
1918
  # Corresponds to the JSON property `unenforced`
1452
1919
  # @return [Fixnum]
1453
1920
  attr_accessor :unenforced
@@ -1618,7 +2085,10 @@ module Google
1618
2085
  attr_accessor :members
1619
2086
 
1620
2087
  # Role that is assigned to the list of `members`, or principals. For example, `
1621
- # roles/viewer`, `roles/editor`, or `roles/owner`.
2088
+ # roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM
2089
+ # roles and permissions, see the [IAM documentation](https://cloud.google.com/
2090
+ # iam/docs/roles-overview). For a list of the available pre-defined roles, see [
2091
+ # here](https://cloud.google.com/iam/docs/understanding-roles).
1622
2092
  # Corresponds to the JSON property `role`
1623
2093
  # @return [String]
1624
2094
  attr_accessor :role
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module PolicysimulatorV1
18
18
  # Version of the google-apis-policysimulator_v1 gem
19
- GEM_VERSION = "0.32.0"
19
+ GEM_VERSION = "0.34.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.13.0"
22
+ GENERATOR_VERSION = "0.13.1"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20231217"
25
+ REVISION = "20240218"
26
26
  end
27
27
  end
28
28
  end
@@ -94,12 +94,60 @@ module Google
94
94
  include Google::Apis::Core::JsonObjectSupport
95
95
  end
96
96
 
97
+ class GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
97
109
  class GoogleCloudPolicysimulatorV1ListReplayResultsResponse
98
110
  class Representation < Google::Apis::Core::JsonRepresentation; end
99
111
 
100
112
  include Google::Apis::Core::JsonObjectSupport
101
113
  end
102
114
 
115
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlay
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolation
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
103
151
  class GoogleCloudPolicysimulatorV1Replay
104
152
  class Representation < Google::Apis::Core::JsonRepresentation; end
105
153
 
@@ -136,6 +184,18 @@ module Google
136
184
  include Google::Apis::Core::JsonObjectSupport
137
185
  end
138
186
 
187
+ class GoogleCloudPolicysimulatorV1ResourceContext
188
+ class Representation < Google::Apis::Core::JsonRepresentation; end
189
+
190
+ include Google::Apis::Core::JsonObjectSupport
191
+ end
192
+
193
+ class GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata
194
+ class Representation < Google::Apis::Core::JsonRepresentation; end
195
+
196
+ include Google::Apis::Core::JsonObjectSupport
197
+ end
198
+
139
199
  class GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata
140
200
  class Representation < Google::Apis::Core::JsonRepresentation; end
141
201
 
@@ -172,6 +232,12 @@ module Google
172
232
  include Google::Apis::Core::JsonObjectSupport
173
233
  end
174
234
 
235
+ class GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata
236
+ class Representation < Google::Apis::Core::JsonRepresentation; end
237
+
238
+ include Google::Apis::Core::JsonObjectSupport
239
+ end
240
+
175
241
  class GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata
176
242
  class Representation < Google::Apis::Core::JsonRepresentation; end
177
243
 
@@ -399,6 +465,24 @@ module Google
399
465
  end
400
466
  end
401
467
 
468
+ class GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse
469
+ # @private
470
+ class Representation < Google::Apis::Core::JsonRepresentation
471
+ property :next_page_token, as: 'nextPageToken'
472
+ collection :org_policy_violations_previews, as: 'orgPolicyViolationsPreviews', class: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview::Representation
473
+
474
+ end
475
+ end
476
+
477
+ class GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse
478
+ # @private
479
+ class Representation < Google::Apis::Core::JsonRepresentation
480
+ property :next_page_token, as: 'nextPageToken'
481
+ collection :org_policy_violations, as: 'orgPolicyViolations', class: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolation, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolation::Representation
482
+
483
+ end
484
+ end
485
+
402
486
  class GoogleCloudPolicysimulatorV1ListReplayResultsResponse
403
487
  # @private
404
488
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -408,6 +492,73 @@ module Google
408
492
  end
409
493
  end
410
494
 
495
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlay
496
+ # @private
497
+ class Representation < Google::Apis::Core::JsonRepresentation
498
+ collection :custom_constraints, as: 'customConstraints', class: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay::Representation
499
+
500
+ collection :policies, as: 'policies', class: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay::Representation
501
+
502
+ end
503
+ end
504
+
505
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay
506
+ # @private
507
+ class Representation < Google::Apis::Core::JsonRepresentation
508
+ property :custom_constraint, as: 'customConstraint', class: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint::Representation
509
+
510
+ property :custom_constraint_parent, as: 'customConstraintParent'
511
+ end
512
+ end
513
+
514
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay
515
+ # @private
516
+ class Representation < Google::Apis::Core::JsonRepresentation
517
+ property :policy, as: 'policy', class: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2Policy, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2Policy::Representation
518
+
519
+ property :policy_parent, as: 'policyParent'
520
+ end
521
+ end
522
+
523
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolation
524
+ # @private
525
+ class Representation < Google::Apis::Core::JsonRepresentation
526
+ property :custom_constraint, as: 'customConstraint', class: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint::Representation
527
+
528
+ property :error, as: 'error', class: Google::Apis::PolicysimulatorV1::GoogleRpcStatus, decorator: Google::Apis::PolicysimulatorV1::GoogleRpcStatus::Representation
529
+
530
+ property :name, as: 'name'
531
+ property :resource, as: 'resource', class: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ResourceContext, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ResourceContext::Representation
532
+
533
+ end
534
+ end
535
+
536
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview
537
+ # @private
538
+ class Representation < Google::Apis::Core::JsonRepresentation
539
+ property :create_time, as: 'createTime'
540
+ collection :custom_constraints, as: 'customConstraints'
541
+ property :name, as: 'name'
542
+ property :overlay, as: 'overlay', class: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlay, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlay::Representation
543
+
544
+ property :resource_counts, as: 'resourceCounts', class: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts::Representation
545
+
546
+ property :state, as: 'state'
547
+ property :violations_count, as: 'violationsCount'
548
+ end
549
+ end
550
+
551
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts
552
+ # @private
553
+ class Representation < Google::Apis::Core::JsonRepresentation
554
+ property :compliant, as: 'compliant'
555
+ property :errors, as: 'errors'
556
+ property :noncompliant, as: 'noncompliant'
557
+ property :scanned, as: 'scanned'
558
+ property :unenforced, as: 'unenforced'
559
+ end
560
+ end
561
+
411
562
  class GoogleCloudPolicysimulatorV1Replay
412
563
  # @private
413
564
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -474,6 +625,27 @@ module Google
474
625
  end
475
626
  end
476
627
 
628
+ class GoogleCloudPolicysimulatorV1ResourceContext
629
+ # @private
630
+ class Representation < Google::Apis::Core::JsonRepresentation
631
+ collection :ancestors, as: 'ancestors'
632
+ property :asset_type, as: 'assetType'
633
+ property :resource, as: 'resource'
634
+ end
635
+ end
636
+
637
+ class GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata
638
+ # @private
639
+ class Representation < Google::Apis::Core::JsonRepresentation
640
+ property :request_time, as: 'requestTime'
641
+ property :resources_found, as: 'resourcesFound'
642
+ property :resources_pending, as: 'resourcesPending'
643
+ property :resources_scanned, as: 'resourcesScanned'
644
+ property :start_time, as: 'startTime'
645
+ property :state, as: 'state'
646
+ end
647
+ end
648
+
477
649
  class GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata
478
650
  # @private
479
651
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -540,6 +712,18 @@ module Google
540
712
  end
541
713
  end
542
714
 
715
+ class GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata
716
+ # @private
717
+ class Representation < Google::Apis::Core::JsonRepresentation
718
+ property :request_time, as: 'requestTime'
719
+ property :resources_found, as: 'resourcesFound'
720
+ property :resources_pending, as: 'resourcesPending'
721
+ property :resources_scanned, as: 'resourcesScanned'
722
+ property :start_time, as: 'startTime'
723
+ property :state, as: 'state'
724
+ end
725
+ end
726
+
543
727
  class GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata
544
728
  # @private
545
729
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -311,6 +311,164 @@ module Google
311
311
  execute_or_queue_command(command, &block)
312
312
  end
313
313
 
314
+ # CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the
315
+ # proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay.
316
+ # The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The
317
+ # resources to scan are inferred from these specified changes.
318
+ # @param [String] parent
319
+ # Required. The organization under which this OrgPolicyViolationsPreview will be
320
+ # created. Example: `organizations/my-example-org/locations/global`
321
+ # @param [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview] google_cloud_policysimulator_v1_org_policy_violations_preview_object
322
+ # @param [String] org_policy_violations_preview_id
323
+ # Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If
324
+ # not provided, a random ID will be generated.
325
+ # @param [String] fields
326
+ # Selector specifying which fields to include in a partial response.
327
+ # @param [String] quota_user
328
+ # Available to use for quota purposes for server-side applications. Can be any
329
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
330
+ # @param [Google::Apis::RequestOptions] options
331
+ # Request-specific options
332
+ #
333
+ # @yield [result, err] Result & error if block supplied
334
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation] parsed result object
335
+ # @yieldparam err [StandardError] error object if request failed
336
+ #
337
+ # @return [Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation]
338
+ #
339
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
340
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
341
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
342
+ def create_organization_location_org_policy_violations_preview(parent, google_cloud_policysimulator_v1_org_policy_violations_preview_object = nil, org_policy_violations_preview_id: nil, fields: nil, quota_user: nil, options: nil, &block)
343
+ command = make_simple_command(:post, 'v1/{+parent}/orgPolicyViolationsPreviews', options)
344
+ command.request_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview::Representation
345
+ command.request_object = google_cloud_policysimulator_v1_org_policy_violations_preview_object
346
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation::Representation
347
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation
348
+ command.params['parent'] = parent unless parent.nil?
349
+ command.query['orgPolicyViolationsPreviewId'] = org_policy_violations_preview_id unless org_policy_violations_preview_id.nil?
350
+ command.query['fields'] = fields unless fields.nil?
351
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
352
+ execute_or_queue_command(command, &block)
353
+ end
354
+
355
+ # GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview.
356
+ # Each OrgPolicyViolationsPreview is available for at least 7 days.
357
+ # @param [String] name
358
+ # Required. The name of the OrgPolicyViolationsPreview to get.
359
+ # @param [String] fields
360
+ # Selector specifying which fields to include in a partial response.
361
+ # @param [String] quota_user
362
+ # Available to use for quota purposes for server-side applications. Can be any
363
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
364
+ # @param [Google::Apis::RequestOptions] options
365
+ # Request-specific options
366
+ #
367
+ # @yield [result, err] Result & error if block supplied
368
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview] parsed result object
369
+ # @yieldparam err [StandardError] error object if request failed
370
+ #
371
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview]
372
+ #
373
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
374
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
375
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
376
+ def get_organization_location_org_policy_violations_preview(name, fields: nil, quota_user: nil, options: nil, &block)
377
+ command = make_simple_command(:get, 'v1/{+name}', options)
378
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview::Representation
379
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview
380
+ command.params['name'] = name unless name.nil?
381
+ command.query['fields'] = fields unless fields.nil?
382
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
383
+ execute_or_queue_command(command, &block)
384
+ end
385
+
386
+ # ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an
387
+ # organization. Each OrgPolicyViolationsPreview is available for at least 7 days.
388
+ # @param [String] parent
389
+ # Required. The parent the violations are scoped to. Format: `organizations/`
390
+ # organization`/locations/`location`` Example: `organizations/my-example-org/
391
+ # locations/global`
392
+ # @param [Fixnum] page_size
393
+ # Optional. The maximum number of items to return. The service may return fewer
394
+ # than this value. If unspecified, at most 5 items will be returned. The maximum
395
+ # value is 10; values above 10 will be coerced to 10.
396
+ # @param [String] page_token
397
+ # Optional. A page token, received from a previous call. Provide this to
398
+ # retrieve the subsequent page. When paginating, all other parameters must match
399
+ # the call that provided the page token.
400
+ # @param [String] fields
401
+ # Selector specifying which fields to include in a partial response.
402
+ # @param [String] quota_user
403
+ # Available to use for quota purposes for server-side applications. Can be any
404
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
405
+ # @param [Google::Apis::RequestOptions] options
406
+ # Request-specific options
407
+ #
408
+ # @yield [result, err] Result & error if block supplied
409
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse] parsed result object
410
+ # @yieldparam err [StandardError] error object if request failed
411
+ #
412
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse]
413
+ #
414
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
415
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
416
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
417
+ def list_organization_location_org_policy_violations_previews(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
418
+ command = make_simple_command(:get, 'v1/{+parent}/orgPolicyViolationsPreviews', options)
419
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse::Representation
420
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse
421
+ command.params['parent'] = parent unless parent.nil?
422
+ command.query['pageSize'] = page_size unless page_size.nil?
423
+ command.query['pageToken'] = page_token unless page_token.nil?
424
+ command.query['fields'] = fields unless fields.nil?
425
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
426
+ execute_or_queue_command(command, &block)
427
+ end
428
+
429
+ # ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an
430
+ # OrgPolicyViolationsPreview.
431
+ # @param [String] parent
432
+ # Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from.
433
+ # Format: organizations/`organization`/locations/`location`/
434
+ # orgPolicyViolationsPreviews/`orgPolicyViolationsPreview`
435
+ # @param [Fixnum] page_size
436
+ # Optional. The maximum number of items to return. The service may return fewer
437
+ # than this value. If unspecified, at most 50 items will be returned. The
438
+ # maximum value is 1000; values above 1000 will be coerced to 1000.
439
+ # @param [String] page_token
440
+ # Optional. A page token, received from a previous call. Provide this to
441
+ # retrieve the subsequent page. When paginating, all other parameters must match
442
+ # the call that provided the page token.
443
+ # @param [String] fields
444
+ # Selector specifying which fields to include in a partial response.
445
+ # @param [String] quota_user
446
+ # Available to use for quota purposes for server-side applications. Can be any
447
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
448
+ # @param [Google::Apis::RequestOptions] options
449
+ # Request-specific options
450
+ #
451
+ # @yield [result, err] Result & error if block supplied
452
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse] parsed result object
453
+ # @yieldparam err [StandardError] error object if request failed
454
+ #
455
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse]
456
+ #
457
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
458
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
459
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
460
+ def list_organization_location_org_policy_violations_preview_org_policy_violations(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
461
+ command = make_simple_command(:get, 'v1/{+parent}/orgPolicyViolations', options)
462
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse::Representation
463
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse
464
+ command.params['parent'] = parent unless parent.nil?
465
+ command.query['pageSize'] = page_size unless page_size.nil?
466
+ command.query['pageToken'] = page_token unless page_token.nil?
467
+ command.query['fields'] = fields unless fields.nil?
468
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
469
+ execute_or_queue_command(command, &block)
470
+ end
471
+
314
472
  # Creates and starts a Replay using the given ReplayConfig.
315
473
  # @param [String] parent
316
474
  # Required. The parent resource where this Replay will be created. This resource
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-policysimulator_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.0
4
+ version: 0.34.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-23 00:00:00.000000000 Z
11
+ date: 2024-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.12.0
19
+ version: 0.14.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.12.0
29
+ version: 0.14.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-policysimulator_v1/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-policysimulator_v1/v0.32.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-policysimulator_v1/v0.34.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-policysimulator_v1
63
63
  post_install_message:
64
64
  rdoc_options: []
@@ -68,14 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - ">="
70
70
  - !ruby/object:Gem::Version
71
- version: '2.5'
71
+ version: '2.7'
72
72
  required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.5.3
78
+ rubygems_version: 3.5.6
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple REST client for Policy Simulator API V1