blob: bc73de34e4aeeaefa8a11d36d756273e8e921e8b [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_v1.html">BigQuery Reservation API</a> . <a href="bigqueryreservation_v1.projects.html">projects</a> . <a href="bigqueryreservation_v1.projects.locations.html">locations</a> . <a href="bigqueryreservation_v1.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">
87 <code><a href="#list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
88<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>
94<p class="firstline">Merges capacity commitments of the same plan into a single commitment.</p>
95<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.,
108 projects/myproject/locations/US (required)
109 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
113 # (in the form of slots) with some committed period of usage. Annual
114 # commitments renew by default. Commitments can be removed after their
115 # 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 #
120 # A capacity commitment resource exists as a child resource of the admin
121 # project.
122 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
123 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
124 # `projects/myproject/locations/US/capacityCommitments/123`
125 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
126 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
127 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
128 # passes. Once the plan is changed, committed period is extended according to
129 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
130 &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.
131 # different programming environments, including REST APIs and RPC APIs. It is
132 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
133 # three pieces of data: error code, error message, and error details.
134 #
135 # You can find out more about this error model and how to work with it in the
136 # [API Design Guide](https://cloud.google.com/apis/design/errors).
137 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
138 # message types for APIs to use.
139 {
140 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
141 },
142 ],
143 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
144 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
145 # user-facing error message should be localized and sent in the
146 # google.rpc.Status.details field, or localized by the client.
147 },
148 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
149 # capacity commitments.
150}
151
152 enforceSingleAdminProjectPerOrg: boolean, If true, fail the request if another project in the organization has a
153capacity commitment.
154 x__xgafv: string, V1 error format.
155 Allowed values
156 1 - v1 error format
157 2 - v2 error format
158
159Returns:
160 An object of the form:
161
162 { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs
163 # (in the form of slots) with some committed period of usage. Annual
164 # commitments renew by default. Commitments can be removed after their
165 # commitment end time passes.
166 #
167 # In order to remove annual commitment, its plan needs to be changed
168 # to monthly or flex first.
169 #
170 # A capacity commitment resource exists as a child resource of the admin
171 # project.
172 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
173 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
174 # `projects/myproject/locations/US/capacityCommitments/123`
175 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
176 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
177 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
178 # passes. Once the plan is changed, committed period is extended according to
179 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
180 &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.
181 # different programming environments, including REST APIs and RPC APIs. It is
182 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
183 # three pieces of data: error code, error message, and error details.
184 #
185 # You can find out more about this error model and how to work with it in the
186 # [API Design Guide](https://cloud.google.com/apis/design/errors).
187 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
188 # message types for APIs to use.
189 {
190 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
191 },
192 ],
193 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
194 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
195 # user-facing error message should be localized and sent in the
196 # google.rpc.Status.details field, or localized by the client.
197 },
198 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
199 # capacity commitments.
200 }</pre>
201</div>
202
203<div class="method">
204 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
205 <pre>Deletes a capacity commitment. Attempting to delete capacity commitment
206before its commitment_end_time will fail with the error code
207`google.rpc.Code.FAILED_PRECONDITION`.
208
209Args:
210 name: string, Required. Resource name of the capacity commitment to delete. E.g.,
211 projects/myproject/locations/US/capacityCommitments/123 (required)
212 x__xgafv: string, V1 error format.
213 Allowed values
214 1 - v1 error format
215 2 - v2 error format
216
217Returns:
218 An object of the form:
219
220 { # A generic empty message that you can re-use to avoid defining duplicated
221 # empty messages in your APIs. A typical example is to use it as the request
222 # or the response type of an API method. For instance:
223 #
224 # service Foo {
225 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
226 # }
227 #
228 # The JSON representation for `Empty` is empty JSON object `{}`.
229 }</pre>
230</div>
231
232<div class="method">
233 <code class="details" id="get">get(name, x__xgafv=None)</code>
234 <pre>Returns information about the capacity commitment.
235
236Args:
237 name: string, Required. Resource name of the capacity commitment to retrieve. E.g.,
238 projects/myproject/locations/US/capacityCommitments/123 (required)
239 x__xgafv: string, V1 error format.
240 Allowed values
241 1 - v1 error format
242 2 - v2 error format
243
244Returns:
245 An object of the form:
246
247 { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs
248 # (in the form of slots) with some committed period of usage. Annual
249 # commitments renew by default. Commitments can be removed after their
250 # commitment end time passes.
251 #
252 # In order to remove annual commitment, its plan needs to be changed
253 # to monthly or flex first.
254 #
255 # A capacity commitment resource exists as a child resource of the admin
256 # project.
257 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
258 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
259 # `projects/myproject/locations/US/capacityCommitments/123`
260 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
261 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
262 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
263 # passes. Once the plan is changed, committed period is extended according to
264 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
265 &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.
266 # different programming environments, including REST APIs and RPC APIs. It is
267 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
268 # three pieces of data: error code, error message, and error details.
269 #
270 # You can find out more about this error model and how to work with it in the
271 # [API Design Guide](https://cloud.google.com/apis/design/errors).
272 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
273 # message types for APIs to use.
274 {
275 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
276 },
277 ],
278 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
279 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
280 # user-facing error message should be localized and sent in the
281 # google.rpc.Status.details field, or localized by the client.
282 },
283 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
284 # capacity commitments.
285 }</pre>
286</div>
287
288<div class="method">
289 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</code>
290 <pre>Lists all the capacity commitments for the admin project.
291
292Args:
293 parent: string, Required. Resource name of the parent reservation. E.g.,
294 projects/myproject/locations/US (required)
295 pageToken: string, The next_page_token value returned from a previous List request, if any.
296 pageSize: integer, The maximum number of items to return.
297 x__xgafv: string, V1 error format.
298 Allowed values
299 1 - v1 error format
300 2 - v2 error format
301
302Returns:
303 An object of the form:
304
305 { # The response for ReservationService.ListCapacityCommitments.
306 &quot;capacityCommitments&quot;: [ # List of capacity commitments visible to the user.
307 { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs
308 # (in the form of slots) with some committed period of usage. Annual
309 # commitments renew by default. Commitments can be removed after their
310 # commitment end time passes.
311 #
312 # In order to remove annual commitment, its plan needs to be changed
313 # to monthly or flex first.
314 #
315 # A capacity commitment resource exists as a child resource of the admin
316 # project.
317 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
318 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
319 # `projects/myproject/locations/US/capacityCommitments/123`
320 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
321 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
322 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
323 # passes. Once the plan is changed, committed period is extended according to
324 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
325 &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.
326 # different programming environments, including REST APIs and RPC APIs. It is
327 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
328 # three pieces of data: error code, error message, and error details.
329 #
330 # You can find out more about this error model and how to work with it in the
331 # [API Design Guide](https://cloud.google.com/apis/design/errors).
332 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
333 # message types for APIs to use.
334 {
335 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
336 },
337 ],
338 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
339 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
340 # user-facing error message should be localized and sent in the
341 # google.rpc.Status.details field, or localized by the client.
342 },
343 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
344 # capacity commitments.
345 },
346 ],
347 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results, or empty if there are no
348 # more results in the list.
349 }</pre>
350</div>
351
352<div class="method">
353 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
354 <pre>Retrieves the next page of results.
355
356Args:
357 previous_request: The request for the previous page. (required)
358 previous_response: The response from the request for the previous page. (required)
359
360Returns:
361 A request object that you can call &#x27;execute()&#x27; on to request the next
362 page. Returns None if there are no more items in the collection.
363 </pre>
364</div>
365
366<div class="method">
367 <code class="details" id="merge">merge(parent, body=None, x__xgafv=None)</code>
368 <pre>Merges capacity commitments of the same plan into a single commitment.
369
370The resulting capacity commitment has the greater commitment_end_time
371out of the to-be-merged capacity commitments.
372
373Attempting to merge capacity commitments of different plan will fail
374with the error code `google.rpc.Code.FAILED_PRECONDITION`.
375
376Args:
377 parent: string, Parent resource that identifies admin project and location e.g.,
378projects/myproject/locations/us (required)
379 body: object, The request body.
380 The object takes the form of:
381
382{ # The request for ReservationService.MergeCapacityCommitments.
383 &quot;capacityCommitmentIds&quot;: [ # Ids of capacity commitments to merge.
384 # These capacity commitments must exist under admin project and location
385 # specified in the parent.
386 &quot;A String&quot;,
387 ],
388 }
389
390 x__xgafv: string, V1 error format.
391 Allowed values
392 1 - v1 error format
393 2 - v2 error format
394
395Returns:
396 An object of the form:
397
398 { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs
399 # (in the form of slots) with some committed period of usage. Annual
400 # commitments renew by default. Commitments can be removed after their
401 # commitment end time passes.
402 #
403 # In order to remove annual commitment, its plan needs to be changed
404 # to monthly or flex first.
405 #
406 # A capacity commitment resource exists as a child resource of the admin
407 # project.
408 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
409 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
410 # `projects/myproject/locations/US/capacityCommitments/123`
411 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
412 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
413 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
414 # passes. Once the plan is changed, committed period is extended according to
415 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
416 &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.
417 # different programming environments, including REST APIs and RPC APIs. It is
418 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
419 # three pieces of data: error code, error message, and error details.
420 #
421 # You can find out more about this error model and how to work with it in the
422 # [API Design Guide](https://cloud.google.com/apis/design/errors).
423 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
424 # message types for APIs to use.
425 {
426 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
427 },
428 ],
429 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
430 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
431 # user-facing error message should be localized and sent in the
432 # google.rpc.Status.details field, or localized by the client.
433 },
434 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
435 # capacity commitments.
436 }</pre>
437</div>
438
439<div class="method">
440 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
441 <pre>Updates an existing capacity commitment.
442
443Only `plan` and `renewal_plan` fields can be updated.
444
445Plan can only be changed to a plan of a longer commitment period.
446Attempting to change to a plan with shorter commitment period will fail
447with the error code `google.rpc.Code.FAILED_PRECONDITION`.
448
449Args:
450 name: string, Output only. The resource name of the capacity commitment, e.g.,
451`projects/myproject/locations/US/capacityCommitments/123` (required)
452 body: object, The request body.
453 The object takes the form of:
454
455{ # Capacity commitment is a way to purchase compute capacity for BigQuery jobs
456 # (in the form of slots) with some committed period of usage. Annual
457 # commitments renew by default. Commitments can be removed after their
458 # commitment end time passes.
459 #
460 # In order to remove annual commitment, its plan needs to be changed
461 # to monthly or flex first.
462 #
463 # A capacity commitment resource exists as a child resource of the admin
464 # project.
465 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
466 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
467 # `projects/myproject/locations/US/capacityCommitments/123`
468 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
469 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
470 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
471 # passes. Once the plan is changed, committed period is extended according to
472 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
473 &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.
474 # different programming environments, including REST APIs and RPC APIs. It is
475 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
476 # three pieces of data: error code, error message, and error details.
477 #
478 # You can find out more about this error model and how to work with it in the
479 # [API Design Guide](https://cloud.google.com/apis/design/errors).
480 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
481 # message types for APIs to use.
482 {
483 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
484 },
485 ],
486 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
487 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
488 # user-facing error message should be localized and sent in the
489 # google.rpc.Status.details field, or localized by the client.
490 },
491 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
492 # capacity commitments.
493}
494
495 updateMask: string, Standard field mask for the set of fields to be updated.
496 x__xgafv: string, V1 error format.
497 Allowed values
498 1 - v1 error format
499 2 - v2 error format
500
501Returns:
502 An object of the form:
503
504 { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs
505 # (in the form of slots) with some committed period of usage. Annual
506 # commitments renew by default. Commitments can be removed after their
507 # commitment end time passes.
508 #
509 # In order to remove annual commitment, its plan needs to be changed
510 # to monthly or flex first.
511 #
512 # A capacity commitment resource exists as a child resource of the admin
513 # project.
514 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
515 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
516 # `projects/myproject/locations/US/capacityCommitments/123`
517 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
518 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
519 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
520 # passes. Once the plan is changed, committed period is extended according to
521 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
522 &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.
523 # different programming environments, including REST APIs and RPC APIs. It is
524 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
525 # three pieces of data: error code, error message, and error details.
526 #
527 # You can find out more about this error model and how to work with it in the
528 # [API Design Guide](https://cloud.google.com/apis/design/errors).
529 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
530 # message types for APIs to use.
531 {
532 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
533 },
534 ],
535 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
536 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
537 # user-facing error message should be localized and sent in the
538 # google.rpc.Status.details field, or localized by the client.
539 },
540 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
541 # capacity commitments.
542 }</pre>
543</div>
544
545<div class="method">
546 <code class="details" id="split">split(name, body=None, x__xgafv=None)</code>
547 <pre>Splits capacity commitment to two commitments of the same plan and
548`commitment_end_time`.
549
550A common use case is to enable downgrading commitments.
551
552For example, in order to downgrade from 10000 slots to 8000, you might
553split a 10000 capacity commitment into commitments of 2000 and 8000. Then,
554you would change the plan of the first one to `FLEX` and then delete it.
555
556Args:
557 name: string, Required. The resource name e.g.,:
558 projects/myproject/locations/US/capacityCommitments/123 (required)
559 body: object, The request body.
560 The object takes the form of:
561
562{ # The request for ReservationService.SplitCapacityCommitment.
563 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in the capacity commitment after the split.
564 }
565
566 x__xgafv: string, V1 error format.
567 Allowed values
568 1 - v1 error format
569 2 - v2 error format
570
571Returns:
572 An object of the form:
573
574 { # The response for ReservationService.SplitCapacityCommitment.
575 &quot;second&quot;: { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs # Second capacity commitment, result of a split.
576 # (in the form of slots) with some committed period of usage. Annual
577 # commitments renew by default. Commitments can be removed after their
578 # commitment end time passes.
579 #
580 # In order to remove annual commitment, its plan needs to be changed
581 # to monthly or flex first.
582 #
583 # A capacity commitment resource exists as a child resource of the admin
584 # project.
585 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
586 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
587 # `projects/myproject/locations/US/capacityCommitments/123`
588 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
589 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
590 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
591 # passes. Once the plan is changed, committed period is extended according to
592 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
593 &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.
594 # different programming environments, including REST APIs and RPC APIs. It is
595 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
596 # three pieces of data: error code, error message, and error details.
597 #
598 # You can find out more about this error model and how to work with it in the
599 # [API Design Guide](https://cloud.google.com/apis/design/errors).
600 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
601 # message types for APIs to use.
602 {
603 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
604 },
605 ],
606 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
607 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
608 # user-facing error message should be localized and sent in the
609 # google.rpc.Status.details field, or localized by the client.
610 },
611 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
612 # capacity commitments.
613 },
614 &quot;first&quot;: { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs # First capacity commitment, result of a split.
615 # (in the form of slots) with some committed period of usage. Annual
616 # commitments renew by default. Commitments can be removed after their
617 # commitment end time passes.
618 #
619 # In order to remove annual commitment, its plan needs to be changed
620 # to monthly or flex first.
621 #
622 # A capacity commitment resource exists as a child resource of the admin
623 # project.
624 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
625 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
626 # `projects/myproject/locations/US/capacityCommitments/123`
627 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
628 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
629 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
630 # passes. Once the plan is changed, committed period is extended according to
631 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
632 &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.
633 # different programming environments, including REST APIs and RPC APIs. It is
634 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
635 # three pieces of data: error code, error message, and error details.
636 #
637 # You can find out more about this error model and how to work with it in the
638 # [API Design Guide](https://cloud.google.com/apis/design/errors).
639 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
640 # message types for APIs to use.
641 {
642 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
643 },
644 ],
645 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
646 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
647 # user-facing error message should be localized and sent in the
648 # google.rpc.Status.details field, or localized by the client.
649 },
650 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
651 # capacity commitments.
652 },
653 }</pre>
654</div>
655
656</body></html>