1<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="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
81  <code><a href="#create">create(parent, body=None, capacityCommitmentId=None, enforceSingleAdminProjectPerOrg=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Creates a new capacity commitment resource.</p>
83<p class="toc_element">
84  <code><a href="#delete">delete(name, force=None, x__xgafv=None)</a></code></p>
85<p class="firstline">Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.</p>
86<p class="toc_element">
87  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
88<p class="firstline">Returns information about the capacity commitment.</p>
89<p class="toc_element">
90  <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Lists all the capacity commitments for the admin project.</p>
92<p class="toc_element">
93  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
96  <code><a href="#merge">merge(parent, body=None, x__xgafv=None)</a></code></p>
97<p class="firstline">Merges capacity commitments of the same plan into a single commitment. The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments. Attempting to merge capacity commitments of different plan will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.</p>
98<p class="toc_element">
99  <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
100<p class="firstline">Updates an existing capacity commitment. Only `plan` and `renewal_plan` fields can be updated. Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.</p>
101<p class="toc_element">
102  <code><a href="#split">split(name, body=None, x__xgafv=None)</a></code></p>
103<p class="firstline">Splits capacity commitment to two commitments of the same plan and `commitment_end_time`. A common use case is to enable downgrading commitments. For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you would change the plan of the first one to `FLEX` and then delete it.</p>
104<h3>Method Details</h3>
105<div class="method">
106    <code class="details" id="close">close()</code>
107  <pre>Close httplib2 connections.</pre>
108</div>
109
110<div class="method">
111    <code class="details" id="create">create(parent, body=None, capacityCommitmentId=None, enforceSingleAdminProjectPerOrg=None, x__xgafv=None)</code>
112  <pre>Creates a new capacity commitment resource.
113
114Args:
115  parent: string, Required. Resource name of the parent reservation. E.g., `projects/myproject/locations/US` (required)
116  body: object, The request body.
117    The object takes the form of:
118
119{ # Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Annual commitments renew by default. Commitments can be removed after their commitment end time passes. In order to remove annual commitment, its plan needs to be changed to monthly or flex first. A capacity commitment resource exists as a child resource of the admin project.
120  &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
121  &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
122  &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. For FAILED commitment plan, provides the reason of failure.
123    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
124    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
125      {
126        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
127      },
128    ],
129    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
130  },
131  &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
132  &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
133  &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
134  &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
135  &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
136}
137
138  capacityCommitmentId: string, The optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is empty. This field must only contain lower case alphanumeric characters or dash. Max length is 64 characters. NOTE: this ID won&#x27;t be kept if the capacity commitment is split or merged.
139  enforceSingleAdminProjectPerOrg: boolean, If true, fail the request if another project in the organization has a capacity commitment.
140  x__xgafv: string, V1 error format.
141    Allowed values
142      1 - v1 error format
143      2 - v2 error format
144
145Returns:
146  An object of the form:
147
148    { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Annual commitments renew by default. Commitments can be removed after their commitment end time passes. In order to remove annual commitment, its plan needs to be changed to monthly or flex first. A capacity commitment resource exists as a child resource of the admin project.
149  &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
150  &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
151  &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. For FAILED commitment plan, provides the reason of failure.
152    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
153    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
154      {
155        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
156      },
157    ],
158    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
159  },
160  &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
161  &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
162  &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
163  &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
164  &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
165}</pre>
166</div>
167
168<div class="method">
169    <code class="details" id="delete">delete(name, force=None, x__xgafv=None)</code>
170  <pre>Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
171
172Args:
173  name: string, Required. Resource name of the capacity commitment to delete. E.g., `projects/myproject/locations/US/capacityCommitments/123` (required)
174  force: boolean, Can be used to force delete commitments even if assignments exist. Deleting commitments with assignments may cause queries to fail if they no longer have access to slots.
175  x__xgafv: string, V1 error format.
176    Allowed values
177      1 - v1 error format
178      2 - v2 error format
179
180Returns:
181  An object of the form:
182
183    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
184}</pre>
185</div>
186
187<div class="method">
188    <code class="details" id="get">get(name, x__xgafv=None)</code>
189  <pre>Returns information about the capacity commitment.
190
191Args:
192  name: string, Required. Resource name of the capacity commitment to retrieve. E.g., `projects/myproject/locations/US/capacityCommitments/123` (required)
193  x__xgafv: string, V1 error format.
194    Allowed values
195      1 - v1 error format
196      2 - v2 error format
197
198Returns:
199  An object of the form:
200
201    { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Annual commitments renew by default. Commitments can be removed after their commitment end time passes. In order to remove annual commitment, its plan needs to be changed to monthly or flex first. A capacity commitment resource exists as a child resource of the admin project.
202  &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
203  &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
204  &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. For FAILED commitment plan, provides the reason of failure.
205    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
206    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
207      {
208        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
209      },
210    ],
211    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
212  },
213  &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
214  &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
215  &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
216  &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
217  &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
218}</pre>
219</div>
220
221<div class="method">
222    <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
223  <pre>Lists all the capacity commitments for the admin project.
224
225Args:
226  parent: string, Required. Resource name of the parent reservation. E.g., `projects/myproject/locations/US` (required)
227  pageSize: integer, The maximum number of items to return.
228  pageToken: string, The next_page_token value returned from a previous List request, if any.
229  x__xgafv: string, V1 error format.
230    Allowed values
231      1 - v1 error format
232      2 - v2 error format
233
234Returns:
235  An object of the form:
236
237    { # The response for ReservationService.ListCapacityCommitments.
238  &quot;capacityCommitments&quot;: [ # List of capacity commitments visible to the user.
239    { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Annual commitments renew by default. Commitments can be removed after their commitment end time passes. In order to remove annual commitment, its plan needs to be changed to monthly or flex first. A capacity commitment resource exists as a child resource of the admin project.
240      &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
241      &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
242      &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. For FAILED commitment plan, provides the reason of failure.
243        &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
244        &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
245          {
246            &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
247          },
248        ],
249        &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
250      },
251      &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
252      &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
253      &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
254      &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
255      &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
256    },
257  ],
258  &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results, or empty if there are no more results in the list.
259}</pre>
260</div>
261
262<div class="method">
263    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
264  <pre>Retrieves the next page of results.
265
266Args:
267  previous_request: The request for the previous page. (required)
268  previous_response: The response from the request for the previous page. (required)
269
270Returns:
271  A request object that you can call &#x27;execute()&#x27; on to request the next
272  page. Returns None if there are no more items in the collection.
273    </pre>
274</div>
275
276<div class="method">
277    <code class="details" id="merge">merge(parent, body=None, x__xgafv=None)</code>
278  <pre>Merges capacity commitments of the same plan into a single commitment. The resulting capacity commitment has the greater commitment_end_time out of the to-be-merged capacity commitments. Attempting to merge capacity commitments of different plan will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
279
280Args:
281  parent: string, Parent resource that identifies admin project and location e.g., `projects/myproject/locations/us` (required)
282  body: object, The request body.
283    The object takes the form of:
284
285{ # The request for ReservationService.MergeCapacityCommitments.
286  &quot;capacityCommitmentIds&quot;: [ # Ids of capacity commitments to merge. These capacity commitments must exist under admin project and location specified in the parent. ID is the last portion of capacity commitment name e.g., &#x27;abc&#x27; for projects/myproject/locations/US/capacityCommitments/abc
287    &quot;A String&quot;,
288  ],
289}
290
291  x__xgafv: string, V1 error format.
292    Allowed values
293      1 - v1 error format
294      2 - v2 error format
295
296Returns:
297  An object of the form:
298
299    { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Annual commitments renew by default. Commitments can be removed after their commitment end time passes. In order to remove annual commitment, its plan needs to be changed to monthly or flex first. A capacity commitment resource exists as a child resource of the admin project.
300  &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
301  &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
302  &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. For FAILED commitment plan, provides the reason of failure.
303    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
304    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
305      {
306        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
307      },
308    ],
309    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
310  },
311  &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
312  &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
313  &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
314  &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
315  &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
316}</pre>
317</div>
318
319<div class="method">
320    <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
321  <pre>Updates an existing capacity commitment. Only `plan` and `renewal_plan` fields can be updated. Plan can only be changed to a plan of a longer commitment period. Attempting to change to a plan with shorter commitment period will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
322
323Args:
324  name: string, Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123` (required)
325  body: object, The request body.
326    The object takes the form of:
327
328{ # Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Annual commitments renew by default. Commitments can be removed after their commitment end time passes. In order to remove annual commitment, its plan needs to be changed to monthly or flex first. A capacity commitment resource exists as a child resource of the admin project.
329  &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
330  &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
331  &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. For FAILED commitment plan, provides the reason of failure.
332    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
333    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of 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;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
339  },
340  &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
341  &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
342  &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
343  &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
344  &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
345}
346
347  updateMask: string, Standard field mask for the set of fields to be updated.
348  x__xgafv: string, V1 error format.
349    Allowed values
350      1 - v1 error format
351      2 - v2 error format
352
353Returns:
354  An object of the form:
355
356    { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Annual commitments renew by default. Commitments can be removed after their commitment end time passes. In order to remove annual commitment, its plan needs to be changed to monthly or flex first. A capacity commitment resource exists as a child resource of the admin project.
357  &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
358  &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
359  &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. For FAILED commitment plan, provides the reason of failure.
360    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
361    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
362      {
363        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
364      },
365    ],
366    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
367  },
368  &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
369  &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
370  &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
371  &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
372  &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
373}</pre>
374</div>
375
376<div class="method">
377    <code class="details" id="split">split(name, body=None, x__xgafv=None)</code>
378  <pre>Splits capacity commitment to two commitments of the same plan and `commitment_end_time`. A common use case is to enable downgrading commitments. For example, in order to downgrade from 10000 slots to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you would change the plan of the first one to `FLEX` and then delete it.
379
380Args:
381  name: string, Required. The resource name e.g.,: `projects/myproject/locations/US/capacityCommitments/123` (required)
382  body: object, The request body.
383    The object takes the form of:
384
385{ # The request for ReservationService.SplitCapacityCommitment.
386  &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in the capacity commitment after the split.
387}
388
389  x__xgafv: string, V1 error format.
390    Allowed values
391      1 - v1 error format
392      2 - v2 error format
393
394Returns:
395  An object of the form:
396
397    { # The response for ReservationService.SplitCapacityCommitment.
398  &quot;first&quot;: { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Annual commitments renew by default. Commitments can be removed after their commitment end time passes. In order to remove annual commitment, its plan needs to be changed to monthly or flex first. A capacity commitment resource exists as a child resource of the admin project. # First capacity commitment, result of a split.
399    &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
400    &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
401    &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. For FAILED commitment plan, provides the reason of failure.
402      &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
403      &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
404        {
405          &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
406        },
407      ],
408      &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
409    },
410    &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
411    &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
412    &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
413    &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
414    &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
415  },
416  &quot;second&quot;: { # Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Annual commitments renew by default. Commitments can be removed after their commitment end time passes. In order to remove annual commitment, its plan needs to be changed to monthly or flex first. A capacity commitment resource exists as a child resource of the admin project. # Second capacity commitment, result of a split.
417    &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
418    &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
419    &quot;failureStatus&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. For FAILED commitment plan, provides the reason of failure.
420      &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
421      &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of 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;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
427    },
428    &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
429    &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
430    &quot;renewalPlan&quot;: &quot;A String&quot;, # The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
431    &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
432    &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
433  },
434}</pre>
435</div>
436
437</body></html>