blob: 96048b2523b8115bca6ec46c27ee99969650f9c5 [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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700163 &quot;shareSettings&quot;: { # Share-settings for shared-reservation
164 &quot;shareType&quot;: &quot;A String&quot;, # Type of sharing for this shared-reservation
165 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700166 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
167 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
168 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700169 &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 -0700170 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
171 { # A specification of the type and number of accelerator cards attached to the instance.
172 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
173 &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.
174 },
175 ],
176 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
177 {
178 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
179 &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.
180 },
181 ],
182 &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 -0700183 &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 -0700184 &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 Kim673ec5c2020-11-16 11:05:03 -0700185 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # Specifies whether this VM may be a stable fleet VM. Setting this to &quot;Periodic&quot; designates this VM as a Stable Fleet VM.
186 #
187 # See go/stable-fleet-ug for more details.
Bu Sun Kim65020912020-05-20 12:08:20 -0700188 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
189 },
190 },
191 &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.
192 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
193 &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.
194 },
195 ],
196 &quot;resources&quot;: [ # A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.
197 { # Commitment for a particular resource (a Commitment is composed of one or more of these).
198 &quot;acceleratorType&quot;: &quot;A String&quot;, # Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
199 &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.
200 &quot;type&quot;: &quot;A String&quot;, # Type of resource for which this commitment applies. Possible values are VCPU and MEMORY
201 },
202 ],
203 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
204 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
205 &quot;startTimestamp&quot;: &quot;A String&quot;, # [Output Only] Commitment start time in RFC3339 text format.
206 &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.
207 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700208 &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 -0700209 },
210 ],
211 &quot;warning&quot;: { # [Output Only] Informational warning which replaces the list of commitments when the list is empty.
212 &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.
213 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
214 # &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 -0400215 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700216 &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).
217 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400218 },
219 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700220 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400221 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400222 },
223 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700224 &quot;kind&quot;: &quot;compute#commitmentAggregatedList&quot;, # [Output Only] Type of resource. Always compute#commitmentAggregatedList for aggregated lists of commitments.
225 &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.
226 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
227 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
228 &quot;A String&quot;,
229 ],
230 &quot;warning&quot;: { # [Output Only] Informational warning message.
231 &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.
232 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
233 # &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 -0700234 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700235 &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).
236 &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 -0700237 },
238 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700239 &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 -0700240 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400241 }</pre>
242</div>
243
244<div class="method">
245 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
246 <pre>Retrieves the next page of results.
247
248Args:
249 previous_request: The request for the previous page. (required)
250 previous_response: The response from the request for the previous page. (required)
251
252Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700253 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400254 page. Returns None if there are no more items in the collection.
255 </pre>
256</div>
257
258<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700259 <code class="details" id="close">close()</code>
260 <pre>Close httplib2 connections.</pre>
261</div>
262
263<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400264 <code class="details" id="get">get(project, region, commitment)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700265 <pre>Returns the specified commitment resource. Gets a list of available commitments by making a list() request.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400266
267Args:
268 project: string, Project ID for this request. (required)
269 region: string, Name of the region for this request. (required)
270 commitment: string, Name of the commitment to return. (required)
271
272Returns:
273 An object of the form:
274
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700275 { # Represents a regional Commitment resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700276 #
277 # 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 ==)
278 &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.
279 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
280 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
281 &quot;endTimestamp&quot;: &quot;A String&quot;, # [Output Only] Commitment end time in RFC3339 text format.
282 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
283 &quot;kind&quot;: &quot;compute#commitment&quot;, # [Output Only] Type of the resource. Always compute#commitment for commitments.
284 &quot;licenseResource&quot;: { # Commitment for a particular license resource. # The license specification required as part of a license commitment.
285 &quot;amount&quot;: &quot;A String&quot;, # The number of licenses purchased.
286 &quot;coresPerLicense&quot;: &quot;A String&quot;, # Specifies the core range of the instance for which this license applies.
287 &quot;license&quot;: &quot;A String&quot;, # Any applicable license URI.
288 },
289 &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.
290 &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).
291 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where this commitment may be used.
292 &quot;reservations&quot;: [ # List of reservations in this commitment.
293 { # 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 ==)
294 &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.
295 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
296 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
297 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
298 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
299 &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.
300 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
301 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700302 &quot;shareSettings&quot;: { # Share-settings for shared-reservation
303 &quot;shareType&quot;: &quot;A String&quot;, # Type of sharing for this shared-reservation
304 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700305 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
306 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
307 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700308 &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 -0700309 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
310 { # A specification of the type and number of accelerator cards attached to the instance.
311 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
312 &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.
313 },
314 ],
315 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
316 {
317 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
318 &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.
319 },
320 ],
321 &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 -0700322 &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 -0700323 &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 Kim673ec5c2020-11-16 11:05:03 -0700324 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # Specifies whether this VM may be a stable fleet VM. Setting this to &quot;Periodic&quot; designates this VM as a Stable Fleet VM.
325 #
326 # See go/stable-fleet-ug for more details.
Bu Sun Kim65020912020-05-20 12:08:20 -0700327 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700328 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700329 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700330 &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.
331 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
332 &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 -0700333 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700334 ],
335 &quot;resources&quot;: [ # A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.
336 { # Commitment for a particular resource (a Commitment is composed of one or more of these).
337 &quot;acceleratorType&quot;: &quot;A String&quot;, # Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
338 &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.
339 &quot;type&quot;: &quot;A String&quot;, # Type of resource for which this commitment applies. Possible values are VCPU and MEMORY
340 },
341 ],
342 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
343 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
344 &quot;startTimestamp&quot;: &quot;A String&quot;, # [Output Only] Commitment start time in RFC3339 text format.
345 &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.
346 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700347 &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 -0700348 }</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400349</div>
350
351<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700352 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400353 <pre>Creates a commitment in the specified project using the data included in the request.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400354
355Args:
356 project: string, Project ID for this request. (required)
357 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700358 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400359 The object takes the form of:
360
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700361{ # Represents a regional Commitment resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700362 #
363 # 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 ==)
364 &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.
365 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
366 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
367 &quot;endTimestamp&quot;: &quot;A String&quot;, # [Output Only] Commitment end time in RFC3339 text format.
368 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
369 &quot;kind&quot;: &quot;compute#commitment&quot;, # [Output Only] Type of the resource. Always compute#commitment for commitments.
370 &quot;licenseResource&quot;: { # Commitment for a particular license resource. # The license specification required as part of a license commitment.
371 &quot;amount&quot;: &quot;A String&quot;, # The number of licenses purchased.
372 &quot;coresPerLicense&quot;: &quot;A String&quot;, # Specifies the core range of the instance for which this license applies.
373 &quot;license&quot;: &quot;A String&quot;, # Any applicable license URI.
374 },
375 &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.
376 &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).
377 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where this commitment may be used.
378 &quot;reservations&quot;: [ # List of reservations in this commitment.
379 { # 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 ==)
380 &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.
381 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
382 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
383 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
384 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
385 &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.
386 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
387 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700388 &quot;shareSettings&quot;: { # Share-settings for shared-reservation
389 &quot;shareType&quot;: &quot;A String&quot;, # Type of sharing for this shared-reservation
390 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700391 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
392 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
393 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700394 &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 -0700395 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
396 { # A specification of the type and number of accelerator cards attached to the instance.
397 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
398 &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.
399 },
400 ],
401 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
402 {
403 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
404 &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.
405 },
406 ],
407 &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 -0700408 &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 -0700409 &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 Kim673ec5c2020-11-16 11:05:03 -0700410 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # Specifies whether this VM may be a stable fleet VM. Setting this to &quot;Periodic&quot; designates this VM as a Stable Fleet VM.
411 #
412 # See go/stable-fleet-ug for more details.
Bu Sun Kim65020912020-05-20 12:08:20 -0700413 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700414 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700415 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700416 &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.
417 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
418 &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 -0700419 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700420 ],
421 &quot;resources&quot;: [ # A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.
422 { # Commitment for a particular resource (a Commitment is composed of one or more of these).
423 &quot;acceleratorType&quot;: &quot;A String&quot;, # Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
424 &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.
425 &quot;type&quot;: &quot;A String&quot;, # Type of resource for which this commitment applies. Possible values are VCPU and MEMORY
426 },
427 ],
428 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
429 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
430 &quot;startTimestamp&quot;: &quot;A String&quot;, # [Output Only] Commitment start time in RFC3339 text format.
431 &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.
432 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700433 &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 -0700434}
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400435
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400436 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.
437
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700438For 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.
439
440The 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 -0400441
442Returns:
443 An object of the form:
444
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700445 { # Represents an Operation resource.
446 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700447 # Google Compute Engine has three Operation resources:
448 #
449 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
450 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700451 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
452 #
453 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700454 # - For global operations, use the `globalOperations` resource.
455 # - For regional operations, use the `regionOperations` resource.
456 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700457 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700458 # 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 -0700459 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
460 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
461 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
462 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
463 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
464 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400465 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700466 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
467 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
468 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400469 },
470 ],
471 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700472 &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`.
473 &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.
474 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
475 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
476 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
477 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
478 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
479 &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.
480 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
481 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
482 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
483 &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.
484 &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`.
485 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
486 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
487 &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.
488 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
489 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
490 {
491 &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.
492 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
493 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
494 {
495 &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).
496 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
497 },
498 ],
499 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
500 },
501 ],
502 &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 -0400503 }</pre>
504</div>
505
506<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700507 <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 -0400508 <pre>Retrieves a list of commitments contained within the specified region.
509
510Args:
511 project: string, Project ID for this request. (required)
512 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700513 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 -0400514
Dan O'Mearadd494642020-05-01 07:42:23 -0700515For 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 -0400516
Dan O'Mearadd494642020-05-01 07:42:23 -0700517You 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 -0400518
Bu Sun Kim65020912020-05-20 12:08:20 -0700519To 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) ```
520 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`)
521 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
522
523You 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.
524
525Currently, only sorting by `name` or `creationTimestamp desc` is supported.
526 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.
527 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 -0400528
529Returns:
530 An object of the form:
531
532 { # Contains a list of Commitment resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700533 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
534 &quot;items&quot;: [ # A list of Commitment resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700535 { # Represents a regional Commitment resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700536 #
537 # 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 ==)
538 &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.
539 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
540 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
541 &quot;endTimestamp&quot;: &quot;A String&quot;, # [Output Only] Commitment end time in RFC3339 text format.
542 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
543 &quot;kind&quot;: &quot;compute#commitment&quot;, # [Output Only] Type of the resource. Always compute#commitment for commitments.
544 &quot;licenseResource&quot;: { # Commitment for a particular license resource. # The license specification required as part of a license commitment.
545 &quot;amount&quot;: &quot;A String&quot;, # The number of licenses purchased.
546 &quot;coresPerLicense&quot;: &quot;A String&quot;, # Specifies the core range of the instance for which this license applies.
547 &quot;license&quot;: &quot;A String&quot;, # Any applicable license URI.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400548 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700549 &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.
550 &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).
551 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where this commitment may be used.
552 &quot;reservations&quot;: [ # List of reservations in this commitment.
553 { # 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 ==)
554 &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.
555 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
556 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
557 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
558 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
559 &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.
560 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
561 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700562 &quot;shareSettings&quot;: { # Share-settings for shared-reservation
563 &quot;shareType&quot;: &quot;A String&quot;, # Type of sharing for this shared-reservation
564 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700565 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
566 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
567 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700568 &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 -0700569 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
570 { # A specification of the type and number of accelerator cards attached to the instance.
571 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
572 &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.
573 },
574 ],
575 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
576 {
577 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
578 &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.
579 },
580 ],
581 &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 -0700582 &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 -0700583 &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 Kim673ec5c2020-11-16 11:05:03 -0700584 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # Specifies whether this VM may be a stable fleet VM. Setting this to &quot;Periodic&quot; designates this VM as a Stable Fleet VM.
585 #
586 # See go/stable-fleet-ug for more details.
Bu Sun Kim65020912020-05-20 12:08:20 -0700587 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
588 },
589 },
590 &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.
591 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
592 &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.
593 },
594 ],
595 &quot;resources&quot;: [ # A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.
596 { # Commitment for a particular resource (a Commitment is composed of one or more of these).
597 &quot;acceleratorType&quot;: &quot;A String&quot;, # Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
598 &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.
599 &quot;type&quot;: &quot;A String&quot;, # Type of resource for which this commitment applies. Possible values are VCPU and MEMORY
600 },
601 ],
602 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
603 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
604 &quot;startTimestamp&quot;: &quot;A String&quot;, # [Output Only] Commitment start time in RFC3339 text format.
605 &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.
606 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700607 &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 -0700608 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400609 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700610 &quot;kind&quot;: &quot;compute#commitmentList&quot;, # [Output Only] Type of resource. Always compute#commitmentList for lists of commitments.
611 &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.
612 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
613 &quot;warning&quot;: { # [Output Only] Informational warning message.
614 &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.
615 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
616 # &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 -0700617 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 &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).
619 &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 -0700620 },
621 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700622 &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 -0700623 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400624 }</pre>
625</div>
626
627<div class="method">
628 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
629 <pre>Retrieves the next page of results.
630
631Args:
632 previous_request: The request for the previous page. (required)
633 previous_response: The response from the request for the previous page. (required)
634
635Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700636 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400637 page. Returns None if there are no more items in the collection.
638 </pre>
639</div>
640
641<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700642 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400643 <pre>Returns permissions that a caller has on the specified resource.
644
645Args:
646 project: string, Project ID for this request. (required)
647 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700648 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700649 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400650 The object takes the form of:
651
652{
Bu Sun Kim65020912020-05-20 12:08:20 -0700653 &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.
654 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400655 ],
656 }
657
658
659Returns:
660 An object of the form:
661
662 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700663 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
664 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400665 ],
666 }</pre>
667</div>
668
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700669<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700670 <code class="details" id="updateReservations">updateReservations(project, region, commitment, body=None, requestId=None)</code>
671 <pre>Transfers GPUs or local SSDs between reservations within commitments.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700672
673Args:
674 project: string, Project ID for this request. (required)
675 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700676 commitment: string, Name of the commitment for which the reservation is being updated. (required)
677 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700678 The object takes the form of:
679
680{
Bu Sun Kim65020912020-05-20 12:08:20 -0700681 &quot;reservations&quot;: [ # A list of two reservations to transfer GPUs and local SSD between.
Dan O'Mearadd494642020-05-01 07:42:23 -0700682 { # 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 -0700683 &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.
684 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
685 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
686 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
687 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
688 &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.
689 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
690 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700691 &quot;shareSettings&quot;: { # Share-settings for shared-reservation
692 &quot;shareType&quot;: &quot;A String&quot;, # Type of sharing for this shared-reservation
693 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700694 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
695 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
696 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700697 &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 -0700698 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
699 { # A specification of the type and number of accelerator cards attached to the instance.
700 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
701 &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.
702 },
703 ],
704 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
705 {
706 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
707 &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.
708 },
709 ],
710 &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 -0700711 &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 -0700712 &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 Kim673ec5c2020-11-16 11:05:03 -0700713 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # Specifies whether this VM may be a stable fleet VM. Setting this to &quot;Periodic&quot; designates this VM as a Stable Fleet VM.
714 #
715 # See go/stable-fleet-ug for more details.
Bu Sun Kim65020912020-05-20 12:08:20 -0700716 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700717 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700718 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 &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.
720 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
721 &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 -0700722 },
723 ],
724 }
725
726 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.
727
728For 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.
729
730The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
731
732Returns:
733 An object of the form:
734
735 { # Represents an Operation resource.
736 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700737 # Google Compute Engine has three Operation resources:
738 #
739 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
740 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700741 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
742 #
743 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700744 # - For global operations, use the `globalOperations` resource.
745 # - For regional operations, use the `regionOperations` resource.
746 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700747 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700748 # 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 -0700749 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
750 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
751 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
752 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
753 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
754 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700755 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700756 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
757 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
758 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700759 },
760 ],
761 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700762 &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`.
763 &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.
764 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
765 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
766 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
767 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
768 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
769 &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.
770 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
771 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
772 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
773 &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.
774 &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`.
775 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
776 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
777 &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.
778 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
779 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
780 {
781 &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.
782 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
783 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
784 {
785 &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).
786 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
787 },
788 ],
789 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
790 },
791 ],
792 &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 -0700793 }</pre>
794</div>
795
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400796</body></html>