blob: d90dac9f09ab38bc32148641cabe42ee7d635167 [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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
yoshi-code-botf0c2fa62021-04-23 08:24:04 -070081 <code><a href="#create">create(parent, body=None, capacityCommitmentId=None, enforceSingleAdminProjectPerOrg=None, x__xgafv=None)</a></code></p>
Bu Sun Kim65020912020-05-20 12:08:20 -070082<p class="firstline">Creates a new capacity commitment resource.</p>
83<p class="toc_element">
84 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070085<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>
Bu Sun Kim65020912020-05-20 12:08:20 -070086<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">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080090 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Bu Sun Kim65020912020-05-20 12:08:20 -070091<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>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097<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>
Bu Sun Kim65020912020-05-20 12:08:20 -070098<p class="toc_element">
99 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700100<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>
Bu Sun Kim65020912020-05-20 12:08:20 -0700101<p class="toc_element">
102 <code><a href="#split">split(name, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103<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>
Bu Sun Kim65020912020-05-20 12:08:20 -0700104<h3>Method Details</h3>
105<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106 <code class="details" id="close">close()</code>
107 <pre>Close httplib2 connections.</pre>
108</div>
109
110<div class="method">
yoshi-code-botf0c2fa62021-04-23 08:24:04 -0700111 <code class="details" id="create">create(parent, body=None, capacityCommitmentId=None, enforceSingleAdminProjectPerOrg=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700112 <pre>Creates a new capacity commitment resource.
113
114Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700115 parent: string, Required. Resource name of the parent reservation. E.g., `projects/myproject/locations/US` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700116 body: object, The request body.
117 The object takes the form of:
118
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700119{ # 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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800120 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800121 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800122 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800123 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800124 &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 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800129 &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 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800131 &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 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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800136}
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700137
yoshi-code-botf0c2fa62021-04-23 08:24:04 -0700138 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700139 enforceSingleAdminProjectPerOrg: boolean, If true, fail the request if another project in the organization has a capacity commitment.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700140 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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700148 { # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800149 &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 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>
Bu Sun Kim65020912020-05-20 12:08:20 -0700166</div>
167
168<div class="method">
169 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700170 <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`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700171
172Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700173 name: string, Required. Resource name of the capacity commitment to delete. E.g., `projects/myproject/locations/US/capacityCommitments/123` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700174 x__xgafv: string, V1 error format.
175 Allowed values
176 1 - v1 error format
177 2 - v2 error format
178
179Returns:
180 An object of the form:
181
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700182 { # 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 `{}`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800183}</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700184</div>
185
186<div class="method">
187 <code class="details" id="get">get(name, x__xgafv=None)</code>
188 <pre>Returns information about the capacity commitment.
189
190Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700191 name: string, Required. Resource name of the capacity commitment to retrieve. E.g., `projects/myproject/locations/US/capacityCommitments/123` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700192 x__xgafv: string, V1 error format.
193 Allowed values
194 1 - v1 error format
195 2 - v2 error format
196
197Returns:
198 An object of the form:
199
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700200 { # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800201 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
202 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
203 &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.
204 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
205 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
206 {
207 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
208 },
209 ],
210 &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.
211 },
212 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
213 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
214 &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.
215 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
216 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
217}</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700218</div>
219
220<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800221 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700222 <pre>Lists all the capacity commitments for the admin project.
223
224Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700225 parent: string, Required. Resource name of the parent reservation. E.g., `projects/myproject/locations/US` (required)
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800226 pageSize: integer, The maximum number of items to return.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800227 pageToken: string, The next_page_token value returned from a previous List request, if any.
Bu Sun Kim65020912020-05-20 12:08:20 -0700228 x__xgafv: string, V1 error format.
229 Allowed values
230 1 - v1 error format
231 2 - v2 error format
232
233Returns:
234 An object of the form:
235
236 { # The response for ReservationService.ListCapacityCommitments.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800237 &quot;capacityCommitments&quot;: [ # List of capacity commitments visible to the user.
238 { # 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.
239 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
240 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
241 &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.
242 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
243 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
244 {
245 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
246 },
247 ],
248 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800249 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800250 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
251 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
252 &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.
253 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
254 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
255 },
256 ],
257 &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.
258}</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700259</div>
260
261<div class="method">
262 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
263 <pre>Retrieves the next page of results.
264
265Args:
266 previous_request: The request for the previous page. (required)
267 previous_response: The response from the request for the previous page. (required)
268
269Returns:
270 A request object that you can call &#x27;execute()&#x27; on to request the next
271 page. Returns None if there are no more items in the collection.
272 </pre>
273</div>
274
275<div class="method">
276 <code class="details" id="merge">merge(parent, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700277 <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`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700278
279Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700280 parent: string, Parent resource that identifies admin project and location e.g., `projects/myproject/locations/us` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700281 body: object, The request body.
282 The object takes the form of:
283
284{ # The request for ReservationService.MergeCapacityCommitments.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800285 &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
286 &quot;A String&quot;,
287 ],
288}
Bu Sun Kim65020912020-05-20 12:08:20 -0700289
290 x__xgafv: string, V1 error format.
291 Allowed values
292 1 - v1 error format
293 2 - v2 error format
294
295Returns:
296 An object of the form:
297
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700298 { # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800299 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
300 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
301 &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.
302 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
303 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
304 {
305 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
306 },
307 ],
308 &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.
309 },
310 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
311 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
312 &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.
313 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
314 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
315}</pre>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700316</div>
317
318<div class="method">
319 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700320 <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`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700321
322Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700323 name: string, Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123` (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700324 body: object, The request body.
325 The object takes the form of:
326
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700327{ # 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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800328 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800329 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800330 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800331 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800332 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
333 {
334 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
335 },
336 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800337 &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.
338 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800339 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
340 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
341 &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.
342 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
343 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800344}
Bu Sun Kim65020912020-05-20 12:08:20 -0700345
346 updateMask: string, Standard field mask for the set of fields to be updated.
347 x__xgafv: string, V1 error format.
348 Allowed values
349 1 - v1 error format
350 2 - v2 error format
351
352Returns:
353 An object of the form:
354
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700355 { # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800356 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
357 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
358 &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.
359 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
360 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
361 {
362 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
363 },
364 ],
365 &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.
366 },
367 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
368 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
369 &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.
370 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
371 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
372}</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700373</div>
374
375<div class="method">
376 <code class="details" id="split">split(name, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700377 <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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700378
379Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700380 name: string, Required. The resource name e.g.,: `projects/myproject/locations/US/capacityCommitments/123` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700381 body: object, The request body.
382 The object takes the form of:
383
384{ # The request for ReservationService.SplitCapacityCommitment.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800385 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in the capacity commitment after the split.
386}
Bu Sun Kim65020912020-05-20 12:08:20 -0700387
388 x__xgafv: string, V1 error format.
389 Allowed values
390 1 - v1 error format
391 2 - v2 error format
392
393Returns:
394 An object of the form:
395
396 { # The response for ReservationService.SplitCapacityCommitment.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800397 &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.
398 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
399 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
400 &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.
401 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
402 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
403 {
404 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
405 },
406 ],
407 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800408 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800409 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
410 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
411 &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.
412 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
413 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
414 },
415 &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.
416 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
417 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
418 &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.
419 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
420 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
421 {
422 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
423 },
424 ],
425 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800426 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800427 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
428 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
429 &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.
430 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
431 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
432 },
433}</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700434</div>
435
436</body></html>