Debian Codegraph @

docs/dyn/bigqueryreservation_v1.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_v1.html">BigQuery Reservation API</a> . <a href="bigqueryreservation_v1.projects.html">projects</a> . <a href="bigqueryreservation_v1.projects.locations.html">locations</a> . <a href="bigqueryreservation_v1.projects.locations.capacityCommitments.html">capacityCommitments</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79 <p class="firstline">Close httplib2 connections.</p>
80 <p class="toc_element">
81 <code><a href="#create">create(parent, body=None, capacityCommitmentId=None, enforceSingleAdminProjectPerOrg=None, x__xgafv=None)</a></code></p>
82 <p class="firstline">Creates a new capacity commitment resource.</p>
83 <p class="toc_element">
84 <code><a href="#delete">delete(name, force=None, x__xgafv=None)</a></code></p>
85 <p class="firstline">Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.</p>
86 <p class="toc_element">
87 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
88 <p class="firstline">Returns information about the capacity commitment.</p>
89 <p class="toc_element">
90 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
91 <p class="firstline">Lists all the capacity commitments for the admin project.</p>
92 <p class="toc_element">
93 <code><a href="#list_next">list_next()</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. Note after renewal, commitment_end_time is the time the renewed commitment expires. So itwould be at a time after commitment_start_time + committed period, because we don&#x27;t change commitment_start_time ,
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. Note after the commitment is renewed, commitment_start_time won&#x27;t be changed. It refers to the start time of the original commitment.
122 &quot;edition&quot;: &quot;A String&quot;, # Optional. Edition of the capacity commitment.
123 &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.
124 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
125 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
126 {
127 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
128 },
129 ],
130 &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.
131 },
132 &quot;isFlatRate&quot;: True or False, # Output only. If true, the commitment is a flat-rate commitment, otherwise, it&#x27;s an edition commitment.
133 &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. NOTE: this is a preview feature. Project must be allow-listed in order to set this field.
134 &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.
135 &quot;plan&quot;: &quot;A String&quot;, # Optional. Capacity commitment commitment plan.
136 &quot;renewalPlan&quot;: &quot;A String&quot;, # Optional. The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
137 &quot;slotCount&quot;: &quot;A String&quot;, # Optional. Number of slots in this commitment.
138 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
139 }
140
141 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.
142 enforceSingleAdminProjectPerOrg: boolean, If true, fail the request if another project in the organization has a capacity commitment.
143 x__xgafv: string, V1 error format.
144 Allowed values
145 1 - v1 error format
146 2 - v2 error format
147
148 Returns:
149 An object of the form:
150
151 { # 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.
152 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after renewal, commitment_end_time is the time the renewed commitment expires. So itwould be at a time after commitment_start_time + committed period, because we don&#x27;t change commitment_start_time ,
153 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after the commitment is renewed, commitment_start_time won&#x27;t be changed. It refers to the start time of the original commitment.
154 &quot;edition&quot;: &quot;A String&quot;, # Optional. Edition of the capacity commitment.
155 &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;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
157 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
158 {
159 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
160 },
161 ],
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 },
164 &quot;isFlatRate&quot;: True or False, # Output only. If true, the commitment is a flat-rate commitment, otherwise, it&#x27;s an edition commitment.
165 &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. NOTE: this is a preview feature. Project must be allow-listed in order to set this field.
166 &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.
167 &quot;plan&quot;: &quot;A String&quot;, # Optional. Capacity commitment commitment plan.
168 &quot;renewalPlan&quot;: &quot;A String&quot;, # Optional. The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
169 &quot;slotCount&quot;: &quot;A String&quot;, # Optional. Number of slots in this commitment.
170 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
171 }</pre>
172 </div>
173
174 <div class="method">
175 <code class="details" id="delete">delete(name, force=None, x__xgafv=None)</code>
176 <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`.
177
178 Args:
179 name: string, Required. Resource name of the capacity commitment to delete. E.g., `projects/myproject/locations/US/capacityCommitments/123` (required)
180 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.
181 x__xgafv: string, V1 error format.
182 Allowed values
183 1 - v1 error format
184 2 - v2 error format
185
186 Returns:
187 An object of the form:
188
189 { # 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); }
190 }</pre>
191 </div>
192
193 <div class="method">
194 <code class="details" id="get">get(name, x__xgafv=None)</code>
195 <pre>Returns information about the capacity commitment.
196
197 Args:
198 name: string, Required. Resource name of the capacity commitment to retrieve. E.g., `projects/myproject/locations/US/capacityCommitments/123` (required)
199 x__xgafv: string, V1 error format.
200 Allowed values
201 1 - v1 error format
202 2 - v2 error format
203
204 Returns:
205 An object of the form:
206
207 { # 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.
208 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after renewal, commitment_end_time is the time the renewed commitment expires. So itwould be at a time after commitment_start_time + committed period, because we don&#x27;t change commitment_start_time ,
209 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after the commitment is renewed, commitment_start_time won&#x27;t be changed. It refers to the start time of the original commitment.
210 &quot;edition&quot;: &quot;A String&quot;, # Optional. Edition of the capacity commitment.
211 &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.
212 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
213 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
214 {
215 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
216 },
217 ],
218 &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.
219 },
220 &quot;isFlatRate&quot;: True or False, # Output only. If true, the commitment is a flat-rate commitment, otherwise, it&#x27;s an edition commitment.
221 &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. NOTE: this is a preview feature. Project must be allow-listed in order to set this field.
222 &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.
223 &quot;plan&quot;: &quot;A String&quot;, # Optional. Capacity commitment commitment plan.
224 &quot;renewalPlan&quot;: &quot;A String&quot;, # Optional. The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
225 &quot;slotCount&quot;: &quot;A String&quot;, # Optional. Number of slots in this commitment.
226 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
227 }</pre>
228 </div>
229
230 <div class="method">
231 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
232 <pre>Lists all the capacity commitments for the admin project.
233
234 Args:
235 parent: string, Required. Resource name of the parent reservation. E.g., `projects/myproject/locations/US` (required)
236 pageSize: integer, The maximum number of items to return.
237 pageToken: string, The next_page_token value returned from a previous List request, if any.
238 x__xgafv: string, V1 error format.
239 Allowed values
240 1 - v1 error format
241 2 - v2 error format
242
243 Returns:
244 An object of the form:
245
246 { # The response for ReservationService.ListCapacityCommitments.
247 &quot;capacityCommitments&quot;: [ # List of capacity commitments visible to the user.
248 { # 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.
249 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after renewal, commitment_end_time is the time the renewed commitment expires. So itwould be at a time after commitment_start_time + committed period, because we don&#x27;t change commitment_start_time ,
250 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after the commitment is renewed, commitment_start_time won&#x27;t be changed. It refers to the start time of the original commitment.
251 &quot;edition&quot;: &quot;A String&quot;, # Optional. Edition of the capacity commitment.
252 &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.
253 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
254 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
255 {
256 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
257 },
258 ],
259 &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.
260 },
261 &quot;isFlatRate&quot;: True or False, # Output only. If true, the commitment is a flat-rate commitment, otherwise, it&#x27;s an edition commitment.
262 &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. NOTE: this is a preview feature. Project must be allow-listed in order to set this field.
263 &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.
264 &quot;plan&quot;: &quot;A String&quot;, # Optional. Capacity commitment commitment plan.
265 &quot;renewalPlan&quot;: &quot;A String&quot;, # Optional. The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
266 &quot;slotCount&quot;: &quot;A String&quot;, # Optional. Number of slots in this commitment.
267 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
268 },
269 ],
270 &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.
271 }</pre>
272 </div>
273
274 <div class="method">
275 <code class="details" id="list_next">list_next()</code>
276 <pre>Retrieves the next page of results.
277
278 Args:
279 previous_request: The request for the previous page. (required)
280 previous_response: The response from the request for the previous page. (required)
281
282 Returns:
283 A request object that you can call &#x27;execute()&#x27; on to request the next
284 page. Returns None if there are no more items in the collection.
285 </pre>
286 </div>
287
288 <div class="method">
289 <code class="details" id="merge">merge(parent, body=None, x__xgafv=None)</code>
290 <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`.
291
292 Args:
293 parent: string, Parent resource that identifies admin project and location e.g., `projects/myproject/locations/us` (required)
294 body: object, The request body.
295 The object takes the form of:
296
297 { # The request for ReservationService.MergeCapacityCommitments.
298 &quot;capacityCommitmentId&quot;: &quot;A String&quot;, # Optional. The optional resulting 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.
299 &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
300 &quot;A String&quot;,
301 ],
302 }
303
304 x__xgafv: string, V1 error format.
305 Allowed values
306 1 - v1 error format
307 2 - v2 error format
308
309 Returns:
310 An object of the form:
311
312 { # 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.
313 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after renewal, commitment_end_time is the time the renewed commitment expires. So itwould be at a time after commitment_start_time + committed period, because we don&#x27;t change commitment_start_time ,
314 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after the commitment is renewed, commitment_start_time won&#x27;t be changed. It refers to the start time of the original commitment.
315 &quot;edition&quot;: &quot;A String&quot;, # Optional. Edition of the capacity commitment.
316 &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.
317 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
318 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
319 {
320 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
321 },
322 ],
323 &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.
324 },
325 &quot;isFlatRate&quot;: True or False, # Output only. If true, the commitment is a flat-rate commitment, otherwise, it&#x27;s an edition commitment.
326 &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. NOTE: this is a preview feature. Project must be allow-listed in order to set this field.
327 &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.
328 &quot;plan&quot;: &quot;A String&quot;, # Optional. Capacity commitment commitment plan.
329 &quot;renewalPlan&quot;: &quot;A String&quot;, # Optional. The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
330 &quot;slotCount&quot;: &quot;A String&quot;, # Optional. Number of slots in this commitment.
331 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
332 }</pre>
333 </div>
334
335 <div class="method">
336 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
337 <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`.
338
339 Args:
340 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)
341 body: object, The request body.
342 The object takes the form of:
343
344 { # 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.
345 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after renewal, commitment_end_time is the time the renewed commitment expires. So itwould be at a time after commitment_start_time + committed period, because we don&#x27;t change commitment_start_time ,
346 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after the commitment is renewed, commitment_start_time won&#x27;t be changed. It refers to the start time of the original commitment.
347 &quot;edition&quot;: &quot;A String&quot;, # Optional. Edition of the capacity commitment.
348 &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.
349 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
350 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
351 {
352 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
353 },
354 ],
355 &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.
356 },
357 &quot;isFlatRate&quot;: True or False, # Output only. If true, the commitment is a flat-rate commitment, otherwise, it&#x27;s an edition commitment.
358 &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. NOTE: this is a preview feature. Project must be allow-listed in order to set this field.
359 &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.
360 &quot;plan&quot;: &quot;A String&quot;, # Optional. Capacity commitment commitment plan.
361 &quot;renewalPlan&quot;: &quot;A String&quot;, # Optional. The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
362 &quot;slotCount&quot;: &quot;A String&quot;, # Optional. Number of slots in this commitment.
363 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
364 }
365
366 updateMask: string, Standard field mask for the set of fields to be updated.
367 x__xgafv: string, V1 error format.
368 Allowed values
369 1 - v1 error format
370 2 - v2 error format
371
372 Returns:
373 An object of the form:
374
375 { # 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.
376 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after renewal, commitment_end_time is the time the renewed commitment expires. So itwould be at a time after commitment_start_time + committed period, because we don&#x27;t change commitment_start_time ,
377 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after the commitment is renewed, commitment_start_time won&#x27;t be changed. It refers to the start time of the original commitment.
378 &quot;edition&quot;: &quot;A String&quot;, # Optional. Edition of the capacity commitment.
379 &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.
380 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
381 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
382 {
383 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
384 },
385 ],
386 &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.
387 },
388 &quot;isFlatRate&quot;: True or False, # Output only. If true, the commitment is a flat-rate commitment, otherwise, it&#x27;s an edition commitment.
389 &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. NOTE: this is a preview feature. Project must be allow-listed in order to set this field.
390 &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.
391 &quot;plan&quot;: &quot;A String&quot;, # Optional. Capacity commitment commitment plan.
392 &quot;renewalPlan&quot;: &quot;A String&quot;, # Optional. The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
393 &quot;slotCount&quot;: &quot;A String&quot;, # Optional. Number of slots in this commitment.
394 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
395 }</pre>
396 </div>
397
398 <div class="method">
399 <code class="details" id="split">split(name, body=None, x__xgafv=None)</code>
400 <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.
401
402 Args:
403 name: string, Required. The resource name e.g.,: `projects/myproject/locations/US/capacityCommitments/123` (required)
404 body: object, The request body.
405 The object takes the form of:
406
407 { # The request for ReservationService.SplitCapacityCommitment.
408 &quot;slotCount&quot;: &quot;A String&quot;, # Number of slots in the capacity commitment after the split.
409 }
410
411 x__xgafv: string, V1 error format.
412 Allowed values
413 1 - v1 error format
414 2 - v2 error format
415
416 Returns:
417 An object of the form:
418
419 { # The response for ReservationService.SplitCapacityCommitment.
420 &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.
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. Note after renewal, commitment_end_time is the time the renewed commitment expires. So itwould be at a time after commitment_start_time + committed period, because we don&#x27;t change commitment_start_time ,
422 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after the commitment is renewed, commitment_start_time won&#x27;t be changed. It refers to the start time of the original commitment.
423 &quot;edition&quot;: &quot;A String&quot;, # Optional. Edition of the capacity commitment.
424 &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.
425 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
426 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
427 {
428 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
429 },
430 ],
431 &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.
432 },
433 &quot;isFlatRate&quot;: True or False, # Output only. If true, the commitment is a flat-rate commitment, otherwise, it&#x27;s an edition commitment.
434 &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. NOTE: this is a preview feature. Project must be allow-listed in order to set this field.
435 &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.
436 &quot;plan&quot;: &quot;A String&quot;, # Optional. Capacity commitment commitment plan.
437 &quot;renewalPlan&quot;: &quot;A String&quot;, # Optional. The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
438 &quot;slotCount&quot;: &quot;A String&quot;, # Optional. Number of slots in this commitment.
439 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
440 },
441 &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.
442 &quot;commitmentEndTime&quot;: &quot;A String&quot;, # Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after renewal, commitment_end_time is the time the renewed commitment expires. So itwould be at a time after commitment_start_time + committed period, because we don&#x27;t change commitment_start_time ,
443 &quot;commitmentStartTime&quot;: &quot;A String&quot;, # Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments. Note after the commitment is renewed, commitment_start_time won&#x27;t be changed. It refers to the start time of the original commitment.
444 &quot;edition&quot;: &quot;A String&quot;, # Optional. Edition of the capacity commitment.
445 &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.
446 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
447 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
448 {
449 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
450 },
451 ],
452 &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.
453 },
454 &quot;isFlatRate&quot;: True or False, # Output only. If true, the commitment is a flat-rate commitment, otherwise, it&#x27;s an edition commitment.
455 &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. NOTE: this is a preview feature. Project must be allow-listed in order to set this field.
456 &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.
457 &quot;plan&quot;: &quot;A String&quot;, # Optional. Capacity commitment commitment plan.
458 &quot;renewalPlan&quot;: &quot;A String&quot;, # Optional. The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
459 &quot;slotCount&quot;: &quot;A String&quot;, # Optional. Number of slots in this commitment.
460 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the commitment.
461 },
462 }</pre>
463 </div>
464
465 </body></html>