Debian Codegraph @

docs/dyn/bigqueryreservation_v1beta1.projects.locations.capacityCommitments.html

raw
1 <html><body>
2 <style>
3
4 body, 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
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, 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="#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()</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 delete the first one after the commitment end time passes.</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
114 Args:
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;multiRegionAuxiliary&quot;: True or False, # Applicable only for commitments located within one of the BigQuery multi-regions (US or EU). If set to true, this commitment is placed in the organization&#x27;s secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization&#x27;s default region.
132 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123` The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
133 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
134 &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 commitments.
135 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
136 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
137 }
138
139 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 dashes. The first and last character cannot be a dash. Max length is 64 characters. NOTE: this ID won&#x27;t be kept if the capacity commitment is split or merged.
140 enforceSingleAdminProjectPerOrg: boolean, If true, fail the request if another project in the organization has a capacity commitment.
141 x__xgafv: string, V1 error format.
142 Allowed values
143 1 - v1 error format
144 2 - v2 error format
145
146 Returns:
147 An object of the form:
148
149 { # 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.
150 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
151 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
152 &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.
153 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
154 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
155 {
156 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
157 },
158 ],
159 &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.
160 },
161 &quot;multiRegionAuxiliary&quot;: True or False, # Applicable only for commitments located within one of the BigQuery multi-regions (US or EU). If set to true, this commitment is placed in the organization&#x27;s secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization&#x27;s default region.
162 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123` The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
163 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
164 &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 commitments.
165 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
166 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
167 }</pre>
168 </div>
169
170 <div class="method">
171 <code class="details" id="delete">delete(name, force=None, x__xgafv=None)</code>
172 <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`.
173
174 Args:
175 name: string, Required. Resource name of the capacity commitment to delete. E.g., `projects/myproject/locations/US/capacityCommitments/123` (required)
176 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.
177 x__xgafv: string, V1 error format.
178 Allowed values
179 1 - v1 error format
180 2 - v2 error format
181
182 Returns:
183 An object of the form:
184
185 { # 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); }
186 }</pre>
187 </div>
188
189 <div class="method">
190 <code class="details" id="get">get(name, x__xgafv=None)</code>
191 <pre>Returns information about the capacity commitment.
192
193 Args:
194 name: string, Required. Resource name of the capacity commitment to retrieve. E.g., `projects/myproject/locations/US/capacityCommitments/123` (required)
195 x__xgafv: string, V1 error format.
196 Allowed values
197 1 - v1 error format
198 2 - v2 error format
199
200 Returns:
201 An object of the form:
202
203 { # 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.
204 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
205 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
206 &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.
207 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
208 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
209 {
210 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
211 },
212 ],
213 &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.
214 },
215 &quot;multiRegionAuxiliary&quot;: True or False, # Applicable only for commitments located within one of the BigQuery multi-regions (US or EU). If set to true, this commitment is placed in the organization&#x27;s secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization&#x27;s default region.
216 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123` The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
217 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
218 &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 commitments.
219 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
220 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
221 }</pre>
222 </div>
223
224 <div class="method">
225 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
226 <pre>Lists all the capacity commitments for the admin project.
227
228 Args:
229 parent: string, Required. Resource name of the parent reservation. E.g., `projects/myproject/locations/US` (required)
230 pageSize: integer, The maximum number of items to return.
231 pageToken: string, The next_page_token value returned from a previous List request, if any.
232 x__xgafv: string, V1 error format.
233 Allowed values
234 1 - v1 error format
235 2 - v2 error format
236
237 Returns:
238 An object of the form:
239
240 { # The response for ReservationService.ListCapacityCommitments.
241 &quot;capacityCommitments&quot;: [ # List of capacity commitments visible to the user.
242 { # 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.
243 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
244 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
245 &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.
246 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
247 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
248 {
249 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
250 },
251 ],
252 &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.
253 },
254 &quot;multiRegionAuxiliary&quot;: True or False, # Applicable only for commitments located within one of the BigQuery multi-regions (US or EU). If set to true, this commitment is placed in the organization&#x27;s secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization&#x27;s default region.
255 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123` The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
256 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
257 &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 commitments.
258 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
259 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
260 },
261 ],
262 &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.
263 }</pre>
264 </div>
265
266 <div class="method">
267 <code class="details" id="list_next">list_next()</code>
268 <pre>Retrieves the next page of results.
269
270 Args:
271 previous_request: The request for the previous page. (required)
272 previous_response: The response from the request for the previous page. (required)
273
274 Returns:
275 A request object that you can call &#x27;execute()&#x27; on to request the next
276 page. Returns None if there are no more items in the collection.
277 </pre>
278 </div>
279
280 <div class="method">
281 <code class="details" id="merge">merge(parent, body=None, x__xgafv=None)</code>
282 <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`.
283
284 Args:
285 parent: string, Parent resource that identifies admin project and location e.g., `projects/myproject/locations/us` (required)
286 body: object, The request body.
287 The object takes the form of:
288
289 { # The request for ReservationService.MergeCapacityCommitments.
290 &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
291 &quot;A String&quot;,
292 ],
293 }
294
295 x__xgafv: string, V1 error format.
296 Allowed values
297 1 - v1 error format
298 2 - v2 error format
299
300 Returns:
301 An object of the form:
302
303 { # 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.
304 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
305 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
306 &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.
307 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
308 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
309 {
310 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
311 },
312 ],
313 &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.
314 },
315 &quot;multiRegionAuxiliary&quot;: True or False, # Applicable only for commitments located within one of the BigQuery multi-regions (US or EU). If set to true, this commitment is placed in the organization&#x27;s secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization&#x27;s default region.
316 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123` The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
317 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
318 &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 commitments.
319 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
320 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
321 }</pre>
322 </div>
323
324 <div class="method">
325 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
326 <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`.
327
328 Args:
329 name: string, Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123` The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters. (required)
330 body: object, The request body.
331 The object takes the form of:
332
333 { # 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.
334 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
335 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
336 &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.
337 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
338 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
339 {
340 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
341 },
342 ],
343 &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.
344 },
345 &quot;multiRegionAuxiliary&quot;: True or False, # Applicable only for commitments located within one of the BigQuery multi-regions (US or EU). If set to true, this commitment is placed in the organization&#x27;s secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization&#x27;s default region.
346 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123` The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
347 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
348 &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 commitments.
349 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
350 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
351 }
352
353 updateMask: string, Standard field mask for the set of fields to be updated.
354 x__xgafv: string, V1 error format.
355 Allowed values
356 1 - v1 error format
357 2 - v2 error format
358
359 Returns:
360 An object of the form:
361
362 { # 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.
363 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
364 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
365 &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.
366 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
367 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
368 {
369 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
370 },
371 ],
372 &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.
373 },
374 &quot;multiRegionAuxiliary&quot;: True or False, # Applicable only for commitments located within one of the BigQuery multi-regions (US or EU). If set to true, this commitment is placed in the organization&#x27;s secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization&#x27;s default region.
375 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123` The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
376 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
377 &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 commitments.
378 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
379 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
380 }</pre>
381 </div>
382
383 <div class="method">
384 <code class="details" id="split">split(name, body=None, x__xgafv=None)</code>
385 <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 delete the first one after the commitment end time passes.
386
387 Args:
388 name: string, Required. The resource name e.g.,: `projects/myproject/locations/US/capacityCommitments/123` (required)
389 body: object, The request body.
390 The object takes the form of:
391
392 { # The request for ReservationService.SplitCapacityCommitment.
393 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in the capacity commitment after the split.
394 }
395
396 x__xgafv: string, V1 error format.
397 Allowed values
398 1 - v1 error format
399 2 - v2 error format
400
401 Returns:
402 An object of the form:
403
404 { # The response for ReservationService.SplitCapacityCommitment.
405 &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.
406 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
407 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
408 &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.
409 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
410 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
411 {
412 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
413 },
414 ],
415 &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.
416 },
417 &quot;multiRegionAuxiliary&quot;: True or False, # Applicable only for commitments located within one of the BigQuery multi-regions (US or EU). If set to true, this commitment is placed in the organization&#x27;s secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization&#x27;s default region.
418 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123` The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
419 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
420 &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 commitments.
421 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
422 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
423 },
424 &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.
425 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
426 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
427 &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.
428 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
429 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
430 {
431 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
432 },
433 ],
434 &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.
435 },
436 &quot;multiRegionAuxiliary&quot;: True or False, # Applicable only for commitments located within one of the BigQuery multi-regions (US or EU). If set to true, this commitment is placed in the organization&#x27;s secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization&#x27;s default region.
437 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123` The commitment_id must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
438 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
439 &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 commitments.
440 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
441 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
442 },
443 }</pre>
444 </div>
445
446 </body></html>