google-cloud-policy_simulator-v1 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +4 -4
- data/README.md +4 -4
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/client.rb +848 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/credentials.rb +47 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/operations.rb +813 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/paths.rb +138 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/client.rb +794 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/operations.rb +998 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest/service_stub.rb +326 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest.rb +63 -0
- data/lib/google/cloud/policy_simulator/v1/org_policy_violations_preview_service.rb +66 -0
- data/lib/google/cloud/policy_simulator/v1/rest.rb +2 -1
- data/lib/google/cloud/policy_simulator/v1/simulator/rest/operations.rb +42 -0
- data/lib/google/cloud/policy_simulator/v1/version.rb +1 -1
- data/lib/google/cloud/policy_simulator/v1.rb +3 -2
- data/lib/google/cloud/policysimulator/v1/explanations_pb.rb +1 -1
- data/lib/google/cloud/policysimulator/v1/orgpolicy_pb.rb +70 -0
- data/lib/google/cloud/policysimulator/v1/orgpolicy_services_pb.rb +76 -0
- data/lib/google/cloud/policysimulator/v1/simulator_pb.rb +1 -1
- data/proto_docs/google/cloud/orgpolicy/v2/constraint.rb +370 -0
- data/proto_docs/google/cloud/orgpolicy/v2/orgpolicy.rb +454 -0
- data/proto_docs/google/cloud/policysimulator/v1/explanations.rb +3 -3
- data/proto_docs/google/cloud/policysimulator/v1/orgpolicy.rb +380 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +108 -0
- metadata +32 -2
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/cloud/policysimulator/v1/orgpolicy.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
require 'google/api/client_pb'
|
9
|
+
require 'google/api/field_behavior_pb'
|
10
|
+
require 'google/api/resource_pb'
|
11
|
+
require 'google/cloud/orgpolicy/v2/constraint_pb'
|
12
|
+
require 'google/cloud/orgpolicy/v2/orgpolicy_pb'
|
13
|
+
require 'google/longrunning/operations_pb'
|
14
|
+
require 'google/protobuf/timestamp_pb'
|
15
|
+
require 'google/rpc/status_pb'
|
16
|
+
|
17
|
+
|
18
|
+
descriptor_data = "\n/google/cloud/policysimulator/v1/orgpolicy.proto\x12\x1fgoogle.cloud.policysimulator.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/orgpolicy/v2/constraint.proto\x1a)google/cloud/orgpolicy/v2/orgpolicy.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xbd\x06\n\x1aOrgPolicyViolationsPreview\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.policysimulator.v1.PreviewStateB\x03\xe0\x41\x03\x12G\n\x07overlay\x18\x03 \x01(\x0b\x32\x31.google.cloud.policysimulator.v1.OrgPolicyOverlayB\x03\xe0\x41\x02\x12\x1d\n\x10violations_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12h\n\x0fresource_counts\x18\x05 \x01(\x0b\x32J.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview.ResourceCountsB\x03\xe0\x41\x03\x12M\n\x12\x63ustom_constraints\x18\x06 \x03(\tB1\xe0\x41\x03\xfa\x41+\n)orgpolicy.googleapis.com/CustomConstraint\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x87\x01\n\x0eResourceCounts\x12\x14\n\x07scanned\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cnoncompliant\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tcompliant\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nunenforced\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x13\n\x06\x65rrors\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03:\xe7\x01\xea\x41\xe3\x01\n9policysimulator.googleapis.com/OrgPolicyViolationsPreview\x12morganizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{org_policy_violations_preview}*\x1borgPolicyViolationsPreviews2\x1aorgPolicyViolationsPreview\"\xcf\x03\n\x12OrgPolicyViolation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x42\n\x08resource\x18\x02 \x01(\x0b\x32\x30.google.cloud.policysimulator.v1.ResourceContext\x12\x46\n\x11\x63ustom_constraint\x18\x03 \x01(\x0b\x32+.google.cloud.orgpolicy.v2.CustomConstraint\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status:\xfb\x01\xea\x41\xf7\x01\n1policysimulator.googleapis.com/OrgPolicyViolation\x12\x98\x01organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{org_policy_violations_preview}/orgPolicyViolations/{org_policy_violation}*\x13orgPolicyViolations2\x12orgPolicyViolation\"J\n\x0fResourceContext\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x12\n\nasset_type\x18\x02 \x01(\t\x12\x11\n\tancestors\x18\x03 \x03(\t\"\xcb\x03\n\x10OrgPolicyOverlay\x12V\n\x08policies\x18\x01 \x03(\x0b\x32?.google.cloud.policysimulator.v1.OrgPolicyOverlay.PolicyOverlayB\x03\xe0\x41\x01\x12j\n\x12\x63ustom_constraints\x18\x02 \x03(\x0b\x32I.google.cloud.policysimulator.v1.OrgPolicyOverlay.CustomConstraintOverlayB\x03\xe0\x41\x01\x1a\x63\n\rPolicyOverlay\x12\x1a\n\rpolicy_parent\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x36\n\x06policy\x18\x02 \x01(\x0b\x32!.google.cloud.orgpolicy.v2.PolicyB\x03\xe0\x41\x01\x1a\x8d\x01\n\x17\x43ustomConstraintOverlay\x12%\n\x18\x63ustom_constraint_parent\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12K\n\x11\x63ustom_constraint\x18\x02 \x01(\x0b\x32+.google.cloud.orgpolicy.v2.CustomConstraintB\x03\xe0\x41\x01\"\xa7\x02\n1CreateOrgPolicyViolationsPreviewOperationMetadata\x12\x30\n\x0crequest_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x05state\x18\x03 \x01(\x0e\x32-.google.cloud.policysimulator.v1.PreviewStateB\x03\xe0\x41\x03\x12\x17\n\x0fresources_found\x18\x04 \x01(\x05\x12\x19\n\x11resources_scanned\x18\x05 \x01(\x05\x12\x19\n\x11resources_pending\x18\x06 \x01(\x05\"\xac\x01\n&ListOrgPolicyViolationsPreviewsRequest\x12Q\n\x06parent\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\x12\x39policysimulator.googleapis.com/OrgPolicyViolationsPreview\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa7\x01\n\'ListOrgPolicyViolationsPreviewsResponse\x12\x63\n\x1eorg_policy_violations_previews\x18\x01 \x03(\x0b\x32;.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"w\n$GetOrgPolicyViolationsPreviewRequest\x12O\n\x04name\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\n9policysimulator.googleapis.com/OrgPolicyViolationsPreview\"\x94\x02\n\'CreateOrgPolicyViolationsPreviewRequest\x12Q\n\x06parent\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\x12\x39policysimulator.googleapis.com/OrgPolicyViolationsPreview\x12g\n\x1dorg_policy_violations_preview\x18\x02 \x01(\x0b\x32;.google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewB\x03\xe0\x41\x02\x12-\n org_policy_violations_preview_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9c\x01\n\x1eListOrgPolicyViolationsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31policysimulator.googleapis.com/OrgPolicyViolation\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x8e\x01\n\x1fListOrgPolicyViolationsResponse\x12R\n\x15org_policy_violations\x18\x01 \x03(\x0b\x32\x33.google.cloud.policysimulator.v1.OrgPolicyViolation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t*\x82\x01\n\x0cPreviewState\x12\x1d\n\x19PREVIEW_STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0fPREVIEW_PENDING\x10\x01\x12\x13\n\x0fPREVIEW_RUNNING\x10\x02\x12\x15\n\x11PREVIEW_SUCCEEDED\x10\x03\x12\x12\n\x0ePREVIEW_FAILED\x10\x04\x32\xa2\n\n!OrgPolicyViolationsPreviewService\x12\x8b\x02\n\x1fListOrgPolicyViolationsPreviews\x12G.google.cloud.policysimulator.v1.ListOrgPolicyViolationsPreviewsRequest\x1aH.google.cloud.policysimulator.v1.ListOrgPolicyViolationsPreviewsResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=organizations/*/locations/*}/orgPolicyViolationsPreviews\x12\xf8\x01\n\x1dGetOrgPolicyViolationsPreview\x12\x45.google.cloud.policysimulator.v1.GetOrgPolicyViolationsPreviewRequest\x1a;.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=organizations/*/locations/*/orgPolicyViolationsPreviews/*}\x12\x93\x03\n CreateOrgPolicyViolationsPreview\x12H.google.cloud.policysimulator.v1.CreateOrgPolicyViolationsPreviewRequest\x1a\x1d.google.longrunning.Operation\"\x85\x02\xca\x41O\n\x1aOrgPolicyViolationsPreview\x12\x31\x43reateOrgPolicyViolationsPreviewOperationMetadata\xda\x41\x45parent,org_policy_violations_preview,org_policy_violations_preview_id\x82\xd3\xe4\x93\x02\x65\"D/v1/{parent=organizations/*/locations/*}/orgPolicyViolationsPreviews:\x1dorg_policy_violations_preview\x12\x89\x02\n\x17ListOrgPolicyViolations\x12?.google.cloud.policysimulator.v1.ListOrgPolicyViolationsRequest\x1a@.google.cloud.policysimulator.v1.ListOrgPolicyViolationsResponse\"k\xda\x41\x06parent\x82\xd3\xe4\x93\x02\\\x12Z/v1/{parent=organizations/*/locations/*/orgPolicyViolationsPreviews/*}/orgPolicyViolations\x1aR\xca\x41\x1epolicysimulator.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x9b\x03\n#com.google.cloud.policysimulator.v1B\x0eOrgpolicyProtoP\x01ZMcloud.google.com/go/policysimulator/apiv1/policysimulatorpb;policysimulatorpb\xaa\x02\x1fGoogle.Cloud.PolicySimulator.V1\xca\x02\x1fGoogle\\Cloud\\PolicySimulator\\V1\xea\x02\"Google::Cloud::PolicySimulator::V1\xea\x41\\\n\'iam.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41J\n!iam.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3"
|
19
|
+
|
20
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
21
|
+
|
22
|
+
begin
|
23
|
+
pool.add_serialized_file(descriptor_data)
|
24
|
+
rescue TypeError
|
25
|
+
# Compatibility code: will be removed in the next major version.
|
26
|
+
require 'google/protobuf/descriptor_pb'
|
27
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
28
|
+
parsed.clear_dependency
|
29
|
+
serialized = parsed.class.encode(parsed)
|
30
|
+
file = pool.add_serialized_file(serialized)
|
31
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
32
|
+
imports = [
|
33
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
34
|
+
["google.cloud.orgpolicy.v2.CustomConstraint", "google/cloud/orgpolicy/v2/constraint.proto"],
|
35
|
+
["google.rpc.Status", "google/rpc/status.proto"],
|
36
|
+
["google.cloud.orgpolicy.v2.Policy", "google/cloud/orgpolicy/v2/orgpolicy.proto"],
|
37
|
+
]
|
38
|
+
imports.each do |type_name, expected_filename|
|
39
|
+
import_file = pool.lookup(type_name).file_descriptor
|
40
|
+
if import_file.name != expected_filename
|
41
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
45
|
+
warn "This will become an error in the next major version."
|
46
|
+
end
|
47
|
+
|
48
|
+
module Google
|
49
|
+
module Cloud
|
50
|
+
module PolicySimulator
|
51
|
+
module V1
|
52
|
+
OrgPolicyViolationsPreview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.OrgPolicyViolationsPreview").msgclass
|
53
|
+
OrgPolicyViolationsPreview::ResourceCounts = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.OrgPolicyViolationsPreview.ResourceCounts").msgclass
|
54
|
+
OrgPolicyViolation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.OrgPolicyViolation").msgclass
|
55
|
+
ResourceContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.ResourceContext").msgclass
|
56
|
+
OrgPolicyOverlay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.OrgPolicyOverlay").msgclass
|
57
|
+
OrgPolicyOverlay::PolicyOverlay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.OrgPolicyOverlay.PolicyOverlay").msgclass
|
58
|
+
OrgPolicyOverlay::CustomConstraintOverlay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.OrgPolicyOverlay.CustomConstraintOverlay").msgclass
|
59
|
+
CreateOrgPolicyViolationsPreviewOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.CreateOrgPolicyViolationsPreviewOperationMetadata").msgclass
|
60
|
+
ListOrgPolicyViolationsPreviewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.ListOrgPolicyViolationsPreviewsRequest").msgclass
|
61
|
+
ListOrgPolicyViolationsPreviewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.ListOrgPolicyViolationsPreviewsResponse").msgclass
|
62
|
+
GetOrgPolicyViolationsPreviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.GetOrgPolicyViolationsPreviewRequest").msgclass
|
63
|
+
CreateOrgPolicyViolationsPreviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.CreateOrgPolicyViolationsPreviewRequest").msgclass
|
64
|
+
ListOrgPolicyViolationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.ListOrgPolicyViolationsRequest").msgclass
|
65
|
+
ListOrgPolicyViolationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.ListOrgPolicyViolationsResponse").msgclass
|
66
|
+
PreviewState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.policysimulator.v1.PreviewState").enummodule
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/policysimulator/v1/orgpolicy.proto for package 'Google.Cloud.PolicySimulator.V1'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2025 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/cloud/policysimulator/v1/orgpolicy_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module PolicySimulator
|
25
|
+
module V1
|
26
|
+
module OrgPolicyViolationsPreviewService
|
27
|
+
# Violations Preview API service for OrgPolicy.
|
28
|
+
#
|
29
|
+
# An
|
30
|
+
# [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
|
31
|
+
# is a preview of the violations that will exist as soon as a proposed
|
32
|
+
# OrgPolicy change is submitted. To create an
|
33
|
+
# [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview],
|
34
|
+
# the API user specifies the changes they wish to make and requests the
|
35
|
+
# generation of a preview via [GenerateViolationsPreview][]. the OrgPolicy
|
36
|
+
# Simulator service then scans the API user's currently existing resources to
|
37
|
+
# determine these resources violate the newly set OrgPolicy.
|
38
|
+
class Service
|
39
|
+
|
40
|
+
include ::GRPC::GenericService
|
41
|
+
|
42
|
+
self.marshal_class_method = :encode
|
43
|
+
self.unmarshal_class_method = :decode
|
44
|
+
self.service_name = 'google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService'
|
45
|
+
|
46
|
+
# ListOrgPolicyViolationsPreviews lists each
|
47
|
+
# [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
|
48
|
+
# in an organization. Each
|
49
|
+
# [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
|
50
|
+
# is available for at least 7 days.
|
51
|
+
rpc :ListOrgPolicyViolationsPreviews, ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest, ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsResponse
|
52
|
+
# GetOrgPolicyViolationsPreview gets the specified
|
53
|
+
# [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview].
|
54
|
+
# Each
|
55
|
+
# [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
|
56
|
+
# is available for at least 7 days.
|
57
|
+
rpc :GetOrgPolicyViolationsPreview, ::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest, ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview
|
58
|
+
# CreateOrgPolicyViolationsPreview creates an
|
59
|
+
# [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
|
60
|
+
# for the proposed changes in the provided
|
61
|
+
# [OrgPolicyViolationsPreview.OrgPolicyOverlay][]. The changes to OrgPolicy
|
62
|
+
# are specified by this `OrgPolicyOverlay`. The resources to scan are
|
63
|
+
# inferred from these specified changes.
|
64
|
+
rpc :CreateOrgPolicyViolationsPreview, ::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest, ::Google::Longrunning::Operation
|
65
|
+
# ListOrgPolicyViolations lists the [OrgPolicyViolations][] that are present
|
66
|
+
# in an
|
67
|
+
# [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview].
|
68
|
+
rpc :ListOrgPolicyViolations, ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest, ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsResponse
|
69
|
+
end
|
70
|
+
|
71
|
+
Stub = Service.rpc_stub_class
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -16,7 +16,7 @@ require 'google/rpc/status_pb'
|
|
16
16
|
require 'google/type/date_pb'
|
17
17
|
|
18
18
|
|
19
|
-
descriptor_data = "\n/google/cloud/policysimulator/v1/simulator.proto\x12\x1fgoogle.cloud.policysimulator.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/policysimulator/v1/explanations.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\"\xef\x05\n\x06Replay\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.policysimulator.v1.Replay.StateB\x03\xe0\x41\x03\x12\x42\n\x06\x63onfig\x18\x03 \x01(\x0b\x32-.google.cloud.policysimulator.v1.ReplayConfigB\x03\xe0\x41\x02\x12T\n\x0fresults_summary\x18\x05 \x01(\x0b\x32\x36.google.cloud.policysimulator.v1.Replay.ResultsSummaryB\x03\xe0\x41\x03\x1a\xbb\x01\n\x0eResultsSummary\x12\x11\n\tlog_count\x18\x01 \x01(\x05\x12\x17\n\x0funchanged_count\x18\x02 \x01(\x05\x12\x18\n\x10\x64ifference_count\x18\x03 \x01(\x05\x12\x13\n\x0b\x65rror_count\x18\x04 \x01(\x05\x12&\n\x0boldest_date\x18\x05 \x01(\x0b\x32\x11.google.type.Date\x12&\n\x0bnewest_date\x18\x06 \x01(\x0b\x32\x11.google.type.Date\"S\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\xe1\x01\xea\x41\xdd\x01\n%policysimulator.googleapis.com/Replay\x12\x38projects/{project}/locations/{location}/replays/{replay}\x12\x36\x66olders/{folder}/locations/{location}/replays/{replay}\x12\x42organizations/{organization}/locations/{location}/replays/{replay}\"\xe5\x04\n\x0cReplayResult\x12;\n\x04\x64iff\x18\x05 \x01(\x0b\x32+.google.cloud.policysimulator.v1.ReplayDiffH\x00\x12#\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12:\n\x06parent\x18\x02 \x01(\tB*\xfa\x41\'\n%policysimulator.googleapis.com/Replay\x12\x42\n\x0c\x61\x63\x63\x65ss_tuple\x18\x03 \x01(\x0b\x32,.google.cloud.policysimulator.v1.AccessTuple\x12)\n\x0elast_seen_date\x18\x04 \x01(\x0b\x32\x11.google.type.Date:\xaf\x02\xea\x41\xab\x02\n+policysimulator.googleapis.com/ReplayResult\x12Pprojects/{project}/locations/{location}/replays/{replay}/results/{replay_result}\x12Nfolders/{folder}/locations/{location}/replays/{replay}/results/{replay_result}\x12Zorganizations/{organization}/locations/{location}/replays/{replay}/results/{replay_result}B\x08\n\x06result\"h\n\x13\x43reateReplayRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12<\n\x06replay\x18\x02 \x01(\x0b\x32\'.google.cloud.policysimulator.v1.ReplayB\x03\xe0\x41\x02\"I\n\x17ReplayOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"O\n\x10GetReplayRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%policysimulator.googleapis.com/Replay\"\x80\x01\n\x18ListReplayResultsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%policysimulator.googleapis.com/Replay\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"{\n\x19ListReplayResultsResponse\x12\x45\n\x0ereplay_results\x18\x01 \x03(\x0b\x32-.google.cloud.policysimulator.v1.ReplayResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc0\x02\n\x0cReplayConfig\x12X\n\x0epolicy_overlay\x18\x01 \x03(\x0b\x32@.google.cloud.policysimulator.v1.ReplayConfig.PolicyOverlayEntry\x12K\n\nlog_source\x18\x02 \x01(\x0e\x32\x37.google.cloud.policysimulator.v1.ReplayConfig.LogSource\x1aK\n\x12PolicyOverlayEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.google.iam.v1.Policy:\x02\x38\x01\"<\n\tLogSource\x12\x1a\n\x16LOG_SOURCE_UNSPECIFIED\x10\x00\x12\x13\n\x0fRECENT_ACCESSES\x10\x01\"S\n\nReplayDiff\x12\x45\n\x0b\x61\x63\x63\x65ss_diff\x18\x02 \x01(\x0b\x32\x30.google.cloud.policysimulator.v1.AccessStateDiff\"\xaa\x03\n\x0f\x41\x63\x63\x65ssStateDiff\x12\x42\n\x08\x62\x61seline\x18\x01 \x01(\x0b\x32\x30.google.cloud.policysimulator.v1.ExplainedAccess\x12\x43\n\tsimulated\x18\x02 \x01(\x0b\x32\x30.google.cloud.policysimulator.v1.ExplainedAccess\x12X\n\raccess_change\x18\x03 \x01(\x0e\x32\x41.google.cloud.policysimulator.v1.AccessStateDiff.AccessChangeType\"\xb3\x01\n\x10\x41\x63\x63\x65ssChangeType\x12\"\n\x1e\x41\x43\x43\x45SS_CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNO_CHANGE\x10\x01\x12\x12\n\x0eUNKNOWN_CHANGE\x10\x02\x12\x12\n\x0e\x41\x43\x43\x45SS_REVOKED\x10\x03\x12\x11\n\rACCESS_GAINED\x10\x04\x12\x18\n\x14\x41\x43\x43\x45SS_MAYBE_REVOKED\x10\x05\x12\x17\n\x13\x41\x43\x43\x45SS_MAYBE_GAINED\x10\x06\"\xbd\x01\n\x0f\x45xplainedAccess\x12\x42\n\x0c\x61\x63\x63\x65ss_state\x18\x01 \x01(\x0e\x32,.google.cloud.policysimulator.v1.AccessState\x12\x42\n\x08policies\x18\x02 \x03(\x0b\x32\x30.google.cloud.policysimulator.v1.ExplainedPolicy\x12\"\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x12.google.rpc.Status2\x81\x08\n\tSimulator\x12\x87\x02\n\tGetReplay\x12\x31.google.cloud.policysimulator.v1.GetReplayRequest\x1a\'.google.cloud.policysimulator.v1.Replay\"\x9d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8f\x01\x12+/v1/{name=projects/*/locations/*/replays/*}Z,\x12*/v1/{name=folders/*/locations/*/replays/*}Z2\x12\x30/v1/{name=organizations/*/locations/*/replays/*}\x12\xc8\x02\n\x0c\x43reateReplay\x12\x34.google.cloud.policysimulator.v1.CreateReplayRequest\x1a\x1d.google.longrunning.Operation\"\xe2\x01\xca\x41!\n\x06Replay\x12\x17ReplayOperationMetadata\xda\x41\rparent,replay\x82\xd3\xe4\x93\x02\xa7\x01\"+/v1/{parent=projects/*/locations/*}/replays:\x06replayZ4\"*/v1/{parent=folders/*/locations/*}/replays:\x06replayZ:\"0/v1/{parent=organizations/*/locations/*}/replays:\x06replay\x12\xca\x02\n\x11ListReplayResults\x12\x39.google.cloud.policysimulator.v1.ListReplayResultsRequest\x1a:.google.cloud.policysimulator.v1.ListReplayResultsResponse\"\xbd\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xad\x01\x12\x35/v1/{parent=projects/*/locations/*/replays/*}/resultsZ6\x12\x34/v1/{parent=folders/*/locations/*/replays/*}/resultsZ<\x12:/v1/{parent=organizations/*/locations/*/replays/*}/results\x1aR\xca\x41\x1epolicysimulator.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\
|
19
|
+
descriptor_data = "\n/google/cloud/policysimulator/v1/simulator.proto\x12\x1fgoogle.cloud.policysimulator.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/policysimulator/v1/explanations.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\"\xef\x05\n\x06Replay\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.policysimulator.v1.Replay.StateB\x03\xe0\x41\x03\x12\x42\n\x06\x63onfig\x18\x03 \x01(\x0b\x32-.google.cloud.policysimulator.v1.ReplayConfigB\x03\xe0\x41\x02\x12T\n\x0fresults_summary\x18\x05 \x01(\x0b\x32\x36.google.cloud.policysimulator.v1.Replay.ResultsSummaryB\x03\xe0\x41\x03\x1a\xbb\x01\n\x0eResultsSummary\x12\x11\n\tlog_count\x18\x01 \x01(\x05\x12\x17\n\x0funchanged_count\x18\x02 \x01(\x05\x12\x18\n\x10\x64ifference_count\x18\x03 \x01(\x05\x12\x13\n\x0b\x65rror_count\x18\x04 \x01(\x05\x12&\n\x0boldest_date\x18\x05 \x01(\x0b\x32\x11.google.type.Date\x12&\n\x0bnewest_date\x18\x06 \x01(\x0b\x32\x11.google.type.Date\"S\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\xe1\x01\xea\x41\xdd\x01\n%policysimulator.googleapis.com/Replay\x12\x38projects/{project}/locations/{location}/replays/{replay}\x12\x36\x66olders/{folder}/locations/{location}/replays/{replay}\x12\x42organizations/{organization}/locations/{location}/replays/{replay}\"\xe5\x04\n\x0cReplayResult\x12;\n\x04\x64iff\x18\x05 \x01(\x0b\x32+.google.cloud.policysimulator.v1.ReplayDiffH\x00\x12#\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12:\n\x06parent\x18\x02 \x01(\tB*\xfa\x41\'\n%policysimulator.googleapis.com/Replay\x12\x42\n\x0c\x61\x63\x63\x65ss_tuple\x18\x03 \x01(\x0b\x32,.google.cloud.policysimulator.v1.AccessTuple\x12)\n\x0elast_seen_date\x18\x04 \x01(\x0b\x32\x11.google.type.Date:\xaf\x02\xea\x41\xab\x02\n+policysimulator.googleapis.com/ReplayResult\x12Pprojects/{project}/locations/{location}/replays/{replay}/results/{replay_result}\x12Nfolders/{folder}/locations/{location}/replays/{replay}/results/{replay_result}\x12Zorganizations/{organization}/locations/{location}/replays/{replay}/results/{replay_result}B\x08\n\x06result\"h\n\x13\x43reateReplayRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12<\n\x06replay\x18\x02 \x01(\x0b\x32\'.google.cloud.policysimulator.v1.ReplayB\x03\xe0\x41\x02\"I\n\x17ReplayOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"O\n\x10GetReplayRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%policysimulator.googleapis.com/Replay\"\x80\x01\n\x18ListReplayResultsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%policysimulator.googleapis.com/Replay\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"{\n\x19ListReplayResultsResponse\x12\x45\n\x0ereplay_results\x18\x01 \x03(\x0b\x32-.google.cloud.policysimulator.v1.ReplayResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc0\x02\n\x0cReplayConfig\x12X\n\x0epolicy_overlay\x18\x01 \x03(\x0b\x32@.google.cloud.policysimulator.v1.ReplayConfig.PolicyOverlayEntry\x12K\n\nlog_source\x18\x02 \x01(\x0e\x32\x37.google.cloud.policysimulator.v1.ReplayConfig.LogSource\x1aK\n\x12PolicyOverlayEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.google.iam.v1.Policy:\x02\x38\x01\"<\n\tLogSource\x12\x1a\n\x16LOG_SOURCE_UNSPECIFIED\x10\x00\x12\x13\n\x0fRECENT_ACCESSES\x10\x01\"S\n\nReplayDiff\x12\x45\n\x0b\x61\x63\x63\x65ss_diff\x18\x02 \x01(\x0b\x32\x30.google.cloud.policysimulator.v1.AccessStateDiff\"\xaa\x03\n\x0f\x41\x63\x63\x65ssStateDiff\x12\x42\n\x08\x62\x61seline\x18\x01 \x01(\x0b\x32\x30.google.cloud.policysimulator.v1.ExplainedAccess\x12\x43\n\tsimulated\x18\x02 \x01(\x0b\x32\x30.google.cloud.policysimulator.v1.ExplainedAccess\x12X\n\raccess_change\x18\x03 \x01(\x0e\x32\x41.google.cloud.policysimulator.v1.AccessStateDiff.AccessChangeType\"\xb3\x01\n\x10\x41\x63\x63\x65ssChangeType\x12\"\n\x1e\x41\x43\x43\x45SS_CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNO_CHANGE\x10\x01\x12\x12\n\x0eUNKNOWN_CHANGE\x10\x02\x12\x12\n\x0e\x41\x43\x43\x45SS_REVOKED\x10\x03\x12\x11\n\rACCESS_GAINED\x10\x04\x12\x18\n\x14\x41\x43\x43\x45SS_MAYBE_REVOKED\x10\x05\x12\x17\n\x13\x41\x43\x43\x45SS_MAYBE_GAINED\x10\x06\"\xbd\x01\n\x0f\x45xplainedAccess\x12\x42\n\x0c\x61\x63\x63\x65ss_state\x18\x01 \x01(\x0e\x32,.google.cloud.policysimulator.v1.AccessState\x12\x42\n\x08policies\x18\x02 \x03(\x0b\x32\x30.google.cloud.policysimulator.v1.ExplainedPolicy\x12\"\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x12.google.rpc.Status2\x81\x08\n\tSimulator\x12\x87\x02\n\tGetReplay\x12\x31.google.cloud.policysimulator.v1.GetReplayRequest\x1a\'.google.cloud.policysimulator.v1.Replay\"\x9d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8f\x01\x12+/v1/{name=projects/*/locations/*/replays/*}Z,\x12*/v1/{name=folders/*/locations/*/replays/*}Z2\x12\x30/v1/{name=organizations/*/locations/*/replays/*}\x12\xc8\x02\n\x0c\x43reateReplay\x12\x34.google.cloud.policysimulator.v1.CreateReplayRequest\x1a\x1d.google.longrunning.Operation\"\xe2\x01\xca\x41!\n\x06Replay\x12\x17ReplayOperationMetadata\xda\x41\rparent,replay\x82\xd3\xe4\x93\x02\xa7\x01\"+/v1/{parent=projects/*/locations/*}/replays:\x06replayZ4\"*/v1/{parent=folders/*/locations/*}/replays:\x06replayZ:\"0/v1/{parent=organizations/*/locations/*}/replays:\x06replay\x12\xca\x02\n\x11ListReplayResults\x12\x39.google.cloud.policysimulator.v1.ListReplayResultsRequest\x1a:.google.cloud.policysimulator.v1.ListReplayResultsResponse\"\xbd\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xad\x01\x12\x35/v1/{parent=projects/*/locations/*/replays/*}/resultsZ6\x12\x34/v1/{parent=folders/*/locations/*/replays/*}/resultsZ<\x12:/v1/{parent=organizations/*/locations/*/replays/*}/results\x1aR\xca\x41\x1epolicysimulator.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xef\x01\n#com.google.cloud.policysimulator.v1B\x0eSimulatorProtoP\x01ZMcloud.google.com/go/policysimulator/apiv1/policysimulatorpb;policysimulatorpb\xaa\x02\x1fGoogle.Cloud.PolicySimulator.V1\xca\x02\x1fGoogle\\Cloud\\PolicySimulator\\V1\xea\x02\"Google::Cloud::PolicySimulator::V1b\x06proto3"
|
20
20
|
|
21
21
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
22
22
|
|
@@ -0,0 +1,370 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module OrgPolicy
|
23
|
+
module V2
|
24
|
+
# A constraint describes a way to restrict resource's configuration. For
|
25
|
+
# example, you could enforce a constraint that controls which Google Cloud
|
26
|
+
# services can be activated across an organization, or whether a Compute Engine
|
27
|
+
# instance can have serial port connections established. Constraints can be
|
28
|
+
# configured by the organization policy administrator to fit the needs of the
|
29
|
+
# organization by setting a policy that includes constraints at different
|
30
|
+
# locations in the organization's resource hierarchy. Policies are inherited
|
31
|
+
# down the resource hierarchy from higher levels, but can also be overridden.
|
32
|
+
# For details about the inheritance rules, see
|
33
|
+
# {::Google::Cloud::OrgPolicy::V2::Policy `Policy`}.
|
34
|
+
#
|
35
|
+
# Constraints have a default behavior determined by the `constraint_default`
|
36
|
+
# field, which is the enforcement behavior that is used in the absence of a
|
37
|
+
# policy being defined or inherited for the resource in question.
|
38
|
+
# @!attribute [rw] name
|
39
|
+
# @return [::String]
|
40
|
+
# Immutable. The resource name of the constraint. Must be in one of
|
41
|
+
# the following forms:
|
42
|
+
#
|
43
|
+
# * `projects/{project_number}/constraints/{constraint_name}`
|
44
|
+
# * `folders/{folder_id}/constraints/{constraint_name}`
|
45
|
+
# * `organizations/{organization_id}/constraints/{constraint_name}`
|
46
|
+
#
|
47
|
+
# For example, "/projects/123/constraints/compute.disableSerialPortAccess".
|
48
|
+
# @!attribute [rw] display_name
|
49
|
+
# @return [::String]
|
50
|
+
# The human readable name.
|
51
|
+
#
|
52
|
+
# Mutable.
|
53
|
+
# @!attribute [rw] description
|
54
|
+
# @return [::String]
|
55
|
+
# Detailed description of what this constraint controls as well as how and
|
56
|
+
# where it is enforced.
|
57
|
+
#
|
58
|
+
# Mutable.
|
59
|
+
# @!attribute [rw] constraint_default
|
60
|
+
# @return [::Google::Cloud::OrgPolicy::V2::Constraint::ConstraintDefault]
|
61
|
+
# The evaluation behavior of this constraint in the absence of a policy.
|
62
|
+
# @!attribute [rw] list_constraint
|
63
|
+
# @return [::Google::Cloud::OrgPolicy::V2::Constraint::ListConstraint]
|
64
|
+
# Defines this constraint as being a list constraint.
|
65
|
+
#
|
66
|
+
# Note: The following fields are mutually exclusive: `list_constraint`, `boolean_constraint`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
67
|
+
# @!attribute [rw] boolean_constraint
|
68
|
+
# @return [::Google::Cloud::OrgPolicy::V2::Constraint::BooleanConstraint]
|
69
|
+
# Defines this constraint as being a boolean constraint.
|
70
|
+
#
|
71
|
+
# Note: The following fields are mutually exclusive: `boolean_constraint`, `list_constraint`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
72
|
+
# @!attribute [rw] supports_dry_run
|
73
|
+
# @return [::Boolean]
|
74
|
+
# Shows if dry run is supported for this constraint or not.
|
75
|
+
# @!attribute [rw] equivalent_constraint
|
76
|
+
# @return [::String]
|
77
|
+
# Managed constraint and canned constraint sometimes can have
|
78
|
+
# equivalents. This field is used to store the equivalent constraint name.
|
79
|
+
# @!attribute [rw] supports_simulation
|
80
|
+
# @return [::Boolean]
|
81
|
+
# Shows if simulation is supported for this constraint or not.
|
82
|
+
class Constraint
|
83
|
+
include ::Google::Protobuf::MessageExts
|
84
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
85
|
+
|
86
|
+
# A constraint type that allows or disallows a list of string values, which
|
87
|
+
# are configured in the
|
88
|
+
# {::Google::Cloud::OrgPolicy::V2::PolicySpec::PolicyRule `PolicyRule`}.
|
89
|
+
# @!attribute [rw] supports_in
|
90
|
+
# @return [::Boolean]
|
91
|
+
# Indicates whether values grouped into categories can be used in
|
92
|
+
# `Policy.allowed_values` and `Policy.denied_values`. For example,
|
93
|
+
# `"in:Python"` would match any value in the 'Python' group.
|
94
|
+
# @!attribute [rw] supports_under
|
95
|
+
# @return [::Boolean]
|
96
|
+
# Indicates whether subtrees of the Resource Manager resource hierarchy
|
97
|
+
# can be used in `Policy.allowed_values` and `Policy.denied_values`. For
|
98
|
+
# example, `"under:folders/123"` would match any resource under the
|
99
|
+
# 'folders/123' folder.
|
100
|
+
class ListConstraint
|
101
|
+
include ::Google::Protobuf::MessageExts
|
102
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
103
|
+
end
|
104
|
+
|
105
|
+
# Custom constraint definition. Defines this as a managed constraint.
|
106
|
+
# @!attribute [rw] resource_types
|
107
|
+
# @return [::Array<::String>]
|
108
|
+
# The resource instance type on which this policy applies. Format will be
|
109
|
+
# of the form : `<service name>/<type>` Example:
|
110
|
+
#
|
111
|
+
# * `compute.googleapis.com/Instance`.
|
112
|
+
# @!attribute [rw] method_types
|
113
|
+
# @return [::Array<::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::MethodType>]
|
114
|
+
# All the operations being applied for this constraint.
|
115
|
+
# @!attribute [rw] condition
|
116
|
+
# @return [::String]
|
117
|
+
# Org policy condition/expression. For example:
|
118
|
+
# `resource.instanceName.matches("[production|test]_.*_(\d)+")` or,
|
119
|
+
# `resource.management.auto_upgrade == true`
|
120
|
+
#
|
121
|
+
# The max length of the condition is 1000 characters.
|
122
|
+
# @!attribute [rw] action_type
|
123
|
+
# @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::ActionType]
|
124
|
+
# Allow or deny type.
|
125
|
+
# @!attribute [rw] parameters
|
126
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter}]
|
127
|
+
# Stores the structure of
|
128
|
+
# {::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter `Parameters`}
|
129
|
+
# used by the constraint condition. The key of `map` represents the name of
|
130
|
+
# the parameter.
|
131
|
+
class CustomConstraintDefinition
|
132
|
+
include ::Google::Protobuf::MessageExts
|
133
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
134
|
+
|
135
|
+
# Defines a parameter structure.
|
136
|
+
# @!attribute [rw] type
|
137
|
+
# @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Type]
|
138
|
+
# Type of the parameter.
|
139
|
+
# @!attribute [rw] default_value
|
140
|
+
# @return [::Google::Protobuf::Value]
|
141
|
+
# Sets the value of the parameter in an assignment if no value is given.
|
142
|
+
# @!attribute [rw] valid_values_expr
|
143
|
+
# @return [::String]
|
144
|
+
# Provides a CEL expression to specify the acceptable parameter values
|
145
|
+
# during assignment.
|
146
|
+
# For example, parameterName in ("parameterValue1", "parameterValue2")
|
147
|
+
# @!attribute [rw] metadata
|
148
|
+
# @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Metadata]
|
149
|
+
# Defines subproperties primarily used by the UI to display user-friendly
|
150
|
+
# information.
|
151
|
+
# @!attribute [rw] item
|
152
|
+
# @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Type]
|
153
|
+
# Determines the parameter's value structure.
|
154
|
+
# For example, `LIST<STRING>` can be specified by defining `type: LIST`,
|
155
|
+
# and `item: STRING`.
|
156
|
+
class Parameter
|
157
|
+
include ::Google::Protobuf::MessageExts
|
158
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
159
|
+
|
160
|
+
# Defines Metadata structure.
|
161
|
+
# @!attribute [rw] description
|
162
|
+
# @return [::String]
|
163
|
+
# Detailed description of what this `parameter` is and use of it.
|
164
|
+
# Mutable.
|
165
|
+
class Metadata
|
166
|
+
include ::Google::Protobuf::MessageExts
|
167
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
168
|
+
end
|
169
|
+
|
170
|
+
# All valid types of parameter.
|
171
|
+
module Type
|
172
|
+
# This is only used for distinguishing unset values and should never be
|
173
|
+
# used. Results in an error.
|
174
|
+
TYPE_UNSPECIFIED = 0
|
175
|
+
|
176
|
+
# List parameter type.
|
177
|
+
LIST = 1
|
178
|
+
|
179
|
+
# String parameter type.
|
180
|
+
STRING = 2
|
181
|
+
|
182
|
+
# Boolean parameter type.
|
183
|
+
BOOLEAN = 3
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
# @!attribute [rw] key
|
188
|
+
# @return [::String]
|
189
|
+
# @!attribute [rw] value
|
190
|
+
# @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter]
|
191
|
+
class ParametersEntry
|
192
|
+
include ::Google::Protobuf::MessageExts
|
193
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
194
|
+
end
|
195
|
+
|
196
|
+
# The operation for which this constraint will be applied. To apply this
|
197
|
+
# constraint only when creating new resources, the `method_types` should be
|
198
|
+
# `CREATE` only. To apply this constraint when creating or deleting
|
199
|
+
# resources, the `method_types` should be `CREATE` and `DELETE`.
|
200
|
+
#
|
201
|
+
# `UPDATE`-only custom constraints are not supported. Use `CREATE` or
|
202
|
+
# `CREATE, UPDATE`.
|
203
|
+
module MethodType
|
204
|
+
# This is only used for distinguishing unset values and should never be
|
205
|
+
# used. Results in an error.
|
206
|
+
METHOD_TYPE_UNSPECIFIED = 0
|
207
|
+
|
208
|
+
# Constraint applied when creating the resource.
|
209
|
+
CREATE = 1
|
210
|
+
|
211
|
+
# Constraint applied when updating the resource.
|
212
|
+
UPDATE = 2
|
213
|
+
|
214
|
+
# Constraint applied when deleting the resource.
|
215
|
+
# Not currently supported.
|
216
|
+
DELETE = 3
|
217
|
+
|
218
|
+
# Constraint applied when removing an IAM grant.
|
219
|
+
REMOVE_GRANT = 4
|
220
|
+
|
221
|
+
# Constraint applied when enforcing forced tagging.
|
222
|
+
GOVERN_TAGS = 5
|
223
|
+
end
|
224
|
+
|
225
|
+
# Allow or deny type.
|
226
|
+
module ActionType
|
227
|
+
# This is only used for distinguishing unset values and should never be
|
228
|
+
# used. Results in an error.
|
229
|
+
ACTION_TYPE_UNSPECIFIED = 0
|
230
|
+
|
231
|
+
# Allowed action type.
|
232
|
+
ALLOW = 1
|
233
|
+
|
234
|
+
# Deny action type.
|
235
|
+
DENY = 2
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
# A constraint type is enforced or not enforced, which is configured in the
|
240
|
+
# {::Google::Cloud::OrgPolicy::V2::PolicySpec::PolicyRule `PolicyRule`}.
|
241
|
+
#
|
242
|
+
# If `customConstraintDefinition` is defined, this constraint is a managed
|
243
|
+
# constraint.
|
244
|
+
# @!attribute [rw] custom_constraint_definition
|
245
|
+
# @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition]
|
246
|
+
# Custom constraint definition. Defines this as a managed constraint.
|
247
|
+
class BooleanConstraint
|
248
|
+
include ::Google::Protobuf::MessageExts
|
249
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
250
|
+
end
|
251
|
+
|
252
|
+
# Specifies the default behavior in the absence of any policy for the
|
253
|
+
# constraint. This must not be `CONSTRAINT_DEFAULT_UNSPECIFIED`.
|
254
|
+
#
|
255
|
+
# Immutable after creation.
|
256
|
+
module ConstraintDefault
|
257
|
+
# This is only used for distinguishing unset values and should never be
|
258
|
+
# used. Results in an error.
|
259
|
+
CONSTRAINT_DEFAULT_UNSPECIFIED = 0
|
260
|
+
|
261
|
+
# Indicate that all values are allowed for list constraints.
|
262
|
+
# Indicate that enforcement is off for boolean constraints.
|
263
|
+
ALLOW = 1
|
264
|
+
|
265
|
+
# Indicate that all values are denied for list constraints.
|
266
|
+
# Indicate that enforcement is on for boolean constraints.
|
267
|
+
DENY = 2
|
268
|
+
end
|
269
|
+
end
|
270
|
+
|
271
|
+
# A custom constraint defined by customers which can *only* be applied to the
|
272
|
+
# given resource types and organization.
|
273
|
+
#
|
274
|
+
# By creating a custom constraint, customers can apply policies of this
|
275
|
+
# custom constraint. *Creating a custom constraint itself does NOT apply any
|
276
|
+
# policy enforcement*.
|
277
|
+
# @!attribute [rw] name
|
278
|
+
# @return [::String]
|
279
|
+
# Immutable. Name of the constraint. This is unique within the organization.
|
280
|
+
# Format of the name should be
|
281
|
+
#
|
282
|
+
# * `organizations/{organization_id}/customConstraints/{custom_constraint_id}`
|
283
|
+
#
|
284
|
+
# Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`
|
285
|
+
#
|
286
|
+
# The max length is 70 characters and the minimum length is 1. Note that the
|
287
|
+
# prefix `organizations/{organization_id}/customConstraints/` is not counted.
|
288
|
+
# @!attribute [rw] resource_types
|
289
|
+
# @return [::Array<::String>]
|
290
|
+
# Immutable. The resource instance type on which this policy applies. Format
|
291
|
+
# will be of the form : `<service name>/<type>` Example:
|
292
|
+
#
|
293
|
+
# * `compute.googleapis.com/Instance`.
|
294
|
+
# @!attribute [rw] method_types
|
295
|
+
# @return [::Array<::Google::Cloud::OrgPolicy::V2::CustomConstraint::MethodType>]
|
296
|
+
# All the operations being applied for this constraint.
|
297
|
+
# @!attribute [rw] condition
|
298
|
+
# @return [::String]
|
299
|
+
# A Common Expression Language (CEL) condition which is used in the
|
300
|
+
# evaluation of the constraint. For example:
|
301
|
+
# `resource.instanceName.matches("[production|test]_.*_(\d)+")` or,
|
302
|
+
# `resource.management.auto_upgrade == true`
|
303
|
+
#
|
304
|
+
# The max length of the condition is 1000 characters.
|
305
|
+
# @!attribute [rw] action_type
|
306
|
+
# @return [::Google::Cloud::OrgPolicy::V2::CustomConstraint::ActionType]
|
307
|
+
# Allow or deny type.
|
308
|
+
# @!attribute [rw] display_name
|
309
|
+
# @return [::String]
|
310
|
+
# One line display name for the UI.
|
311
|
+
# The max length of the display_name is 200 characters.
|
312
|
+
# @!attribute [rw] description
|
313
|
+
# @return [::String]
|
314
|
+
# Detailed information about this custom policy constraint.
|
315
|
+
# The max length of the description is 2000 characters.
|
316
|
+
# @!attribute [r] update_time
|
317
|
+
# @return [::Google::Protobuf::Timestamp]
|
318
|
+
# Output only. The last time this custom constraint was updated. This
|
319
|
+
# represents the last time that the `CreateCustomConstraint` or
|
320
|
+
# `UpdateCustomConstraint` methods were called.
|
321
|
+
class CustomConstraint
|
322
|
+
include ::Google::Protobuf::MessageExts
|
323
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
324
|
+
|
325
|
+
# The operation for which this constraint will be applied. To apply this
|
326
|
+
# constraint only when creating new resources, the `method_types` should be
|
327
|
+
# `CREATE` only. To apply this constraint when creating or deleting
|
328
|
+
# resources, the `method_types` should be `CREATE` and `DELETE`.
|
329
|
+
#
|
330
|
+
# `UPDATE` only custom constraints are not supported. Use `CREATE` or
|
331
|
+
# `CREATE, UPDATE`.
|
332
|
+
module MethodType
|
333
|
+
# This is only used for distinguishing unset values and should never be
|
334
|
+
# used. Results in an error.
|
335
|
+
METHOD_TYPE_UNSPECIFIED = 0
|
336
|
+
|
337
|
+
# Constraint applied when creating the resource.
|
338
|
+
CREATE = 1
|
339
|
+
|
340
|
+
# Constraint applied when updating the resource.
|
341
|
+
UPDATE = 2
|
342
|
+
|
343
|
+
# Constraint applied when deleting the resource.
|
344
|
+
# Not currently supported.
|
345
|
+
DELETE = 3
|
346
|
+
|
347
|
+
# Constraint applied when removing an IAM grant.
|
348
|
+
REMOVE_GRANT = 4
|
349
|
+
|
350
|
+
# Constraint applied when enforcing forced tagging.
|
351
|
+
GOVERN_TAGS = 5
|
352
|
+
end
|
353
|
+
|
354
|
+
# Allow or deny type.
|
355
|
+
module ActionType
|
356
|
+
# This is only used for distinguishing unset values and should never be
|
357
|
+
# used. Results in an error.
|
358
|
+
ACTION_TYPE_UNSPECIFIED = 0
|
359
|
+
|
360
|
+
# Allowed action type.
|
361
|
+
ALLOW = 1
|
362
|
+
|
363
|
+
# Deny action type.
|
364
|
+
DENY = 2
|
365
|
+
end
|
366
|
+
end
|
367
|
+
end
|
368
|
+
end
|
369
|
+
end
|
370
|
+
end
|