blob: 3e458ced00e292ac420cd442f0ee347151beaca8 [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">
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>
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;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
123 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
124 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
125 # passes. Once the plan is changed, committed period is extended according to
126 # commitment plan. Only applicable for ANNUAL commitments.
127 &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.
128 # different programming environments, including REST APIs and RPC APIs. It is
129 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
130 # three pieces of data: error code, error message, and error details.
131 #
132 # You can find out more about this error model and how to work with it in the
133 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -0700134 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
135 # message types for APIs to use.
136 {
137 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
138 },
139 ],
140 &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 -0700141 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
142 # user-facing error message should be localized and sent in the
143 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700144 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700145 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
146 # capacity commitments.
147 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
148 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
149 # `projects/myproject/locations/US/capacityCommitments/123`
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;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
173 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
174 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
175 # passes. Once the plan is changed, committed period is extended according to
176 # commitment plan. Only applicable for ANNUAL commitments.
177 &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.
178 # different programming environments, including REST APIs and RPC APIs. It is
179 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
180 # three pieces of data: error code, error message, and error details.
181 #
182 # You can find out more about this error model and how to work with it in the
183 # [API Design Guide](https://cloud.google.com/apis/design/errors).
184 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
185 # message types for APIs to use.
186 {
187 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
188 },
189 ],
190 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
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 },
195 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
196 # capacity commitments.
197 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
198 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
199 # `projects/myproject/locations/US/capacityCommitments/123`
200 }</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700201</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.,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700211 `projects/myproject/locations/US/capacityCommitments/123` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700212 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.,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700238 `projects/myproject/locations/US/capacityCommitments/123` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700239 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
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700248 # (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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700251 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700252 # 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;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
258 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
259 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
260 # passes. Once the plan is changed, committed period is extended according to
261 # commitment plan. Only applicable for ANNUAL commitments.
262 &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.
263 # different programming environments, including REST APIs and RPC APIs. It is
264 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
265 # three pieces of data: error code, error message, and error details.
266 #
267 # You can find out more about this error model and how to work with it in the
268 # [API Design Guide](https://cloud.google.com/apis/design/errors).
269 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
270 # message types for APIs to use.
271 {
272 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
273 },
274 ],
275 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
276 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
277 # user-facing error message should be localized and sent in the
278 # google.rpc.Status.details field, or localized by the client.
279 },
280 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
281 # capacity commitments.
282 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
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 }</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700286</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.,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700294 `projects/myproject/locations/US` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700295 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
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700308 # (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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700311 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700312 # 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;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
318 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
319 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
320 # passes. Once the plan is changed, committed period is extended according to
321 # commitment plan. Only applicable for ANNUAL commitments.
322 &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.
323 # different programming environments, including REST APIs and RPC APIs. It is
324 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
325 # three pieces of data: error code, error message, and error details.
326 #
327 # You can find out more about this error model and how to work with it in the
328 # [API Design Guide](https://cloud.google.com/apis/design/errors).
329 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
330 # message types for APIs to use.
331 {
332 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
333 },
334 ],
335 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
336 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
337 # user-facing error message should be localized and sent in the
338 # google.rpc.Status.details field, or localized by the client.
339 },
340 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
341 # capacity commitments.
342 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
343 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
344 # `projects/myproject/locations/US/capacityCommitments/123`
Bu Sun Kim65020912020-05-20 12:08:20 -0700345 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700346 ],
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>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700368 <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`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700375
376Args:
377 parent: string, Parent resource that identifies admin project and location e.g.,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700378 `projects/myproject/locations/us` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700379 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
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700399 # (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;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
409 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
410 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
411 # passes. Once the plan is changed, committed period is extended according to
412 # commitment plan. Only applicable for ANNUAL commitments.
413 &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.
414 # different programming environments, including REST APIs and RPC APIs. It is
415 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
416 # three pieces of data: error code, error message, and error details.
417 #
418 # You can find out more about this error model and how to work with it in the
419 # [API Design Guide](https://cloud.google.com/apis/design/errors).
420 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
421 # message types for APIs to use.
422 {
423 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
424 },
425 ],
426 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
427 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
428 # user-facing error message should be localized and sent in the
429 # google.rpc.Status.details field, or localized by the client.
430 },
431 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
432 # capacity commitments.
433 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
434 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
435 # `projects/myproject/locations/US/capacityCommitments/123`
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
Bu Sun Kim65020912020-05-20 12:08:20 -0700456 # (in the form of slots) with some committed period of usage. Annual
457 # commitments renew by default. Commitments can be removed after their
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700458 # 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 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700463 # A capacity commitment resource exists as a child resource of the admin
464 # project.
Bu Sun Kim65020912020-05-20 12:08:20 -0700465 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
466 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
467 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
468 # passes. Once the plan is changed, committed period is extended according to
469 # commitment plan. Only applicable for ANNUAL commitments.
470 &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.
471 # different programming environments, including REST APIs and RPC APIs. It is
472 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
473 # three pieces of data: error code, error message, and error details.
474 #
475 # You can find out more about this error model and how to work with it in the
476 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -0700477 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
478 # message types for APIs to use.
479 {
480 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
481 },
482 ],
483 &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 -0700484 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
485 # user-facing error message should be localized and sent in the
486 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700487 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700488 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
489 # capacity commitments.
490 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
491 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
492 # `projects/myproject/locations/US/capacityCommitments/123`
493 }
Bu Sun Kim65020912020-05-20 12:08:20 -0700494
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
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700505 # (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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700508 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700509 # 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;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
515 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
516 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
517 # passes. Once the plan is changed, committed period is extended according to
518 # commitment plan. Only applicable for ANNUAL commitments.
519 &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.
520 # different programming environments, including REST APIs and RPC APIs. It is
521 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
522 # three pieces of data: error code, error message, and error details.
523 #
524 # You can find out more about this error model and how to work with it in the
525 # [API Design Guide](https://cloud.google.com/apis/design/errors).
526 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
527 # message types for APIs to use.
528 {
529 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
530 },
531 ],
532 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
533 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
534 # user-facing error message should be localized and sent in the
535 # google.rpc.Status.details field, or localized by the client.
536 },
537 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
538 # capacity commitments.
539 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
540 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
541 # `projects/myproject/locations/US/capacityCommitments/123`
542 }</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700543</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
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700548`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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700555
556Args:
557 name: string, Required. The resource name e.g.,:
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700558 `projects/myproject/locations/US/capacityCommitments/123` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700559 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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700576 # (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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700579 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700580 # 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;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
586 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
587 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
588 # passes. Once the plan is changed, committed period is extended according to
589 # commitment plan. Only applicable for ANNUAL commitments.
590 &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.
591 # different programming environments, including REST APIs and RPC APIs. It is
592 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
593 # three pieces of data: error code, error message, and error details.
594 #
595 # You can find out more about this error model and how to work with it in the
596 # [API Design Guide](https://cloud.google.com/apis/design/errors).
597 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
598 # message types for APIs to use.
599 {
600 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
601 },
602 ],
603 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
604 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
605 # user-facing error message should be localized and sent in the
606 # google.rpc.Status.details field, or localized by the client.
607 },
608 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
609 # capacity commitments.
610 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
611 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
612 # `projects/myproject/locations/US/capacityCommitments/123`
Bu Sun Kim65020912020-05-20 12:08:20 -0700613 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700614 &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 -0700615 # (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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700619 # 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;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
625 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
626 &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time
627 # passes. Once the plan is changed, committed period is extended according to
628 # commitment plan. Only applicable for ANNUAL commitments.
629 &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.
630 # different programming environments, including REST APIs and RPC APIs. It is
631 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
632 # three pieces of data: error code, error message, and error details.
633 #
634 # You can find out more about this error model and how to work with it in the
635 # [API Design Guide](https://cloud.google.com/apis/design/errors).
636 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
637 # message types for APIs to use.
638 {
639 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
640 },
641 ],
642 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
643 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
644 # user-facing error message should be localized and sent in the
645 # google.rpc.Status.details field, or localized by the client.
646 },
647 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE
648 # capacity commitments.
649 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
650 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g.,
651 # `projects/myproject/locations/US/capacityCommitments/123`
Bu Sun Kim65020912020-05-20 12:08:20 -0700652 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700653 }</pre>
654</div>
655
656</body></html>