blob: 0a10db2449026bb4cc0ea00b11bc10e5a4817b6b [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -07001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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="bigqueryreservation_v1beta1.html">BigQuery Reservation API</a> . <a href="bigqueryreservation_v1beta1.projects.html">projects</a> . <a href="bigqueryreservation_v1beta1.projects.locations.html">locations</a> . <a href="bigqueryreservation_v1beta1.projects.locations.capacityCommitments.html">capacityCommitments</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(parent, body=None, enforceSingleAdminProjectPerOrg=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates a new capacity commitment resource.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a capacity commitment. Attempting to delete capacity commitment</p>
83<p class="toc_element">
84 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
85<p class="firstline">Returns information about the capacity commitment.</p>
86<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070087 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Bu Sun Kim65020912020-05-20 12:08:20 -070088<p class="firstline">Lists all the capacity commitments for the admin project.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93 <code><a href="#merge">merge(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070094<p class="firstline">Merges capacity commitments of the same plan into a single commitment.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070095<p class="toc_element">
96 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
97<p class="firstline">Updates an existing capacity commitment.</p>
98<p class="toc_element">
99 <code><a href="#split">split(name, body=None, x__xgafv=None)</a></code></p>
100<p class="firstline">Splits capacity commitment to two commitments of the same plan and</p>
101<h3>Method Details</h3>
102<div class="method">
103 <code class="details" id="create">create(parent, body=None, enforceSingleAdminProjectPerOrg=None, x__xgafv=None)</code>
104 <pre>Creates a new capacity commitment resource.
105
106Args:
107 parent: string, Required. Resource name of the parent reservation. E.g.,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700108 `projects/myproject/locations/US` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700109 body: object, The request body.
110 The object takes the form of:
111
112{ # Capacity commitment is a way to purchase compute capacity for BigQuery jobs
Bu Sun Kim65020912020-05-20 12:08:20 -0700113 # (in the form of slots) with some committed period of usage. Annual
114 # commitments renew by default. Commitments can be removed after their
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700115 # commitment end time passes.
116 #
117 # In order to remove annual commitment, its plan needs to be changed
118 # to monthly or flex first.
119 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700120 # A capacity commitment resource exists as a child resource of the admin
121 # project.
Bu Sun Kim65020912020-05-20 12:08:20 -0700122 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700123 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
Bu Sun Kim65020912020-05-20 12:08:20 -0700124 &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. For FAILED commitment plan, provides the reason of failure.
125 # different programming environments, including REST APIs and RPC APIs. It is
126 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
127 # three pieces of data: error code, error message, and error details.
128 #
129 # You can find out more about this error model and how to work with it in the
130 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -0700131 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
132 # message types for APIs to use.
133 {
134 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
135 },
136 ],
137 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700138 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
139 # user-facing error message should be localized and sent in the
140 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700141 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700142 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
143 # ACTIVE capacity commitments.
144 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
145 # `projects/myproject/locations/US/capacityCommitments/123`
146 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
147 # passes. Once the plan is changed, committed period is extended according to
148 # commitment plan. Only applicable for ANNUAL commitments.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700149 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
150 # capacity commitments.
151 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700152 }
153
154 enforceSingleAdminProjectPerOrg: boolean, If true, fail the request if another project in the organization has a
155capacity commitment.
156 x__xgafv: string, V1 error format.
157 Allowed values
158 1 - v1 error format
159 2 - v2 error format
160
161Returns:
162 An object of the form:
163
164 { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs
165 # (in the form of slots) with some committed period of usage. Annual
166 # commitments renew by default. Commitments can be removed after their
167 # commitment end time passes.
168 #
169 # In order to remove annual commitment, its plan needs to be changed
170 # to monthly or flex first.
171 #
172 # A capacity commitment resource exists as a child resource of the admin
173 # project.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700174 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700175 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700176 &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. For FAILED commitment plan, provides the reason of failure.
177 # different programming environments, including REST APIs and RPC APIs. It is
178 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
179 # three pieces of data: error code, error message, and error details.
180 #
181 # You can find out more about this error model and how to work with it in the
182 # [API Design Guide](https://cloud.google.com/apis/design/errors).
183 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
184 # message types for APIs to use.
185 {
186 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
187 },
188 ],
189 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
190 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
191 # user-facing error message should be localized and sent in the
192 # google.rpc.Status.details field, or localized by the client.
193 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700194 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
195 # ACTIVE capacity commitments.
196 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
197 # `projects/myproject/locations/US/capacityCommitments/123`
198 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
199 # passes. Once the plan is changed, committed period is extended according to
200 # commitment plan. Only applicable for ANNUAL commitments.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700201 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
202 # capacity commitments.
203 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700204 }</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700205</div>
206
207<div class="method">
208 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
209 <pre>Deletes a capacity commitment. Attempting to delete capacity commitment
210before its commitment_end_time will fail with the error code
211`google.rpc.Code.FAILED_PRECONDITION`.
212
213Args:
214 name: string, Required. Resource name of the capacity commitment to delete. E.g.,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700215 `projects/myproject/locations/US/capacityCommitments/123` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700216 x__xgafv: string, V1 error format.
217 Allowed values
218 1 - v1 error format
219 2 - v2 error format
220
221Returns:
222 An object of the form:
223
224 { # A generic empty message that you can re-use to avoid defining duplicated
225 # empty messages in your APIs. A typical example is to use it as the request
226 # or the response type of an API method. For instance:
227 #
228 # service Foo {
229 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
230 # }
231 #
232 # The JSON representation for `Empty` is empty JSON object `{}`.
233 }</pre>
234</div>
235
236<div class="method">
237 <code class="details" id="get">get(name, x__xgafv=None)</code>
238 <pre>Returns information about the capacity commitment.
239
240Args:
241 name: string, Required. Resource name of the capacity commitment to retrieve. E.g.,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700242 `projects/myproject/locations/US/capacityCommitments/123` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700243 x__xgafv: string, V1 error format.
244 Allowed values
245 1 - v1 error format
246 2 - v2 error format
247
248Returns:
249 An object of the form:
250
251 { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700252 # (in the form of slots) with some committed period of usage. Annual
253 # commitments renew by default. Commitments can be removed after their
254 # commitment end time passes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700255 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700256 # In order to remove annual commitment, its plan needs to be changed
257 # to monthly or flex first.
258 #
259 # A capacity commitment resource exists as a child resource of the admin
260 # project.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700261 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700262 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700263 &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. For FAILED commitment plan, provides the reason of failure.
264 # different programming environments, including REST APIs and RPC APIs. It is
265 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
266 # three pieces of data: error code, error message, and error details.
267 #
268 # You can find out more about this error model and how to work with it in the
269 # [API Design Guide](https://cloud.google.com/apis/design/errors).
270 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
271 # message types for APIs to use.
272 {
273 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
274 },
275 ],
276 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
277 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
278 # user-facing error message should be localized and sent in the
279 # google.rpc.Status.details field, or localized by the client.
280 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700281 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
282 # ACTIVE capacity commitments.
283 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
284 # `projects/myproject/locations/US/capacityCommitments/123`
285 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
286 # passes. Once the plan is changed, committed period is extended according to
287 # commitment plan. Only applicable for ANNUAL commitments.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700288 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
289 # capacity commitments.
290 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700291 }</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700292</div>
293
294<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700295 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700296 <pre>Lists all the capacity commitments for the admin project.
297
298Args:
299 parent: string, Required. Resource name of the parent reservation. E.g.,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700300 `projects/myproject/locations/US` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700301 pageSize: integer, The maximum number of items to return.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700302 pageToken: string, The next_page_token value returned from a previous List request, if any.
Bu Sun Kim65020912020-05-20 12:08:20 -0700303 x__xgafv: string, V1 error format.
304 Allowed values
305 1 - v1 error format
306 2 - v2 error format
307
308Returns:
309 An object of the form:
310
311 { # The response for ReservationService.ListCapacityCommitments.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700312 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results, or empty if there are no
313 # more results in the list.
Bu Sun Kim65020912020-05-20 12:08:20 -0700314 &quot;capacityCommitments&quot;: [ # List of capacity commitments visible to the user.
315 { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700316 # (in the form of slots) with some committed period of usage. Annual
317 # commitments renew by default. Commitments can be removed after their
318 # commitment end time passes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700319 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700320 # In order to remove annual commitment, its plan needs to be changed
321 # to monthly or flex first.
322 #
323 # A capacity commitment resource exists as a child resource of the admin
324 # project.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700325 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700326 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700327 &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. For FAILED commitment plan, provides the reason of failure.
328 # different programming environments, including REST APIs and RPC APIs. It is
329 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
330 # three pieces of data: error code, error message, and error details.
331 #
332 # You can find out more about this error model and how to work with it in the
333 # [API Design Guide](https://cloud.google.com/apis/design/errors).
334 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
335 # message types for APIs to use.
336 {
337 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
338 },
339 ],
340 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
341 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
342 # user-facing error message should be localized and sent in the
343 # google.rpc.Status.details field, or localized by the client.
344 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700345 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
346 # ACTIVE capacity commitments.
347 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
348 # `projects/myproject/locations/US/capacityCommitments/123`
349 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
350 # passes. Once the plan is changed, committed period is extended according to
351 # commitment plan. Only applicable for ANNUAL commitments.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700352 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
353 # capacity commitments.
354 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Bu Sun Kim65020912020-05-20 12:08:20 -0700355 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700356 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700357 }</pre>
358</div>
359
360<div class="method">
361 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
362 <pre>Retrieves the next page of results.
363
364Args:
365 previous_request: The request for the previous page. (required)
366 previous_response: The response from the request for the previous page. (required)
367
368Returns:
369 A request object that you can call &#x27;execute()&#x27; on to request the next
370 page. Returns None if there are no more items in the collection.
371 </pre>
372</div>
373
374<div class="method">
375 <code class="details" id="merge">merge(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700376 <pre>Merges capacity commitments of the same plan into a single commitment.
377
378The resulting capacity commitment has the greater commitment_end_time
379out of the to-be-merged capacity commitments.
380
381Attempting to merge capacity commitments of different plan will fail
382with the error code `google.rpc.Code.FAILED_PRECONDITION`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700383
384Args:
385 parent: string, Parent resource that identifies admin project and location e.g.,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700386 `projects/myproject/locations/us` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700387 body: object, The request body.
388 The object takes the form of:
389
390{ # The request for ReservationService.MergeCapacityCommitments.
391 &quot;capacityCommitmentIds&quot;: [ # Ids of capacity commitments to merge.
392 # These capacity commitments must exist under admin project and location
393 # specified in the parent.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700394 # ID is the last portion of capacity commitment name e.g., &#x27;abc&#x27; for
395 # projects/myproject/locations/US/capacityCommitments/abc
Bu Sun Kim65020912020-05-20 12:08:20 -0700396 &quot;A String&quot;,
397 ],
398 }
399
400 x__xgafv: string, V1 error format.
401 Allowed values
402 1 - v1 error format
403 2 - v2 error format
404
405Returns:
406 An object of the form:
407
408 { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700409 # (in the form of slots) with some committed period of usage. Annual
410 # commitments renew by default. Commitments can be removed after their
411 # commitment end time passes.
412 #
413 # In order to remove annual commitment, its plan needs to be changed
414 # to monthly or flex first.
415 #
416 # A capacity commitment resource exists as a child resource of the admin
417 # project.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700418 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700419 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700420 &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. For FAILED commitment plan, provides the reason of failure.
421 # different programming environments, including REST APIs and RPC APIs. It is
422 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
423 # three pieces of data: error code, error message, and error details.
424 #
425 # You can find out more about this error model and how to work with it in the
426 # [API Design Guide](https://cloud.google.com/apis/design/errors).
427 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
428 # message types for APIs to use.
429 {
430 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
431 },
432 ],
433 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
434 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
435 # user-facing error message should be localized and sent in the
436 # google.rpc.Status.details field, or localized by the client.
437 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700438 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
439 # ACTIVE capacity commitments.
440 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
441 # `projects/myproject/locations/US/capacityCommitments/123`
442 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
443 # passes. Once the plan is changed, committed period is extended according to
444 # commitment plan. Only applicable for ANNUAL commitments.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700445 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
446 # capacity commitments.
447 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700448 }</pre>
449</div>
450
451<div class="method">
452 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
453 <pre>Updates an existing capacity commitment.
454
455Only `plan` and `renewal_plan` fields can be updated.
456
457Plan can only be changed to a plan of a longer commitment period.
458Attempting to change to a plan with shorter commitment period will fail
459with the error code `google.rpc.Code.FAILED_PRECONDITION`.
460
461Args:
462 name: string, Output only. The resource name of the capacity commitment, e.g.,
463`projects/myproject/locations/US/capacityCommitments/123` (required)
464 body: object, The request body.
465 The object takes the form of:
466
467{ # Capacity commitment is a way to purchase compute capacity for BigQuery jobs
Bu Sun Kim65020912020-05-20 12:08:20 -0700468 # (in the form of slots) with some committed period of usage. Annual
469 # commitments renew by default. Commitments can be removed after their
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700470 # commitment end time passes.
471 #
472 # In order to remove annual commitment, its plan needs to be changed
473 # to monthly or flex first.
474 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700475 # A capacity commitment resource exists as a child resource of the admin
476 # project.
Bu Sun Kim65020912020-05-20 12:08:20 -0700477 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700478 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
Bu Sun Kim65020912020-05-20 12:08:20 -0700479 &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. For FAILED commitment plan, provides the reason of failure.
480 # different programming environments, including REST APIs and RPC APIs. It is
481 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
482 # three pieces of data: error code, error message, and error details.
483 #
484 # You can find out more about this error model and how to work with it in the
485 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -0700486 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
487 # message types for APIs to use.
488 {
489 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
490 },
491 ],
492 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700493 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
494 # user-facing error message should be localized and sent in the
495 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700496 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700497 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
498 # ACTIVE capacity commitments.
499 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
500 # `projects/myproject/locations/US/capacityCommitments/123`
501 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
502 # passes. Once the plan is changed, committed period is extended according to
503 # commitment plan. Only applicable for ANNUAL commitments.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700504 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
505 # capacity commitments.
506 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700507 }
Bu Sun Kim65020912020-05-20 12:08:20 -0700508
509 updateMask: string, Standard field mask for the set of fields to be updated.
510 x__xgafv: string, V1 error format.
511 Allowed values
512 1 - v1 error format
513 2 - v2 error format
514
515Returns:
516 An object of the form:
517
518 { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700519 # (in the form of slots) with some committed period of usage. Annual
520 # commitments renew by default. Commitments can be removed after their
521 # commitment end time passes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700522 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700523 # In order to remove annual commitment, its plan needs to be changed
524 # to monthly or flex first.
525 #
526 # A capacity commitment resource exists as a child resource of the admin
527 # project.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700528 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700529 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700530 &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. For FAILED commitment plan, provides the reason of failure.
531 # different programming environments, including REST APIs and RPC APIs. It is
532 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
533 # three pieces of data: error code, error message, and error details.
534 #
535 # You can find out more about this error model and how to work with it in the
536 # [API Design Guide](https://cloud.google.com/apis/design/errors).
537 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
538 # message types for APIs to use.
539 {
540 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
541 },
542 ],
543 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
544 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
545 # user-facing error message should be localized and sent in the
546 # google.rpc.Status.details field, or localized by the client.
547 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700548 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
549 # ACTIVE capacity commitments.
550 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
551 # `projects/myproject/locations/US/capacityCommitments/123`
552 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
553 # passes. Once the plan is changed, committed period is extended according to
554 # commitment plan. Only applicable for ANNUAL commitments.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700555 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
556 # capacity commitments.
557 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700558 }</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700559</div>
560
561<div class="method">
562 <code class="details" id="split">split(name, body=None, x__xgafv=None)</code>
563 <pre>Splits capacity commitment to two commitments of the same plan and
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700564`commitment_end_time`.
565
566A common use case is to enable downgrading commitments.
567
568For example, in order to downgrade from 10000 slots to 8000, you might
569split a 10000 capacity commitment into commitments of 2000 and 8000. Then,
570you would change the plan of the first one to `FLEX` and then delete it.
Bu Sun Kim65020912020-05-20 12:08:20 -0700571
572Args:
573 name: string, Required. The resource name e.g.,:
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700574 `projects/myproject/locations/US/capacityCommitments/123` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700575 body: object, The request body.
576 The object takes the form of:
577
578{ # The request for ReservationService.SplitCapacityCommitment.
579 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in the capacity commitment after the split.
580 }
581
582 x__xgafv: string, V1 error format.
583 Allowed values
584 1 - v1 error format
585 2 - v2 error format
586
587Returns:
588 An object of the form:
589
590 { # The response for ReservationService.SplitCapacityCommitment.
591 &quot;second&quot;: { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs # Second capacity commitment, result of a split.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700592 # (in the form of slots) with some committed period of usage. Annual
593 # commitments renew by default. Commitments can be removed after their
594 # commitment end time passes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700595 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700596 # In order to remove annual commitment, its plan needs to be changed
597 # to monthly or flex first.
598 #
599 # A capacity commitment resource exists as a child resource of the admin
600 # project.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700601 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700602 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700603 &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. For FAILED commitment plan, provides the reason of failure.
604 # different programming environments, including REST APIs and RPC APIs. It is
605 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
606 # three pieces of data: error code, error message, and error details.
607 #
608 # You can find out more about this error model and how to work with it in the
609 # [API Design Guide](https://cloud.google.com/apis/design/errors).
610 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
611 # message types for APIs to use.
612 {
613 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
614 },
615 ],
616 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
617 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
618 # user-facing error message should be localized and sent in the
619 # google.rpc.Status.details field, or localized by the client.
620 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700621 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
622 # ACTIVE capacity commitments.
623 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
624 # `projects/myproject/locations/US/capacityCommitments/123`
625 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
626 # passes. Once the plan is changed, committed period is extended according to
627 # commitment plan. Only applicable for ANNUAL commitments.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700628 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
629 # capacity commitments.
630 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Bu Sun Kim65020912020-05-20 12:08:20 -0700631 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700632 &quot;first&quot;: { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs # First capacity commitment, result of a split.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700633 # (in the form of slots) with some committed period of usage. Annual
634 # commitments renew by default. Commitments can be removed after their
635 # commitment end time passes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700636 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700637 # In order to remove annual commitment, its plan needs to be changed
638 # to monthly or flex first.
639 #
640 # A capacity commitment resource exists as a child resource of the admin
641 # project.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700642 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700643 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700644 &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. For FAILED commitment plan, provides the reason of failure.
645 # different programming environments, including REST APIs and RPC APIs. It is
646 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
647 # three pieces of data: error code, error message, and error details.
648 #
649 # You can find out more about this error model and how to work with it in the
650 # [API Design Guide](https://cloud.google.com/apis/design/errors).
651 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
652 # message types for APIs to use.
653 {
654 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
655 },
656 ],
657 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
658 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
659 # user-facing error message should be localized and sent in the
660 # google.rpc.Status.details field, or localized by the client.
661 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700662 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
663 # ACTIVE capacity commitments.
664 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
665 # `projects/myproject/locations/US/capacityCommitments/123`
666 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
667 # passes. Once the plan is changed, committed period is extended according to
668 # commitment plan. Only applicable for ANNUAL commitments.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700669 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
670 # capacity commitments.
671 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Bu Sun Kim65020912020-05-20 12:08:20 -0700672 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700673 }</pre>
674</div>
675
676</body></html>