Debian Codegraph @

docs/dyn/orgpolicy_v2.organizations.customConstraints.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="orgpolicy_v2.html">Organization Policy API</a> . <a href="orgpolicy_v2.organizations.html">organizations</a> . <a href="orgpolicy_v2.organizations.customConstraints.html">customConstraints</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79 <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 custom constraint. 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 custom or managed constraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the custom or managed constraint 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 custom constraints 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>
95 <p class="toc_element">
96 <code><a href="#patch">patch(name, body=None, x__xgafv=None)</a></code></p>
97 <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>
98 <h3>Method Details</h3>
99 <div class="method">
100 <code class="details" id="close">close()</code>
101 <pre>Close httplib2 connections.</pre>
102 </div>
103
104 <div class="method">
105 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
106 <pre>Creates a custom constraint. 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 apply 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;, # A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches(&quot;(production|test)_(.+_)?[\d]+&quot;)` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.
116 &quot;description&quot;: &quot;A String&quot;, # Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
117 &quot;displayName&quot;: &quot;A String&quot;, # One line display name for the UI. The max length of the display_name is 200 characters.
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. The name must be of the form: * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 71 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/custom.` is not counted.
122 &quot;resourceTypes&quot;: [ # Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
123 &quot;A String&quot;,
124 ],
125 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.
126 }
127
128 x__xgafv: string, V1 error format.
129 Allowed values
130 1 - v1 error format
131 2 - v2 error format
132
133 Returns:
134 An object of the form:
135
136 { # 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 apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.
137 &quot;actionType&quot;: &quot;A String&quot;, # Allow or deny type.
138 &quot;condition&quot;: &quot;A String&quot;, # A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches(&quot;(production|test)_(.+_)?[\d]+&quot;)` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.
139 &quot;description&quot;: &quot;A String&quot;, # Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
140 &quot;displayName&quot;: &quot;A String&quot;, # One line display name for the UI. The max length of the display_name is 200 characters.
141 &quot;methodTypes&quot;: [ # All the operations being applied for this constraint.
142 &quot;A String&quot;,
143 ],
144 &quot;name&quot;: &quot;A String&quot;, # Immutable. Name of the constraint. This is unique within the organization. The name must be of the form: * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 71 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/custom.` is not counted.
145 &quot;resourceTypes&quot;: [ # Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
146 &quot;A String&quot;,
147 ],
148 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.
149 }</pre>
150 </div>
151
152 <div class="method">
153 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
154 <pre>Deletes a custom constraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist.
155
156 Args:
157 name: string, Required. Name of the custom constraint to delete. See the custom constraint entry for naming rules. (required)
158 x__xgafv: string, V1 error format.
159 Allowed values
160 1 - v1 error format
161 2 - v2 error format
162
163 Returns:
164 An object of the form:
165
166 { # 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); }
167 }</pre>
168 </div>
169
170 <div class="method">
171 <code class="details" id="get">get(name, x__xgafv=None)</code>
172 <pre>Gets a custom or managed constraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the custom or managed constraint does not exist.
173
174 Args:
175 name: string, Required. Resource name of the custom or managed constraint. See the custom constraint entry for naming requirements. (required)
176 x__xgafv: string, V1 error format.
177 Allowed values
178 1 - v1 error format
179 2 - v2 error format
180
181 Returns:
182 An object of the form:
183
184 { # 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 apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.
185 &quot;actionType&quot;: &quot;A String&quot;, # Allow or deny type.
186 &quot;condition&quot;: &quot;A String&quot;, # A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches(&quot;(production|test)_(.+_)?[\d]+&quot;)` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.
187 &quot;description&quot;: &quot;A String&quot;, # Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
188 &quot;displayName&quot;: &quot;A String&quot;, # One line display name for the UI. The max length of the display_name is 200 characters.
189 &quot;methodTypes&quot;: [ # All the operations being applied for this constraint.
190 &quot;A String&quot;,
191 ],
192 &quot;name&quot;: &quot;A String&quot;, # Immutable. Name of the constraint. This is unique within the organization. The name must be of the form: * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 71 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/custom.` is not counted.
193 &quot;resourceTypes&quot;: [ # Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
194 &quot;A String&quot;,
195 ],
196 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.
197 }</pre>
198 </div>
199
200 <div class="method">
201 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
202 <pre>Retrieves all of the custom constraints that exist on a particular organization resource.
203
204 Args:
205 parent: string, Required. The target Google 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)
206 pageSize: integer, Size of the pages to be returned. This is not used, but the server may at any point start using this field to limit page size.
207 pageToken: string, Page token used to retrieve the next page. This is not used, but the server may at any point start using this field.
208 x__xgafv: string, V1 error format.
209 Allowed values
210 1 - v1 error format
211 2 - v2 error format
212
213 Returns:
214 An object of the form:
215
216 { # The response returned from the ListCustomConstraints method. It will be empty if no custom or managed constraints are set on the organization resource.
217 &quot;customConstraints&quot;: [ # All custom and managed constraints that exist on the organization resource. It will be empty if no custom constraints are set.
218 { # 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 apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.
219 &quot;actionType&quot;: &quot;A String&quot;, # Allow or deny type.
220 &quot;condition&quot;: &quot;A String&quot;, # A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches(&quot;(production|test)_(.+_)?[\d]+&quot;)` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.
221 &quot;description&quot;: &quot;A String&quot;, # Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
222 &quot;displayName&quot;: &quot;A String&quot;, # One line display name for the UI. The max length of the display_name is 200 characters.
223 &quot;methodTypes&quot;: [ # All the operations being applied for this constraint.
224 &quot;A String&quot;,
225 ],
226 &quot;name&quot;: &quot;A String&quot;, # Immutable. Name of the constraint. This is unique within the organization. The name must be of the form: * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 71 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/custom.` is not counted.
227 &quot;resourceTypes&quot;: [ # Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
228 &quot;A String&quot;,
229 ],
230 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.
231 },
232 ],
233 &quot;nextPageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is not used, but the server may at any point start supplying a valid token.
234 }</pre>
235 </div>
236
237 <div class="method">
238 <code class="details" id="list_next">list_next()</code>
239 <pre>Retrieves the next page of results.
240
241 Args:
242 previous_request: The request for the previous page. (required)
243 previous_response: The response from the request for the previous page. (required)
244
245 Returns:
246 A request object that you can call &#x27;execute()&#x27; on to request the next
247 page. Returns None if there are no more items in the collection.
248 </pre>
249 </div>
250
251 <div class="method">
252 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
253 <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.
254
255 Args:
256 name: string, Immutable. Name of the constraint. This is unique within the organization. The name must be of the form: * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 71 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/custom.` is not counted. (required)
257 body: object, The request body.
258 The object takes the form of:
259
260 { # 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 apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.
261 &quot;actionType&quot;: &quot;A String&quot;, # Allow or deny type.
262 &quot;condition&quot;: &quot;A String&quot;, # A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches(&quot;(production|test)_(.+_)?[\d]+&quot;)` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.
263 &quot;description&quot;: &quot;A String&quot;, # Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
264 &quot;displayName&quot;: &quot;A String&quot;, # One line display name for the UI. The max length of the display_name is 200 characters.
265 &quot;methodTypes&quot;: [ # All the operations being applied for this constraint.
266 &quot;A String&quot;,
267 ],
268 &quot;name&quot;: &quot;A String&quot;, # Immutable. Name of the constraint. This is unique within the organization. The name must be of the form: * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 71 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/custom.` is not counted.
269 &quot;resourceTypes&quot;: [ # Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
270 &quot;A String&quot;,
271 ],
272 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.
273 }
274
275 x__xgafv: string, V1 error format.
276 Allowed values
277 1 - v1 error format
278 2 - v2 error format
279
280 Returns:
281 An object of the form:
282
283 { # 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 apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.
284 &quot;actionType&quot;: &quot;A String&quot;, # Allow or deny type.
285 &quot;condition&quot;: &quot;A String&quot;, # A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches(&quot;(production|test)_(.+_)?[\d]+&quot;)` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.
286 &quot;description&quot;: &quot;A String&quot;, # Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
287 &quot;displayName&quot;: &quot;A String&quot;, # One line display name for the UI. The max length of the display_name is 200 characters.
288 &quot;methodTypes&quot;: [ # All the operations being applied for this constraint.
289 &quot;A String&quot;,
290 ],
291 &quot;name&quot;: &quot;A String&quot;, # Immutable. Name of the constraint. This is unique within the organization. The name must be of the form: * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 71 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/custom.` is not counted.
292 &quot;resourceTypes&quot;: [ # Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
293 &quot;A String&quot;,
294 ],
295 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.
296 }</pre>
297 </div>
298
299 </body></html>