blob: d1d85a229adea81953b9de5bbf565fef34f8371d [file] [log] [blame]
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001<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="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.regionCommitments.html">regionCommitments</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070078 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040079<p class="firstline">Retrieves an aggregated list of commitments.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
86<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040087 <code><a href="#get">get(project, region, commitment)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns the specified commitment resource. Gets a list of available commitments by making a list() request.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040091<p class="firstline">Creates a commitment in the specified project using the data included in the request.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040092<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070093 <code><a href="#list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040094<p class="firstline">Retrieves a list of commitments contained within the specified region.</p>
95<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400100<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#updateReservations">updateReservations(project, region, commitment, body=None, requestId=None)</a></code></p>
103<p class="firstline">Transfers GPUs or local SSDs between reservations within commitments.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400104<h3>Method Details</h3>
105<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700106 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400107 <pre>Retrieves an aggregated list of commitments.
108
109Args:
110 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400112
Dan O'Mearadd494642020-05-01 07:42:23 -0700113For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400114
Dan O'Mearadd494642020-05-01 07:42:23 -0700115You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400116
Bu Sun Kim65020912020-05-20 12:08:20 -0700117To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700118 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700119 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
120 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
121
122You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
123
124Currently, only sorting by `name` or `creationTimestamp desc` is supported.
125 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
126 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400127
128Returns:
129 An object of the form:
130
131 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700132 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
133 &quot;items&quot;: { # A list of CommitmentsScopedList resources.
134 &quot;a_key&quot;: { # [Output Only] Name of the scope containing this set of commitments.
135 &quot;commitments&quot;: [ # [Output Only] A list of commitments contained in this scope.
136 { # Represents a regional Commitment resource.
137 #
138 # Creating a commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts. (== resource_for {$api_version}.regionCommitments ==)
139 &quot;category&quot;: &quot;A String&quot;, # The category of the commitment. Category MACHINE specifies commitments composed of machine resources such as VCPU or MEMORY, listed in resources. Category LICENSE specifies commitments composed of software licenses, listed in licenseResources. Note that only MACHINE commitments should have a Type specified.
140 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
141 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
142 &quot;endTimestamp&quot;: &quot;A String&quot;, # [Output Only] Commitment end time in RFC3339 text format.
143 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
144 &quot;kind&quot;: &quot;compute#commitment&quot;, # [Output Only] Type of the resource. Always compute#commitment for commitments.
145 &quot;licenseResource&quot;: { # Commitment for a particular license resource. # The license specification required as part of a license commitment.
146 &quot;amount&quot;: &quot;A String&quot;, # The number of licenses purchased.
147 &quot;coresPerLicense&quot;: &quot;A String&quot;, # Specifies the core range of the instance for which this license applies.
148 &quot;license&quot;: &quot;A String&quot;, # Any applicable license URI.
149 },
150 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
151 &quot;plan&quot;: &quot;A String&quot;, # The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).
152 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where this commitment may be used.
153 &quot;reservations&quot;: [ # List of reservations in this commitment.
154 { # Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. (== resource_for {$api_version}.reservations ==)
155 &quot;commitment&quot;: &quot;A String&quot;, # [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
156 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
157 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
158 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
159 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
160 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
161 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
162 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
163 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
164 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
165 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700166 &quot;instanceProperties&quot;: { # Properties of the SKU instances being reserved. Next ID: 9 # The instance properties for the reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700167 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
168 { # A specification of the type and number of accelerator cards attached to the instance.
169 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
170 &quot;acceleratorType&quot;: &quot;A String&quot;, # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
171 },
172 ],
173 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
174 {
175 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
176 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
177 },
178 ],
179 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700180 &quot;machineType&quot;: &quot;A String&quot;, # Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700181 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after reservation creation where instances using the reservation won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700182 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
183 },
184 },
185 &quot;specificReservationRequired&quot;: True or False, # Indicates whether the reservation can be consumed by VMs with affinity for &quot;any&quot; reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
186 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
187 &quot;zone&quot;: &quot;A String&quot;, # Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
188 },
189 ],
190 &quot;resources&quot;: [ # A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.
191 { # Commitment for a particular resource (a Commitment is composed of one or more of these).
192 &quot;acceleratorType&quot;: &quot;A String&quot;, # Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
193 &quot;amount&quot;: &quot;A String&quot;, # The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
194 &quot;type&quot;: &quot;A String&quot;, # Type of resource for which this commitment applies. Possible values are VCPU and MEMORY
195 },
196 ],
197 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
198 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
199 &quot;startTimestamp&quot;: &quot;A String&quot;, # [Output Only] Commitment start time in RFC3339 text format.
200 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.
201 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700202 &quot;type&quot;: &quot;A String&quot;, # The type of commitment, which affects the discount rate and the eligible resources. Type MEMORY_OPTIMIZED specifies a commitment that will only apply to memory optimized machines. Type ACCELERATOR_OPTIMIZED specifies a commitment that will only apply to accelerator optimized machines.
Bu Sun Kim65020912020-05-20 12:08:20 -0700203 },
204 ],
205 &quot;warning&quot;: { # [Output Only] Informational warning which replaces the list of commitments when the list is empty.
206 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
207 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
208 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400209 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700210 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
211 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400212 },
213 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700214 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400215 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400216 },
217 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700218 &quot;kind&quot;: &quot;compute#commitmentAggregatedList&quot;, # [Output Only] Type of resource. Always compute#commitmentAggregatedList for aggregated lists of commitments.
219 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
220 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
221 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
222 &quot;A String&quot;,
223 ],
224 &quot;warning&quot;: { # [Output Only] Informational warning message.
225 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
226 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
227 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700228 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700229 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
230 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700231 },
232 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700233 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700234 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400235 }</pre>
236</div>
237
238<div class="method">
239 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
240 <pre>Retrieves the next page of results.
241
242Args:
243 previous_request: The request for the previous page. (required)
244 previous_response: The response from the request for the previous page. (required)
245
246Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700247 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400248 page. Returns None if there are no more items in the collection.
249 </pre>
250</div>
251
252<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700253 <code class="details" id="close">close()</code>
254 <pre>Close httplib2 connections.</pre>
255</div>
256
257<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400258 <code class="details" id="get">get(project, region, commitment)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 <pre>Returns the specified commitment resource. Gets a list of available commitments by making a list() request.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400260
261Args:
262 project: string, Project ID for this request. (required)
263 region: string, Name of the region for this request. (required)
264 commitment: string, Name of the commitment to return. (required)
265
266Returns:
267 An object of the form:
268
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700269 { # Represents a regional Commitment resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700270 #
271 # Creating a commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts. (== resource_for {$api_version}.regionCommitments ==)
272 &quot;category&quot;: &quot;A String&quot;, # The category of the commitment. Category MACHINE specifies commitments composed of machine resources such as VCPU or MEMORY, listed in resources. Category LICENSE specifies commitments composed of software licenses, listed in licenseResources. Note that only MACHINE commitments should have a Type specified.
273 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
274 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
275 &quot;endTimestamp&quot;: &quot;A String&quot;, # [Output Only] Commitment end time in RFC3339 text format.
276 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
277 &quot;kind&quot;: &quot;compute#commitment&quot;, # [Output Only] Type of the resource. Always compute#commitment for commitments.
278 &quot;licenseResource&quot;: { # Commitment for a particular license resource. # The license specification required as part of a license commitment.
279 &quot;amount&quot;: &quot;A String&quot;, # The number of licenses purchased.
280 &quot;coresPerLicense&quot;: &quot;A String&quot;, # Specifies the core range of the instance for which this license applies.
281 &quot;license&quot;: &quot;A String&quot;, # Any applicable license URI.
282 },
283 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
284 &quot;plan&quot;: &quot;A String&quot;, # The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).
285 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where this commitment may be used.
286 &quot;reservations&quot;: [ # List of reservations in this commitment.
287 { # Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. (== resource_for {$api_version}.reservations ==)
288 &quot;commitment&quot;: &quot;A String&quot;, # [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
289 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
290 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
291 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
292 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
293 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
294 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
295 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
296 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
297 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
298 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700299 &quot;instanceProperties&quot;: { # Properties of the SKU instances being reserved. Next ID: 9 # The instance properties for the reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700300 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
301 { # A specification of the type and number of accelerator cards attached to the instance.
302 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
303 &quot;acceleratorType&quot;: &quot;A String&quot;, # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
304 },
305 ],
306 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
307 {
308 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
309 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
310 },
311 ],
312 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700313 &quot;machineType&quot;: &quot;A String&quot;, # Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700314 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after reservation creation where instances using the reservation won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700315 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700316 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700317 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700318 &quot;specificReservationRequired&quot;: True or False, # Indicates whether the reservation can be consumed by VMs with affinity for &quot;any&quot; reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
319 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
320 &quot;zone&quot;: &quot;A String&quot;, # Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
Dan O'Mearadd494642020-05-01 07:42:23 -0700321 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700322 ],
323 &quot;resources&quot;: [ # A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.
324 { # Commitment for a particular resource (a Commitment is composed of one or more of these).
325 &quot;acceleratorType&quot;: &quot;A String&quot;, # Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
326 &quot;amount&quot;: &quot;A String&quot;, # The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
327 &quot;type&quot;: &quot;A String&quot;, # Type of resource for which this commitment applies. Possible values are VCPU and MEMORY
328 },
329 ],
330 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
331 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
332 &quot;startTimestamp&quot;: &quot;A String&quot;, # [Output Only] Commitment start time in RFC3339 text format.
333 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.
334 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700335 &quot;type&quot;: &quot;A String&quot;, # The type of commitment, which affects the discount rate and the eligible resources. Type MEMORY_OPTIMIZED specifies a commitment that will only apply to memory optimized machines. Type ACCELERATOR_OPTIMIZED specifies a commitment that will only apply to accelerator optimized machines.
Bu Sun Kim65020912020-05-20 12:08:20 -0700336 }</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400337</div>
338
339<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700340 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400341 <pre>Creates a commitment in the specified project using the data included in the request.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400342
343Args:
344 project: string, Project ID for this request. (required)
345 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700346 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400347 The object takes the form of:
348
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700349{ # Represents a regional Commitment resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700350 #
351 # Creating a commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts. (== resource_for {$api_version}.regionCommitments ==)
352 &quot;category&quot;: &quot;A String&quot;, # The category of the commitment. Category MACHINE specifies commitments composed of machine resources such as VCPU or MEMORY, listed in resources. Category LICENSE specifies commitments composed of software licenses, listed in licenseResources. Note that only MACHINE commitments should have a Type specified.
353 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
354 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
355 &quot;endTimestamp&quot;: &quot;A String&quot;, # [Output Only] Commitment end time in RFC3339 text format.
356 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
357 &quot;kind&quot;: &quot;compute#commitment&quot;, # [Output Only] Type of the resource. Always compute#commitment for commitments.
358 &quot;licenseResource&quot;: { # Commitment for a particular license resource. # The license specification required as part of a license commitment.
359 &quot;amount&quot;: &quot;A String&quot;, # The number of licenses purchased.
360 &quot;coresPerLicense&quot;: &quot;A String&quot;, # Specifies the core range of the instance for which this license applies.
361 &quot;license&quot;: &quot;A String&quot;, # Any applicable license URI.
362 },
363 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
364 &quot;plan&quot;: &quot;A String&quot;, # The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).
365 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where this commitment may be used.
366 &quot;reservations&quot;: [ # List of reservations in this commitment.
367 { # Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. (== resource_for {$api_version}.reservations ==)
368 &quot;commitment&quot;: &quot;A String&quot;, # [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
369 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
370 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
371 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
372 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
373 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
374 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
375 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
376 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
377 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
378 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700379 &quot;instanceProperties&quot;: { # Properties of the SKU instances being reserved. Next ID: 9 # The instance properties for the reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700380 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
381 { # A specification of the type and number of accelerator cards attached to the instance.
382 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
383 &quot;acceleratorType&quot;: &quot;A String&quot;, # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
384 },
385 ],
386 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
387 {
388 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
389 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
390 },
391 ],
392 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700393 &quot;machineType&quot;: &quot;A String&quot;, # Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700394 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after reservation creation where instances using the reservation won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700395 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700396 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700397 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700398 &quot;specificReservationRequired&quot;: True or False, # Indicates whether the reservation can be consumed by VMs with affinity for &quot;any&quot; reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
399 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
400 &quot;zone&quot;: &quot;A String&quot;, # Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
Dan O'Mearadd494642020-05-01 07:42:23 -0700401 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700402 ],
403 &quot;resources&quot;: [ # A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.
404 { # Commitment for a particular resource (a Commitment is composed of one or more of these).
405 &quot;acceleratorType&quot;: &quot;A String&quot;, # Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
406 &quot;amount&quot;: &quot;A String&quot;, # The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
407 &quot;type&quot;: &quot;A String&quot;, # Type of resource for which this commitment applies. Possible values are VCPU and MEMORY
408 },
409 ],
410 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
411 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
412 &quot;startTimestamp&quot;: &quot;A String&quot;, # [Output Only] Commitment start time in RFC3339 text format.
413 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.
414 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700415 &quot;type&quot;: &quot;A String&quot;, # The type of commitment, which affects the discount rate and the eligible resources. Type MEMORY_OPTIMIZED specifies a commitment that will only apply to memory optimized machines. Type ACCELERATOR_OPTIMIZED specifies a commitment that will only apply to accelerator optimized machines.
Bu Sun Kim65020912020-05-20 12:08:20 -0700416}
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400417
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400418 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
419
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700420For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
421
422The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400423
424Returns:
425 An object of the form:
426
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427 { # Represents an Operation resource.
428 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700429 # Google Compute Engine has three Operation resources:
430 #
431 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
432 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700433 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
434 #
435 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700436 # - For global operations, use the `globalOperations` resource.
437 # - For regional operations, use the `regionOperations` resource.
438 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700439 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700440 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700441 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
442 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
443 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
444 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
445 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
446 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400447 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700448 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
449 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
450 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400451 },
452 ],
453 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700454 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
455 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
456 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
457 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
458 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
459 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
460 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
461 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
462 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
463 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
464 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
465 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
466 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
467 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
468 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
469 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
470 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
471 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
472 {
473 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
474 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
475 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
476 {
477 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
478 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
479 },
480 ],
481 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
482 },
483 ],
484 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400485 }</pre>
486</div>
487
488<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700489 <code class="details" id="list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400490 <pre>Retrieves a list of commitments contained within the specified region.
491
492Args:
493 project: string, Project ID for this request. (required)
494 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700495 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400496
Dan O'Mearadd494642020-05-01 07:42:23 -0700497For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400498
Dan O'Mearadd494642020-05-01 07:42:23 -0700499You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400500
Bu Sun Kim65020912020-05-20 12:08:20 -0700501To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
502 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
503 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
504
505You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
506
507Currently, only sorting by `name` or `creationTimestamp desc` is supported.
508 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
509 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400510
511Returns:
512 An object of the form:
513
514 { # Contains a list of Commitment resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700515 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
516 &quot;items&quot;: [ # A list of Commitment resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700517 { # Represents a regional Commitment resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700518 #
519 # Creating a commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts. (== resource_for {$api_version}.regionCommitments ==)
520 &quot;category&quot;: &quot;A String&quot;, # The category of the commitment. Category MACHINE specifies commitments composed of machine resources such as VCPU or MEMORY, listed in resources. Category LICENSE specifies commitments composed of software licenses, listed in licenseResources. Note that only MACHINE commitments should have a Type specified.
521 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
522 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
523 &quot;endTimestamp&quot;: &quot;A String&quot;, # [Output Only] Commitment end time in RFC3339 text format.
524 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
525 &quot;kind&quot;: &quot;compute#commitment&quot;, # [Output Only] Type of the resource. Always compute#commitment for commitments.
526 &quot;licenseResource&quot;: { # Commitment for a particular license resource. # The license specification required as part of a license commitment.
527 &quot;amount&quot;: &quot;A String&quot;, # The number of licenses purchased.
528 &quot;coresPerLicense&quot;: &quot;A String&quot;, # Specifies the core range of the instance for which this license applies.
529 &quot;license&quot;: &quot;A String&quot;, # Any applicable license URI.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400530 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700531 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
532 &quot;plan&quot;: &quot;A String&quot;, # The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).
533 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where this commitment may be used.
534 &quot;reservations&quot;: [ # List of reservations in this commitment.
535 { # Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. (== resource_for {$api_version}.reservations ==)
536 &quot;commitment&quot;: &quot;A String&quot;, # [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
537 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
538 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
539 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
540 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
541 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
542 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
543 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
544 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
545 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
546 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700547 &quot;instanceProperties&quot;: { # Properties of the SKU instances being reserved. Next ID: 9 # The instance properties for the reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700548 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
549 { # A specification of the type and number of accelerator cards attached to the instance.
550 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
551 &quot;acceleratorType&quot;: &quot;A String&quot;, # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
552 },
553 ],
554 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
555 {
556 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
557 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
558 },
559 ],
560 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700561 &quot;machineType&quot;: &quot;A String&quot;, # Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700562 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after reservation creation where instances using the reservation won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700563 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
564 },
565 },
566 &quot;specificReservationRequired&quot;: True or False, # Indicates whether the reservation can be consumed by VMs with affinity for &quot;any&quot; reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
567 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
568 &quot;zone&quot;: &quot;A String&quot;, # Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
569 },
570 ],
571 &quot;resources&quot;: [ # A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.
572 { # Commitment for a particular resource (a Commitment is composed of one or more of these).
573 &quot;acceleratorType&quot;: &quot;A String&quot;, # Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
574 &quot;amount&quot;: &quot;A String&quot;, # The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
575 &quot;type&quot;: &quot;A String&quot;, # Type of resource for which this commitment applies. Possible values are VCPU and MEMORY
576 },
577 ],
578 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
579 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
580 &quot;startTimestamp&quot;: &quot;A String&quot;, # [Output Only] Commitment start time in RFC3339 text format.
581 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.
582 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700583 &quot;type&quot;: &quot;A String&quot;, # The type of commitment, which affects the discount rate and the eligible resources. Type MEMORY_OPTIMIZED specifies a commitment that will only apply to memory optimized machines. Type ACCELERATOR_OPTIMIZED specifies a commitment that will only apply to accelerator optimized machines.
Bu Sun Kim65020912020-05-20 12:08:20 -0700584 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400585 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700586 &quot;kind&quot;: &quot;compute#commitmentList&quot;, # [Output Only] Type of resource. Always compute#commitmentList for lists of commitments.
587 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
588 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
589 &quot;warning&quot;: { # [Output Only] Informational warning message.
590 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
591 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
592 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700593 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700594 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
595 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700596 },
597 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700598 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700599 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400600 }</pre>
601</div>
602
603<div class="method">
604 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
605 <pre>Retrieves the next page of results.
606
607Args:
608 previous_request: The request for the previous page. (required)
609 previous_response: The response from the request for the previous page. (required)
610
611Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700612 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400613 page. Returns None if there are no more items in the collection.
614 </pre>
615</div>
616
617<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700618 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400619 <pre>Returns permissions that a caller has on the specified resource.
620
621Args:
622 project: string, Project ID for this request. (required)
623 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700624 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700625 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400626 The object takes the form of:
627
628{
Bu Sun Kim65020912020-05-20 12:08:20 -0700629 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
630 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400631 ],
632 }
633
634
635Returns:
636 An object of the form:
637
638 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700639 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
640 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400641 ],
642 }</pre>
643</div>
644
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700645<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700646 <code class="details" id="updateReservations">updateReservations(project, region, commitment, body=None, requestId=None)</code>
647 <pre>Transfers GPUs or local SSDs between reservations within commitments.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700648
649Args:
650 project: string, Project ID for this request. (required)
651 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700652 commitment: string, Name of the commitment for which the reservation is being updated. (required)
653 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700654 The object takes the form of:
655
656{
Bu Sun Kim65020912020-05-20 12:08:20 -0700657 &quot;reservations&quot;: [ # A list of two reservations to transfer GPUs and local SSD between.
Dan O'Mearadd494642020-05-01 07:42:23 -0700658 { # Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. (== resource_for {$api_version}.reservations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700659 &quot;commitment&quot;: &quot;A String&quot;, # [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
660 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
661 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
662 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
663 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
664 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
665 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
666 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
667 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
668 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
669 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700670 &quot;instanceProperties&quot;: { # Properties of the SKU instances being reserved. Next ID: 9 # The instance properties for the reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700671 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
672 { # A specification of the type and number of accelerator cards attached to the instance.
673 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
674 &quot;acceleratorType&quot;: &quot;A String&quot;, # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
675 },
676 ],
677 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
678 {
679 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
680 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
681 },
682 ],
683 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700684 &quot;machineType&quot;: &quot;A String&quot;, # Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700685 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after reservation creation where instances using the reservation won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700686 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700687 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700688 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700689 &quot;specificReservationRequired&quot;: True or False, # Indicates whether the reservation can be consumed by VMs with affinity for &quot;any&quot; reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
690 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
691 &quot;zone&quot;: &quot;A String&quot;, # Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700692 },
693 ],
694 }
695
696 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
697
698For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
699
700The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
701
702Returns:
703 An object of the form:
704
705 { # Represents an Operation resource.
706 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700707 # Google Compute Engine has three Operation resources:
708 #
709 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
710 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700711 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
712 #
713 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700714 # - For global operations, use the `globalOperations` resource.
715 # - For regional operations, use the `regionOperations` resource.
716 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700717 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700718 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
720 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
721 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
722 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
723 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
724 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700725 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700726 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
727 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
728 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700729 },
730 ],
731 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700732 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
733 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
734 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
735 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
736 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
737 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
738 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
739 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
740 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
741 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
742 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
743 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
744 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
745 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
746 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
747 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
748 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
749 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
750 {
751 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
752 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
753 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
754 {
755 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
756 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
757 },
758 ],
759 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
760 },
761 ],
762 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700763 }</pre>
764</div>
765
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400766</body></html>