Skip to content

Commit 6c02b3b

Browse files
feat: [google-cloud-policysimulator] added OrgPolicyViolationsPreviewService v1 API to simulate Org Policy (googleapis#14117)
- [ ] Regenerate this pull request now. BEGIN_COMMIT_OVERRIDE feat: added OrgPolicyViolationsPreviewService v1 API to simulate Org Policy changes docs: fix proto reference links in comments END_COMMIT_OVERRIDE Add OrgPolicyViolationsPreviewService v1 API for previewing the impact of a new custom constraint or organization policy that enforces a custom or managed constraint before it is enforced on the production environment. PiperOrigin-RevId: 784668306 Source-Link: googleapis/googleapis@d14c969 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d780e186cd05e1a9f660fe4ebc2424b39e7094a2 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXBvbGljeXNpbXVsYXRvci8uT3dsQm90LnlhbWwiLCJoIjoiZDc4MGUxODZjZDA1ZTFhOWY2NjBmZTRlYmMyNDI0YjM5ZTcwOTRhMiJ9 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 00fd5d1 commit 6c02b3b

37 files changed

Lines changed: 14739 additions & 6 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
OrgPolicyViolationsPreviewService
2+
---------------------------------------------------
3+
4+
.. automodule:: google.cloud.policysimulator_v1.services.org_policy_violations_preview_service
5+
:members:
6+
:inherited-members:
7+
8+
.. automodule:: google.cloud.policysimulator_v1.services.org_policy_violations_preview_service.pagers
9+
:members:
10+
:inherited-members:

packages/google-cloud-policysimulator/docs/policysimulator_v1/services_.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ Services for Google Cloud Policysimulator v1 API
33
.. toctree::
44
:maxdepth: 2
55

6+
org_policy_violations_preview_service
67
simulator

packages/google-cloud-policysimulator/google/cloud/policysimulator/__init__.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
__version__ = package_version.__version__
1919

2020

21+
from google.cloud.policysimulator_v1.services.org_policy_violations_preview_service.async_client import (
22+
OrgPolicyViolationsPreviewServiceAsyncClient,
23+
)
24+
from google.cloud.policysimulator_v1.services.org_policy_violations_preview_service.client import (
25+
OrgPolicyViolationsPreviewServiceClient,
26+
)
2127
from google.cloud.policysimulator_v1.services.simulator.async_client import (
2228
SimulatorAsyncClient,
2329
)
@@ -29,6 +35,20 @@
2935
ExplainedPolicy,
3036
HeuristicRelevance,
3137
)
38+
from google.cloud.policysimulator_v1.types.orgpolicy import (
39+
CreateOrgPolicyViolationsPreviewOperationMetadata,
40+
CreateOrgPolicyViolationsPreviewRequest,
41+
GetOrgPolicyViolationsPreviewRequest,
42+
ListOrgPolicyViolationsPreviewsRequest,
43+
ListOrgPolicyViolationsPreviewsResponse,
44+
ListOrgPolicyViolationsRequest,
45+
ListOrgPolicyViolationsResponse,
46+
OrgPolicyOverlay,
47+
OrgPolicyViolation,
48+
OrgPolicyViolationsPreview,
49+
PreviewState,
50+
ResourceContext,
51+
)
3252
from google.cloud.policysimulator_v1.types.simulator import (
3353
AccessStateDiff,
3454
CreateReplayRequest,
@@ -44,13 +64,27 @@
4464
)
4565

4666
__all__ = (
67+
"OrgPolicyViolationsPreviewServiceClient",
68+
"OrgPolicyViolationsPreviewServiceAsyncClient",
4769
"SimulatorClient",
4870
"SimulatorAsyncClient",
4971
"AccessTuple",
5072
"BindingExplanation",
5173
"ExplainedPolicy",
5274
"AccessState",
5375
"HeuristicRelevance",
76+
"CreateOrgPolicyViolationsPreviewOperationMetadata",
77+
"CreateOrgPolicyViolationsPreviewRequest",
78+
"GetOrgPolicyViolationsPreviewRequest",
79+
"ListOrgPolicyViolationsPreviewsRequest",
80+
"ListOrgPolicyViolationsPreviewsResponse",
81+
"ListOrgPolicyViolationsRequest",
82+
"ListOrgPolicyViolationsResponse",
83+
"OrgPolicyOverlay",
84+
"OrgPolicyViolation",
85+
"OrgPolicyViolationsPreview",
86+
"ResourceContext",
87+
"PreviewState",
5488
"AccessStateDiff",
5589
"CreateReplayRequest",
5690
"ExplainedAccess",

packages/google-cloud-policysimulator/google/cloud/policysimulator/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.1.14" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-policysimulator/google/cloud/policysimulator_v1/__init__.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
__version__ = package_version.__version__
1919

2020

21+
from .services.org_policy_violations_preview_service import (
22+
OrgPolicyViolationsPreviewServiceAsyncClient,
23+
OrgPolicyViolationsPreviewServiceClient,
24+
)
2125
from .services.simulator import SimulatorAsyncClient, SimulatorClient
2226
from .types.explanations import (
2327
AccessState,
@@ -26,6 +30,20 @@
2630
ExplainedPolicy,
2731
HeuristicRelevance,
2832
)
33+
from .types.orgpolicy import (
34+
CreateOrgPolicyViolationsPreviewOperationMetadata,
35+
CreateOrgPolicyViolationsPreviewRequest,
36+
GetOrgPolicyViolationsPreviewRequest,
37+
ListOrgPolicyViolationsPreviewsRequest,
38+
ListOrgPolicyViolationsPreviewsResponse,
39+
ListOrgPolicyViolationsRequest,
40+
ListOrgPolicyViolationsResponse,
41+
OrgPolicyOverlay,
42+
OrgPolicyViolation,
43+
OrgPolicyViolationsPreview,
44+
PreviewState,
45+
ResourceContext,
46+
)
2947
from .types.simulator import (
3048
AccessStateDiff,
3149
CreateReplayRequest,
@@ -41,22 +59,36 @@
4159
)
4260

4361
__all__ = (
62+
"OrgPolicyViolationsPreviewServiceAsyncClient",
4463
"SimulatorAsyncClient",
4564
"AccessState",
4665
"AccessStateDiff",
4766
"AccessTuple",
4867
"BindingExplanation",
68+
"CreateOrgPolicyViolationsPreviewOperationMetadata",
69+
"CreateOrgPolicyViolationsPreviewRequest",
4970
"CreateReplayRequest",
5071
"ExplainedAccess",
5172
"ExplainedPolicy",
73+
"GetOrgPolicyViolationsPreviewRequest",
5274
"GetReplayRequest",
5375
"HeuristicRelevance",
76+
"ListOrgPolicyViolationsPreviewsRequest",
77+
"ListOrgPolicyViolationsPreviewsResponse",
78+
"ListOrgPolicyViolationsRequest",
79+
"ListOrgPolicyViolationsResponse",
5480
"ListReplayResultsRequest",
5581
"ListReplayResultsResponse",
82+
"OrgPolicyOverlay",
83+
"OrgPolicyViolation",
84+
"OrgPolicyViolationsPreview",
85+
"OrgPolicyViolationsPreviewServiceClient",
86+
"PreviewState",
5687
"Replay",
5788
"ReplayConfig",
5889
"ReplayDiff",
5990
"ReplayOperationMetadata",
6091
"ReplayResult",
92+
"ResourceContext",
6193
"SimulatorClient",
6294
)

packages/google-cloud-policysimulator/google/cloud/policysimulator_v1/gapic_metadata.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,85 @@
55
"protoPackage": "google.cloud.policysimulator.v1",
66
"schema": "1.0",
77
"services": {
8+
"OrgPolicyViolationsPreviewService": {
9+
"clients": {
10+
"grpc": {
11+
"libraryClient": "OrgPolicyViolationsPreviewServiceClient",
12+
"rpcs": {
13+
"CreateOrgPolicyViolationsPreview": {
14+
"methods": [
15+
"create_org_policy_violations_preview"
16+
]
17+
},
18+
"GetOrgPolicyViolationsPreview": {
19+
"methods": [
20+
"get_org_policy_violations_preview"
21+
]
22+
},
23+
"ListOrgPolicyViolations": {
24+
"methods": [
25+
"list_org_policy_violations"
26+
]
27+
},
28+
"ListOrgPolicyViolationsPreviews": {
29+
"methods": [
30+
"list_org_policy_violations_previews"
31+
]
32+
}
33+
}
34+
},
35+
"grpc-async": {
36+
"libraryClient": "OrgPolicyViolationsPreviewServiceAsyncClient",
37+
"rpcs": {
38+
"CreateOrgPolicyViolationsPreview": {
39+
"methods": [
40+
"create_org_policy_violations_preview"
41+
]
42+
},
43+
"GetOrgPolicyViolationsPreview": {
44+
"methods": [
45+
"get_org_policy_violations_preview"
46+
]
47+
},
48+
"ListOrgPolicyViolations": {
49+
"methods": [
50+
"list_org_policy_violations"
51+
]
52+
},
53+
"ListOrgPolicyViolationsPreviews": {
54+
"methods": [
55+
"list_org_policy_violations_previews"
56+
]
57+
}
58+
}
59+
},
60+
"rest": {
61+
"libraryClient": "OrgPolicyViolationsPreviewServiceClient",
62+
"rpcs": {
63+
"CreateOrgPolicyViolationsPreview": {
64+
"methods": [
65+
"create_org_policy_violations_preview"
66+
]
67+
},
68+
"GetOrgPolicyViolationsPreview": {
69+
"methods": [
70+
"get_org_policy_violations_preview"
71+
]
72+
},
73+
"ListOrgPolicyViolations": {
74+
"methods": [
75+
"list_org_policy_violations"
76+
]
77+
},
78+
"ListOrgPolicyViolationsPreviews": {
79+
"methods": [
80+
"list_org_policy_violations_previews"
81+
]
82+
}
83+
}
84+
}
85+
}
86+
},
887
"Simulator": {
988
"clients": {
1089
"grpc": {

packages/google-cloud-policysimulator/google/cloud/policysimulator_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.1.14" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
from .async_client import OrgPolicyViolationsPreviewServiceAsyncClient
17+
from .client import OrgPolicyViolationsPreviewServiceClient
18+
19+
__all__ = (
20+
"OrgPolicyViolationsPreviewServiceClient",
21+
"OrgPolicyViolationsPreviewServiceAsyncClient",
22+
)

0 commit comments

Comments
 (0)