Skip to content

Commit c318440

Browse files
feat(orgpolicy): update the api
#### orgpolicy:v2 The following keys were added: - resources.organizations.resources.customConstraints.methods.create (Total Keys: 12) - resources.organizations.resources.customConstraints.methods.delete (Total Keys: 11) - resources.organizations.resources.customConstraints.methods.get (Total Keys: 11) - resources.organizations.resources.customConstraints.methods.list (Total Keys: 16) - resources.organizations.resources.customConstraints.methods.patch (Total Keys: 12) - schemas.GoogleCloudOrgpolicyV2CustomConstraint (Total Keys: 10) - schemas.GoogleCloudOrgpolicyV2ListCustomConstraintsResponse (Total Keys: 5)
1 parent 425521b commit c318440

File tree

3 files changed

+391
-1
lines changed

3 files changed

+391
-1
lines changed

docs/dyn/orgpolicy_v2.organizations.customConstraints.html

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,21 @@ <h2>Instance Methods</h2>
7777
<p class="toc_element">
7878
<code><a href="#close">close()</a></code></p>
7979
<p class="firstline">Close httplib2 connections.</p>
80+
<p class="toc_element">
81+
<code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
82+
<p class="firstline">Creates a CustomConstraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the organization does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the constraint already exists on the given organization.</p>
83+
<p class="toc_element">
84+
<code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
85+
<p class="firstline">Deletes a Custom Constraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist.</p>
86+
<p class="toc_element">
87+
<code><a href="#get">get(name, x__xgafv=None)</a></code></p>
88+
<p class="firstline">Gets a CustomConstraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the CustomConstraint does not exist.</p>
89+
<p class="toc_element">
90+
<code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
91+
<p class="firstline">Retrieves all of the `CustomConstraints` that exist on a particular organization resource.</p>
92+
<p class="toc_element">
93+
<code><a href="#list_next">list_next()</a></code></p>
94+
<p class="firstline">Retrieves the next page of results.</p>
8095
<p class="toc_element">
8196
<code><a href="#patch">patch(name, body=None, x__xgafv=None)</a></code></p>
8297
<p class="firstline">Updates a Custom Constraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Note: the supplied policy will perform a full overwrite of all fields.</p>
@@ -86,6 +101,149 @@ <h3>Method Details</h3>
86101
<pre>Close httplib2 connections.</pre>
87102
</div>
88103

104+
<div class="method">
105+
<code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
106+
<pre>Creates a CustomConstraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the organization does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the constraint already exists on the given organization.
107+
108+
Args:
109+
parent: string, Required. Must be in the following form: * `organizations/{organization_id}` (required)
110+
body: object, The request body.
111+
The object takes the form of:
112+
113+
{ # A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can applied policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.
114+
&quot;actionType&quot;: &quot;A String&quot;, # Allow or deny type.
115+
&quot;condition&quot;: &quot;A String&quot;, # Org policy condition/expression. For example: `resource.instanceName.matches(&quot;[production|test]_.*_(\d)+&quot;)&#x27;` or, `resource.management.auto_upgrade == true`
116+
&quot;description&quot;: &quot;A String&quot;, # Detailed information about this custom policy constraint.
117+
&quot;displayName&quot;: &quot;A String&quot;, # One line display name for the UI.
118+
&quot;methodTypes&quot;: [ # All the operations being applied for this constraint.
119+
&quot;A String&quot;,
120+
],
121+
&quot;name&quot;: &quot;A String&quot;, # Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example : &quot;organizations/123/customConstraints/custom.createOnlyE2TypeVms&quot;
122+
&quot;resourceTypes&quot;: [ # Immutable. The Resource Instance type on which this policy applies to. Format will be of the form : &quot;/&quot; Example: * `compute.googleapis.com/Instance`.
123+
&quot;A String&quot;,
124+
],
125+
}
126+
127+
x__xgafv: string, V1 error format.
128+
Allowed values
129+
1 - v1 error format
130+
2 - v2 error format
131+
132+
Returns:
133+
An object of the form:
134+
135+
{ # A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can applied policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.
136+
&quot;actionType&quot;: &quot;A String&quot;, # Allow or deny type.
137+
&quot;condition&quot;: &quot;A String&quot;, # Org policy condition/expression. For example: `resource.instanceName.matches(&quot;[production|test]_.*_(\d)+&quot;)&#x27;` or, `resource.management.auto_upgrade == true`
138+
&quot;description&quot;: &quot;A String&quot;, # Detailed information about this custom policy constraint.
139+
&quot;displayName&quot;: &quot;A String&quot;, # One line display name for the UI.
140+
&quot;methodTypes&quot;: [ # All the operations being applied for this constraint.
141+
&quot;A String&quot;,
142+
],
143+
&quot;name&quot;: &quot;A String&quot;, # Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example : &quot;organizations/123/customConstraints/custom.createOnlyE2TypeVms&quot;
144+
&quot;resourceTypes&quot;: [ # Immutable. The Resource Instance type on which this policy applies to. Format will be of the form : &quot;/&quot; Example: * `compute.googleapis.com/Instance`.
145+
&quot;A String&quot;,
146+
],
147+
}</pre>
148+
</div>
149+
150+
<div class="method">
151+
<code class="details" id="delete">delete(name, x__xgafv=None)</code>
152+
<pre>Deletes a Custom Constraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist.
153+
154+
Args:
155+
name: string, Required. Name of the custom constraint to delete. See `CustomConstraint` for naming rules. (required)
156+
x__xgafv: string, V1 error format.
157+
Allowed values
158+
1 - v1 error format
159+
2 - v2 error format
160+
161+
Returns:
162+
An object of the form:
163+
164+
{ # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
165+
}</pre>
166+
</div>
167+
168+
<div class="method">
169+
<code class="details" id="get">get(name, x__xgafv=None)</code>
170+
<pre>Gets a CustomConstraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the CustomConstraint does not exist.
171+
172+
Args:
173+
name: string, Required. Resource name of the custom constraint. See `CustomConstraint` for naming requirements. (required)
174+
x__xgafv: string, V1 error format.
175+
Allowed values
176+
1 - v1 error format
177+
2 - v2 error format
178+
179+
Returns:
180+
An object of the form:
181+
182+
{ # A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can applied policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.
183+
&quot;actionType&quot;: &quot;A String&quot;, # Allow or deny type.
184+
&quot;condition&quot;: &quot;A String&quot;, # Org policy condition/expression. For example: `resource.instanceName.matches(&quot;[production|test]_.*_(\d)+&quot;)&#x27;` or, `resource.management.auto_upgrade == true`
185+
&quot;description&quot;: &quot;A String&quot;, # Detailed information about this custom policy constraint.
186+
&quot;displayName&quot;: &quot;A String&quot;, # One line display name for the UI.
187+
&quot;methodTypes&quot;: [ # All the operations being applied for this constraint.
188+
&quot;A String&quot;,
189+
],
190+
&quot;name&quot;: &quot;A String&quot;, # Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example : &quot;organizations/123/customConstraints/custom.createOnlyE2TypeVms&quot;
191+
&quot;resourceTypes&quot;: [ # Immutable. The Resource Instance type on which this policy applies to. Format will be of the form : &quot;/&quot; Example: * `compute.googleapis.com/Instance`.
192+
&quot;A String&quot;,
193+
],
194+
}</pre>
195+
</div>
196+
197+
<div class="method">
198+
<code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
199+
<pre>Retrieves all of the `CustomConstraints` that exist on a particular organization resource.
200+
201+
Args:
202+
parent: string, Required. The target Cloud resource that parents the set of custom constraints that will be returned from this call. Must be in one of the following forms: * `organizations/{organization_id}` (required)
203+
pageSize: integer, Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.
204+
pageToken: string, Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.
205+
x__xgafv: string, V1 error format.
206+
Allowed values
207+
1 - v1 error format
208+
2 - v2 error format
209+
210+
Returns:
211+
An object of the form:
212+
213+
{ # The response returned from the ListCustomConstraints method. It will be empty if no `CustomConstraints` are set on the organization resource.
214+
&quot;customConstraints&quot;: [ # All `CustomConstraints` that exist on the organization resource. It will be empty if no `CustomConstraints` are set.
215+
{ # A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can applied policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.
216+
&quot;actionType&quot;: &quot;A String&quot;, # Allow or deny type.
217+
&quot;condition&quot;: &quot;A String&quot;, # Org policy condition/expression. For example: `resource.instanceName.matches(&quot;[production|test]_.*_(\d)+&quot;)&#x27;` or, `resource.management.auto_upgrade == true`
218+
&quot;description&quot;: &quot;A String&quot;, # Detailed information about this custom policy constraint.
219+
&quot;displayName&quot;: &quot;A String&quot;, # One line display name for the UI.
220+
&quot;methodTypes&quot;: [ # All the operations being applied for this constraint.
221+
&quot;A String&quot;,
222+
],
223+
&quot;name&quot;: &quot;A String&quot;, # Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example : &quot;organizations/123/customConstraints/custom.createOnlyE2TypeVms&quot;
224+
&quot;resourceTypes&quot;: [ # Immutable. The Resource Instance type on which this policy applies to. Format will be of the form : &quot;/&quot; Example: * `compute.googleapis.com/Instance`.
225+
&quot;A String&quot;,
226+
],
227+
},
228+
],
229+
&quot;nextPageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently not used, but the server may at any point start supplying a valid token.
230+
}</pre>
231+
</div>
232+
233+
<div class="method">
234+
<code class="details" id="list_next">list_next()</code>
235+
<pre>Retrieves the next page of results.
236+
237+
Args:
238+
previous_request: The request for the previous page. (required)
239+
previous_response: The response from the request for the previous page. (required)
240+
241+
Returns:
242+
A request object that you can call &#x27;execute()&#x27; on to request the next
243+
page. Returns None if there are no more items in the collection.
244+
</pre>
245+
</div>
246+
89247
<div class="method">
90248
<code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
91249
<pre>Updates a Custom Constraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Note: the supplied policy will perform a full overwrite of all fields.

docs/dyn/orgpolicy_v2.organizations.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ <h2>Instance Methods</h2>
7979
</p>
8080
<p class="firstline">Returns the constraints Resource.</p>
8181

82+
<p class="toc_element">
83+
<code><a href="orgpolicy_v2.organizations.customConstraints.html">customConstraints()</a></code>
84+
</p>
85+
<p class="firstline">Returns the customConstraints Resource.</p>
86+
8287
<p class="toc_element">
8388
<code><a href="orgpolicy_v2.organizations.policies.html">policies()</a></code>
8489
</p>

0 commit comments

Comments
 (0)