blob: 0b610716ee1cd4ce2042d3405c0322e2d368ccac [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">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#create">create(parent, body=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, 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 Botb6971b02020-11-26 17:16:03 -080090 <code><a href="#list">list(parent, pageToken=None, pageSize=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">
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 <code class="details" id="create">create(parent, body=None, enforceSingleAdminProjectPerOrg=None, x__xgafv=None)</code>
112 <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;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -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 Bot0bf565c2020-12-09 08:56:03 -0800122 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
123 &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.
124 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
125 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
126 &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 Botb6971b02020-11-26 17:16:03 -0800127 &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.
128 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
129 {
130 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
131 },
132 ],
133 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
134 &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.
135 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800136}
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700137
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700138 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 -0700139 x__xgafv: string, V1 error format.
140 Allowed values
141 1 - v1 error format
142 2 - v2 error format
143
144Returns:
145 An object of the form:
146
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700147 { # 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 -0800148 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800149 &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 Bot0bf565c2020-12-09 08:56:03 -0800150 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
151 &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.
152 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
153 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
154 &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 Botb6971b02020-11-26 17:16:03 -0800155 &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.
156 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
157 {
158 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
159 },
160 ],
161 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
162 &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.
163 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800164 }</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700165</div>
166
167<div class="method">
168 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700169 <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 -0700170
171Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700172 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 -0700173 x__xgafv: string, V1 error format.
174 Allowed values
175 1 - v1 error format
176 2 - v2 error format
177
178Returns:
179 An object of the form:
180
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700181 { # 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 `{}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700182 }</pre>
183</div>
184
185<div class="method">
186 <code class="details" id="get">get(name, x__xgafv=None)</code>
187 <pre>Returns information about the capacity commitment.
188
189Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700190 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 -0700191 x__xgafv: string, V1 error format.
192 Allowed values
193 1 - v1 error format
194 2 - v2 error format
195
196Returns:
197 An object of the form:
198
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700199 { # 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 -0800200 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800201 &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 Bot0bf565c2020-12-09 08:56:03 -0800202 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
203 &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.
204 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
205 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
206 &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 Botb6971b02020-11-26 17:16:03 -0800207 &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.
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;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
214 &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.
215 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800216 }</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700217</div>
218
219<div class="method">
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800220 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700221 <pre>Lists all the capacity commitments for the admin project.
222
223Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700224 parent: string, Required. Resource name of the parent reservation. E.g., `projects/myproject/locations/US` (required)
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800225 pageToken: string, The next_page_token value returned from a previous List request, if any.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800226 pageSize: integer, The maximum number of items to return.
Bu Sun Kim65020912020-05-20 12:08:20 -0700227 x__xgafv: string, V1 error format.
228 Allowed values
229 1 - v1 error format
230 2 - v2 error format
231
232Returns:
233 An object of the form:
234
235 { # The response for ReservationService.ListCapacityCommitments.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700236 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700237 &quot;capacityCommitments&quot;: [ # List of capacity commitments visible to the user.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700238 { # 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 -0800239 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800240 &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 Bot0bf565c2020-12-09 08:56:03 -0800241 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
242 &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.
243 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
244 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
245 &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 Botb6971b02020-11-26 17:16:03 -0800246 &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.
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;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
253 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700254 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800255 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700256 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700257 }</pre>
258</div>
259
260<div class="method">
261 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
262 <pre>Retrieves the next page of results.
263
264Args:
265 previous_request: The request for the previous page. (required)
266 previous_response: The response from the request for the previous page. (required)
267
268Returns:
269 A request object that you can call &#x27;execute()&#x27; on to request the next
270 page. Returns None if there are no more items in the collection.
271 </pre>
272</div>
273
274<div class="method">
275 <code class="details" id="merge">merge(parent, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700276 <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 -0700277
278Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700279 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 -0700280 body: object, The request body.
281 The object takes the form of:
282
283{ # The request for ReservationService.MergeCapacityCommitments.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700284 &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
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 &quot;A String&quot;,
286 ],
287 }
288
289 x__xgafv: string, V1 error format.
290 Allowed values
291 1 - v1 error format
292 2 - v2 error format
293
294Returns:
295 An object of the form:
296
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700297 { # 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 -0800298 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800299 &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 Bot0bf565c2020-12-09 08:56:03 -0800300 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
301 &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.
302 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
303 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800305 &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.
306 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
307 {
308 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
309 },
310 ],
311 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
312 &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.
313 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800314 }</pre>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700315</div>
316
317<div class="method">
318 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700319 <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 -0700320
321Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700322 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 -0700323 body: object, The request body.
324 The object takes the form of:
325
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700326{ # 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 -0800327 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800328 &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 Bot0bf565c2020-12-09 08:56:03 -0800329 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
330 &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.
331 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
332 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
333 &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 Botb6971b02020-11-26 17:16:03 -0800334 &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.
335 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
336 {
337 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
338 },
339 ],
340 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
341 &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.
342 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800343}
Bu Sun Kim65020912020-05-20 12:08:20 -0700344
345 updateMask: string, Standard field mask for the set of fields to be updated.
346 x__xgafv: string, V1 error format.
347 Allowed values
348 1 - v1 error format
349 2 - v2 error format
350
351Returns:
352 An object of the form:
353
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700354 { # 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 -0800355 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800356 &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 Bot0bf565c2020-12-09 08:56:03 -0800357 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
358 &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.
359 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
360 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
361 &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 Botb6971b02020-11-26 17:16:03 -0800362 &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.
363 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
364 {
365 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
366 },
367 ],
368 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
369 &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.
370 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800371 }</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700372</div>
373
374<div class="method">
375 <code class="details" id="split">split(name, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700376 <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 -0700377
378Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700379 name: string, Required. The resource name e.g.,: `projects/myproject/locations/US/capacityCommitments/123` (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700380 body: object, The request body.
381 The object takes the form of:
382
383{ # The request for ReservationService.SplitCapacityCommitment.
384 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in the capacity commitment after the split.
385 }
386
387 x__xgafv: string, V1 error format.
388 Allowed values
389 1 - v1 error format
390 2 - v2 error format
391
392Returns:
393 An object of the form:
394
395 { # The response for ReservationService.SplitCapacityCommitment.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800396 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800397 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800398 &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 Bot0bf565c2020-12-09 08:56:03 -0800399 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
400 &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.
401 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
402 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
403 &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 Botb6971b02020-11-26 17:16:03 -0800404 &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.
405 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
406 {
407 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
408 },
409 ],
410 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
411 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700412 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800413 },
414 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800415 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800416 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
417 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in this commitment.
418 &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.
419 &quot;plan&quot;: &quot;A String&quot;, # Capacity commitment commitment plan.
420 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the capacity commitment, e.g., `projects/myproject/locations/US/capacityCommitments/123`
421 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
422 &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.
423 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
424 {
425 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
426 },
427 ],
428 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
429 &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.
430 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800431 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700432 }</pre>
433</div>
434
435</body></html>