Skip to content
This repository was archived by the owner on Mar 15, 2025. It is now read-only.

Commit 4419e5f

Browse files
feat: Add custom constraints CRUD APIs, proper etag support in Org Policy Update/Delete API (#257)
* feat: Add custom constraints CRUD APIs, proper etag support in Org Policy Update/Delete API docs: updated comments PiperOrigin-RevId: 591301652 Source-Link: googleapis/googleapis@db5ce67 Source-Link: googleapis/googleapis-gen@3c13326 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2MxMzMyNjZlZGFhZjgxYjE0YzJkZDhmZDQ3MDUxMjdkY2JjZTA2YiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 3f7e628 commit 4419e5f

26 files changed

+8716
-1283
lines changed

google/cloud/orgpolicy/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,47 @@
2424
)
2525

2626
from google.cloud.orgpolicy_v2.types.constraint import Constraint
27+
from google.cloud.orgpolicy_v2.types.constraint import CustomConstraint
2728
from google.cloud.orgpolicy_v2.types.orgpolicy import AlternatePolicySpec
29+
from google.cloud.orgpolicy_v2.types.orgpolicy import CreateCustomConstraintRequest
2830
from google.cloud.orgpolicy_v2.types.orgpolicy import CreatePolicyRequest
31+
from google.cloud.orgpolicy_v2.types.orgpolicy import DeleteCustomConstraintRequest
2932
from google.cloud.orgpolicy_v2.types.orgpolicy import DeletePolicyRequest
33+
from google.cloud.orgpolicy_v2.types.orgpolicy import GetCustomConstraintRequest
3034
from google.cloud.orgpolicy_v2.types.orgpolicy import GetEffectivePolicyRequest
3135
from google.cloud.orgpolicy_v2.types.orgpolicy import GetPolicyRequest
3236
from google.cloud.orgpolicy_v2.types.orgpolicy import ListConstraintsRequest
3337
from google.cloud.orgpolicy_v2.types.orgpolicy import ListConstraintsResponse
38+
from google.cloud.orgpolicy_v2.types.orgpolicy import ListCustomConstraintsRequest
39+
from google.cloud.orgpolicy_v2.types.orgpolicy import ListCustomConstraintsResponse
3440
from google.cloud.orgpolicy_v2.types.orgpolicy import ListPoliciesRequest
3541
from google.cloud.orgpolicy_v2.types.orgpolicy import ListPoliciesResponse
3642
from google.cloud.orgpolicy_v2.types.orgpolicy import Policy
3743
from google.cloud.orgpolicy_v2.types.orgpolicy import PolicySpec
44+
from google.cloud.orgpolicy_v2.types.orgpolicy import UpdateCustomConstraintRequest
3845
from google.cloud.orgpolicy_v2.types.orgpolicy import UpdatePolicyRequest
3946

4047
__all__ = (
4148
"OrgPolicyClient",
4249
"OrgPolicyAsyncClient",
4350
"Constraint",
51+
"CustomConstraint",
4452
"AlternatePolicySpec",
53+
"CreateCustomConstraintRequest",
4554
"CreatePolicyRequest",
55+
"DeleteCustomConstraintRequest",
4656
"DeletePolicyRequest",
57+
"GetCustomConstraintRequest",
4758
"GetEffectivePolicyRequest",
4859
"GetPolicyRequest",
4960
"ListConstraintsRequest",
5061
"ListConstraintsResponse",
62+
"ListCustomConstraintsRequest",
63+
"ListCustomConstraintsResponse",
5164
"ListPoliciesRequest",
5265
"ListPoliciesResponse",
5366
"Policy",
5467
"PolicySpec",
68+
"UpdateCustomConstraintRequest",
5569
"UpdatePolicyRequest",
5670
)

google/cloud/orgpolicy_v2/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,33 +22,47 @@
2222
from .services.org_policy import OrgPolicyAsyncClient
2323

2424
from .types.constraint import Constraint
25+
from .types.constraint import CustomConstraint
2526
from .types.orgpolicy import AlternatePolicySpec
27+
from .types.orgpolicy import CreateCustomConstraintRequest
2628
from .types.orgpolicy import CreatePolicyRequest
29+
from .types.orgpolicy import DeleteCustomConstraintRequest
2730
from .types.orgpolicy import DeletePolicyRequest
31+
from .types.orgpolicy import GetCustomConstraintRequest
2832
from .types.orgpolicy import GetEffectivePolicyRequest
2933
from .types.orgpolicy import GetPolicyRequest
3034
from .types.orgpolicy import ListConstraintsRequest
3135
from .types.orgpolicy import ListConstraintsResponse
36+
from .types.orgpolicy import ListCustomConstraintsRequest
37+
from .types.orgpolicy import ListCustomConstraintsResponse
3238
from .types.orgpolicy import ListPoliciesRequest
3339
from .types.orgpolicy import ListPoliciesResponse
3440
from .types.orgpolicy import Policy
3541
from .types.orgpolicy import PolicySpec
42+
from .types.orgpolicy import UpdateCustomConstraintRequest
3643
from .types.orgpolicy import UpdatePolicyRequest
3744

3845
__all__ = (
3946
"OrgPolicyAsyncClient",
4047
"AlternatePolicySpec",
4148
"Constraint",
49+
"CreateCustomConstraintRequest",
4250
"CreatePolicyRequest",
51+
"CustomConstraint",
52+
"DeleteCustomConstraintRequest",
4353
"DeletePolicyRequest",
54+
"GetCustomConstraintRequest",
4455
"GetEffectivePolicyRequest",
4556
"GetPolicyRequest",
4657
"ListConstraintsRequest",
4758
"ListConstraintsResponse",
59+
"ListCustomConstraintsRequest",
60+
"ListCustomConstraintsResponse",
4861
"ListPoliciesRequest",
4962
"ListPoliciesResponse",
5063
"OrgPolicyClient",
5164
"Policy",
5265
"PolicySpec",
66+
"UpdateCustomConstraintRequest",
5367
"UpdatePolicyRequest",
5468
)

google/cloud/orgpolicy_v2/gapic_metadata.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,31 @@
1010
"grpc": {
1111
"libraryClient": "OrgPolicyClient",
1212
"rpcs": {
13+
"CreateCustomConstraint": {
14+
"methods": [
15+
"create_custom_constraint"
16+
]
17+
},
1318
"CreatePolicy": {
1419
"methods": [
1520
"create_policy"
1621
]
1722
},
23+
"DeleteCustomConstraint": {
24+
"methods": [
25+
"delete_custom_constraint"
26+
]
27+
},
1828
"DeletePolicy": {
1929
"methods": [
2030
"delete_policy"
2131
]
2232
},
33+
"GetCustomConstraint": {
34+
"methods": [
35+
"get_custom_constraint"
36+
]
37+
},
2338
"GetEffectivePolicy": {
2439
"methods": [
2540
"get_effective_policy"
@@ -35,11 +50,21 @@
3550
"list_constraints"
3651
]
3752
},
53+
"ListCustomConstraints": {
54+
"methods": [
55+
"list_custom_constraints"
56+
]
57+
},
3858
"ListPolicies": {
3959
"methods": [
4060
"list_policies"
4161
]
4262
},
63+
"UpdateCustomConstraint": {
64+
"methods": [
65+
"update_custom_constraint"
66+
]
67+
},
4368
"UpdatePolicy": {
4469
"methods": [
4570
"update_policy"
@@ -50,16 +75,31 @@
5075
"grpc-async": {
5176
"libraryClient": "OrgPolicyAsyncClient",
5277
"rpcs": {
78+
"CreateCustomConstraint": {
79+
"methods": [
80+
"create_custom_constraint"
81+
]
82+
},
5383
"CreatePolicy": {
5484
"methods": [
5585
"create_policy"
5686
]
5787
},
88+
"DeleteCustomConstraint": {
89+
"methods": [
90+
"delete_custom_constraint"
91+
]
92+
},
5893
"DeletePolicy": {
5994
"methods": [
6095
"delete_policy"
6196
]
6297
},
98+
"GetCustomConstraint": {
99+
"methods": [
100+
"get_custom_constraint"
101+
]
102+
},
63103
"GetEffectivePolicy": {
64104
"methods": [
65105
"get_effective_policy"
@@ -75,11 +115,21 @@
75115
"list_constraints"
76116
]
77117
},
118+
"ListCustomConstraints": {
119+
"methods": [
120+
"list_custom_constraints"
121+
]
122+
},
78123
"ListPolicies": {
79124
"methods": [
80125
"list_policies"
81126
]
82127
},
128+
"UpdateCustomConstraint": {
129+
"methods": [
130+
"update_custom_constraint"
131+
]
132+
},
83133
"UpdatePolicy": {
84134
"methods": [
85135
"update_policy"
@@ -90,16 +140,31 @@
90140
"rest": {
91141
"libraryClient": "OrgPolicyClient",
92142
"rpcs": {
143+
"CreateCustomConstraint": {
144+
"methods": [
145+
"create_custom_constraint"
146+
]
147+
},
93148
"CreatePolicy": {
94149
"methods": [
95150
"create_policy"
96151
]
97152
},
153+
"DeleteCustomConstraint": {
154+
"methods": [
155+
"delete_custom_constraint"
156+
]
157+
},
98158
"DeletePolicy": {
99159
"methods": [
100160
"delete_policy"
101161
]
102162
},
163+
"GetCustomConstraint": {
164+
"methods": [
165+
"get_custom_constraint"
166+
]
167+
},
103168
"GetEffectivePolicy": {
104169
"methods": [
105170
"get_effective_policy"
@@ -115,11 +180,21 @@
115180
"list_constraints"
116181
]
117182
},
183+
"ListCustomConstraints": {
184+
"methods": [
185+
"list_custom_constraints"
186+
]
187+
},
118188
"ListPolicies": {
119189
"methods": [
120190
"list_policies"
121191
]
122192
},
193+
"UpdateCustomConstraint": {
194+
"methods": [
195+
"update_custom_constraint"
196+
]
197+
},
123198
"UpdatePolicy": {
124199
"methods": [
125200
"update_policy"

0 commit comments

Comments
 (0)