blob: 1f071e5a050919d058be92a379fb478e1e24d09d [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.,
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 Kimd059ad82020-07-22 17:02:09 -0700113 # (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;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
123 # capacity commitments.
124 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
125 # `projects/myproject/locations/US/capacityCommitments/123`
126 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
127 # ACTIVE capacity commitments.
128 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
129 # passes. Once the plan is changed, committed period is extended according to
130 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
131 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
132 &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.
133 # different programming environments, including REST APIs and RPC APIs. It is
134 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
135 # three pieces of data: error code, error message, and error details.
136 #
137 # You can find out more about this error model and how to work with it in the
138 # [API Design Guide](https://cloud.google.com/apis/design/errors).
139 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
140 # user-facing error message should be localized and sent in the
141 # google.rpc.Status.details field, or localized by the client.
142 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
143 # message types for APIs to use.
144 {
145 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
146 },
147 ],
148 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
149 },
150 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
151 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
152}
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700153
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
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700165 # (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.
174 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
175 # capacity commitments.
176 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
177 # `projects/myproject/locations/US/capacityCommitments/123`
178 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
179 # ACTIVE capacity commitments.
180 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
181 # passes. Once the plan is changed, committed period is extended according to
182 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
183 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
184 &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.
185 # different programming environments, including REST APIs and RPC APIs. It is
186 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
187 # three pieces of data: error code, error message, and error details.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700188 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700189 # You can find out more about this error model and how to work with it in the
190 # [API Design Guide](https://cloud.google.com/apis/design/errors).
191 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
192 # user-facing error message should be localized and sent in the
193 # google.rpc.Status.details field, or localized by the client.
194 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
195 # message types for APIs to use.
196 {
197 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
198 },
199 ],
200 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
201 },
202 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
203 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
204 }</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 Kimd059ad82020-07-22 17:02:09 -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.
255 #
256 # 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.
261 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
262 # capacity commitments.
263 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
264 # `projects/myproject/locations/US/capacityCommitments/123`
265 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
266 # ACTIVE capacity commitments.
267 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
268 # passes. Once the plan is changed, committed period is extended according to
269 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
270 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
271 &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.
272 # different programming environments, including REST APIs and RPC APIs. It is
273 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
274 # three pieces of data: error code, error message, and error details.
Bu Sun Kim65020912020-05-20 12:08:20 -0700275 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700276 # You can find out more about this error model and how to work with it in the
277 # [API Design Guide](https://cloud.google.com/apis/design/errors).
278 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
279 # user-facing error message should be localized and sent in the
280 # google.rpc.Status.details field, or localized by the client.
281 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
282 # message types for APIs to use.
283 {
284 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
285 },
286 ],
287 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
288 },
289 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
290 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
291 }</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700292</div>
293
294<div class="method">
295 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</code>
296 <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 pageToken: string, The next_page_token value returned from a previous List request, if any.
302 pageSize: integer, The maximum number of items to return.
303 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 Kim65020912020-05-20 12:08:20 -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 Kimd059ad82020-07-22 17:02:09 -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
316 # (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.
319 #
320 # 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.
325 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
326 # capacity commitments.
327 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
328 # `projects/myproject/locations/US/capacityCommitments/123`
329 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
330 # ACTIVE capacity commitments.
331 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
332 # passes. Once the plan is changed, committed period is extended according to
333 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
334 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
335 &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.
336 # different programming environments, including REST APIs and RPC APIs. It is
337 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
338 # three pieces of data: error code, error message, and error details.
339 #
340 # You can find out more about this error model and how to work with it in the
341 # [API Design Guide](https://cloud.google.com/apis/design/errors).
342 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
343 # user-facing error message should be localized and sent in the
344 # google.rpc.Status.details field, or localized by the client.
345 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
346 # message types for APIs to use.
347 {
348 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
349 },
350 ],
351 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
352 },
353 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
354 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
355 },
356 ],
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>
376 <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`.
383
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 Kimd059ad82020-07-22 17:02:09 -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.
418 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
419 # capacity commitments.
420 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
421 # `projects/myproject/locations/US/capacityCommitments/123`
422 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
423 # ACTIVE capacity commitments.
424 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
425 # passes. Once the plan is changed, committed period is extended according to
426 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
427 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
428 &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.
429 # different programming environments, including REST APIs and RPC APIs. It is
430 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
431 # three pieces of data: error code, error message, and error details.
Bu Sun Kim65020912020-05-20 12:08:20 -0700432 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700433 # You can find out more about this error model and how to work with it in the
434 # [API Design Guide](https://cloud.google.com/apis/design/errors).
435 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
436 # user-facing error message should be localized and sent in the
437 # google.rpc.Status.details field, or localized by the client.
438 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
439 # message types for APIs to use.
440 {
441 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
442 },
443 ],
444 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
445 },
446 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
447 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
448 }</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700449</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 Kimd059ad82020-07-22 17:02:09 -0700468 # (in the form of slots) with some committed period of usage. Annual
469 # commitments renew by default. Commitments can be removed after their
470 # 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 #
475 # A capacity commitment resource exists as a child resource of the admin
476 # project.
477 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
478 # capacity commitments.
479 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
480 # `projects/myproject/locations/US/capacityCommitments/123`
481 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
482 # ACTIVE capacity commitments.
483 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
484 # passes. Once the plan is changed, committed period is extended according to
485 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
486 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
487 &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.
488 # different programming environments, including REST APIs and RPC APIs. It is
489 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
490 # three pieces of data: error code, error message, and error details.
491 #
492 # You can find out more about this error model and how to work with it in the
493 # [API Design Guide](https://cloud.google.com/apis/design/errors).
494 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
495 # user-facing error message should be localized and sent in the
496 # google.rpc.Status.details field, or localized by the client.
497 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
498 # message types for APIs to use.
499 {
500 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
501 },
502 ],
503 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
504 },
505 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
506 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
507}
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -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 Kimd059ad82020-07-22 17:02:09 -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.
522 #
523 # 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.
528 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
529 # capacity commitments.
530 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
531 # `projects/myproject/locations/US/capacityCommitments/123`
532 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
533 # ACTIVE capacity commitments.
534 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
535 # passes. Once the plan is changed, committed period is extended according to
536 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
537 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
538 &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.
539 # different programming environments, including REST APIs and RPC APIs. It is
540 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
541 # three pieces of data: error code, error message, and error details.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700542 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700543 # You can find out more about this error model and how to work with it in the
544 # [API Design Guide](https://cloud.google.com/apis/design/errors).
545 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
546 # user-facing error message should be localized and sent in the
547 # google.rpc.Status.details field, or localized by the client.
548 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
549 # message types for APIs to use.
550 {
551 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
552 },
553 ],
554 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
555 },
556 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
557 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
558 }</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
564`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.
571
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 Kimd059ad82020-07-22 17:02:09 -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.
595 #
596 # 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.
601 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
602 # capacity commitments.
603 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
604 # `projects/myproject/locations/US/capacityCommitments/123`
605 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
606 # ACTIVE capacity commitments.
607 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
608 # passes. Once the plan is changed, committed period is extended according to
609 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
610 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
611 &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.
612 # different programming environments, including REST APIs and RPC APIs. It is
613 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
614 # three pieces of data: error code, error message, and error details.
Bu Sun Kim65020912020-05-20 12:08:20 -0700615 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700616 # You can find out more about this error model and how to work with it in the
617 # [API Design Guide](https://cloud.google.com/apis/design/errors).
618 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
619 # user-facing error message should be localized and sent in the
620 # google.rpc.Status.details field, or localized by the client.
621 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
622 # message types for APIs to use.
623 {
624 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
625 },
626 ],
627 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim65020912020-05-20 12:08:20 -0700628 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700629 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
630 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
631 },
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 Kimd059ad82020-07-22 17:02:09 -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.
636 #
637 # 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.
642 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
643 # capacity commitments.
644 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
645 # `projects/myproject/locations/US/capacityCommitments/123`
646 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for
647 # ACTIVE capacity commitments.
648 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
649 # passes. Once the plan is changed, committed period is extended according to
650 # commitment plan. Only applicable for ANNUAL and TRIAL commitments.
651 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
652 &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.
653 # different programming environments, including REST APIs and RPC APIs. It is
654 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
655 # three pieces of data: error code, error message, and error details.
Bu Sun Kim65020912020-05-20 12:08:20 -0700656 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700657 # You can find out more about this error model and how to work with it in the
658 # [API Design Guide](https://cloud.google.com/apis/design/errors).
659 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
660 # user-facing error message should be localized and sent in the
661 # google.rpc.Status.details field, or localized by the client.
662 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
663 # message types for APIs to use.
664 {
665 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
666 },
667 ],
668 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim65020912020-05-20 12:08:20 -0700669 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700670 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
671 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
672 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700673 }</pre>
674</div>
675
676</body></html>