blob: 98100197f609cdec32768b779d8a61d7a3e1821c [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.instanceTemplates.html">instanceTemplates</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(project, instanceTemplate)</a></code></p>
79<p class="firstline">Deletes the specified instance template. If you delete an instance template that is being referenced from another instance group, the instance group will not be able to create or recreate virtual machine instances. Deleting an instance template is permanent and cannot be undone.</p>
80<p class="toc_element">
81 <code><a href="#get">get(project, instanceTemplate)</a></code></p>
82<p class="firstline">Returns the specified instance template. Get a list of available instance templates by making a list() request.</p>
83<p class="toc_element">
84 <code><a href="#insert">insert(project, body)</a></code></p>
85<p class="firstline">Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.</p>
86<p class="toc_element">
87 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
88<p class="firstline">Retrieves a list of instance templates that are contained within the specified project and zone.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body)</a></code></p>
94<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
95<h3>Method Details</h3>
96<div class="method">
97 <code class="details" id="delete">delete(project, instanceTemplate)</code>
98 <pre>Deletes the specified instance template. If you delete an instance template that is being referenced from another instance group, the instance group will not be able to create or recreate virtual machine instances. Deleting an instance template is permanent and cannot be undone.
99
100Args:
101 project: string, Project ID for this request. (required)
102 instanceTemplate: string, The name of the instance template to delete. (required)
103
104Returns:
105 An object of the form:
106
107 { # An Operation resource, used to manage asynchronous API requests.
108 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
109 "clientOperationId": "A String", # [Output Only] Reserved for future use.
110 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
111 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
112 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
113 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
114 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
115 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
116 "progress": 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.
117 "httpErrorStatusCode": 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.
118 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
119 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
120 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
121 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
122 {
123 "message": "A String", # [Output Only] A human-readable description of the warning code.
124 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
125 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
126 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
127 {
128 "value": "A String", # [Output Only] A warning data value corresponding to the key.
129 "key": "A String", # [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).
130 },
131 ],
132 },
133 ],
134 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
135 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
136 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
137 "name": "A String", # [Output Only] Name of the resource.
138 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
139 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
140 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
141 {
142 "message": "A String", # [Output Only] An optional, human-readable error message.
143 "code": "A String", # [Output Only] The error type identifier for this error.
144 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
145 },
146 ],
147 },
148 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
149 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800150 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700151 }</pre>
152</div>
153
154<div class="method">
155 <code class="details" id="get">get(project, instanceTemplate)</code>
156 <pre>Returns the specified instance template. Get a list of available instance templates by making a list() request.
157
158Args:
159 project: string, Project ID for this request. (required)
160 instanceTemplate: string, The name of the instance template. (required)
161
162Returns:
163 An object of the form:
164
165 { # An Instance Template resource.
166 "kind": "compute#instanceTemplate", # [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
167 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
168 "id": "A String", # [Output Only] A unique identifier for this instance template. The server defines this identifier.
169 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance template in RFC3339 text format.
170 "properties": { # The instance properties for this instance template.
171 "disks": [ # An array of disks that are associated with the instances that are created from this template.
172 { # An instance-attached disk resource.
173 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
174 #
175 # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
176 #
177 # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
178 #
179 # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
180 #
181 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
182 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
183 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
184 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
185 #
186 # The key must meet the following requirements before you can provide it to Compute Engine:
187 # - The key is wrapped using a RSA public key certificate provided by Google.
188 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
189 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
190 },
191 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
192 #
193 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
194 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
195 "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
196 #
197 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
198 #
199 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
200 "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
201 #
202 # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
203 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
204 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
205 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
206 #
207 # The key must meet the following requirements before you can provide it to Compute Engine:
208 # - The key is wrapped using a RSA public key certificate provided by Google.
209 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
210 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
211 },
212 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
213 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
214 #
215 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
216 #
217 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
218 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
219 # - projects/project/zones/zone/diskTypes/diskType
220 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
221 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800222 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700223 #
224 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
225 #
226 # projects/debian-cloud/global/images/family/debian-8
227 #
228 # Alternatively, use a specific version of a public operating system image:
229 #
230 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
231 #
232 # To create a disk with a private image that you created, specify the image name in the following format:
233 #
234 # global/images/my-private-image
235 #
236 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
237 #
238 # global/images/family/my-private-family
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800239 #
240 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700241 "diskStorageType": "A String", # [Deprecated] Storage type of the disk.
242 },
243 "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
244 "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
245 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
246 "licenses": [ # [Output Only] Any valid publicly visible licenses.
247 "A String",
248 ],
249 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
250 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
251 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800252 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
253 #
254 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
255 #
256 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700257 },
258 ],
259 "machineType": "A String", # The machine type to use for instances that are created from this template.
260 "description": "A String", # An optional text description for the instances that are created from this instance template.
261 "tags": { # A set of instance tags. # A list of tags to apply to the instances that are created from this template. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.
262 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
263 "A String",
264 ],
265 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
266 #
267 # To see the latest fingerprint, make get() request to the instance.
268 },
269 "labels": { # Labels to apply to instances that are created from this template. Each label key/value pair must comply with RFC1035. Label values may be empty.
270 "a_key": "A String",
271 },
272 "scheduling": { # Sets the scheduling options for an Instance. # Specifies the scheduling options for the instances that are created from this template.
273 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
274 "preemptible": True or False, # Whether the instance is preemptible.
275 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
276 },
277 "canIpForward": True or False, # Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding for instances documentation for more information.
278 "serviceAccounts": [ # A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this template. Use metadata queries to obtain the access tokens for these instances.
279 { # A service account.
280 "scopes": [ # The list of scopes to be made available for this service account.
281 "A String",
282 ],
283 "email": "A String", # Email address of the service account.
284 },
285 ],
286 "networkInterfaces": [ # An array of network access configurations for this interface.
287 { # A network interface resource attached to an instance.
288 "accessConfigs": [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
289 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
290 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
291 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
292 "name": "A String", # Name of this access configuration.
293 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
294 },
295 ],
296 "networkIP": "A String", # An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
297 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
298 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
299 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
300 # - regions/region/subnetworks/subnetwork
301 "network": "A String", # URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:
302 #
303 # global/networks/default
304 #
305 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
306 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
307 # - projects/project/global/networks/network
308 # - global/networks/default
309 },
310 ],
311 "metadata": { # A metadata key/value entry. # The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.
312 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
313 {
314 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes.
315 "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
316 },
317 ],
318 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
319 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
320 },
321 },
322 "selfLink": "A String", # [Output Only] The URL for this instance template. The server defines this URL.
323 "name": "A String", # 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.
324 }</pre>
325</div>
326
327<div class="method">
328 <code class="details" id="insert">insert(project, body)</code>
329 <pre>Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.
330
331Args:
332 project: string, Project ID for this request. (required)
333 body: object, The request body. (required)
334 The object takes the form of:
335
336{ # An Instance Template resource.
337 "kind": "compute#instanceTemplate", # [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
338 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
339 "id": "A String", # [Output Only] A unique identifier for this instance template. The server defines this identifier.
340 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance template in RFC3339 text format.
341 "properties": { # The instance properties for this instance template.
342 "disks": [ # An array of disks that are associated with the instances that are created from this template.
343 { # An instance-attached disk resource.
344 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
345 #
346 # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
347 #
348 # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
349 #
350 # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
351 #
352 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
353 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
354 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
355 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
356 #
357 # The key must meet the following requirements before you can provide it to Compute Engine:
358 # - The key is wrapped using a RSA public key certificate provided by Google.
359 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
360 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
361 },
362 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
363 #
364 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
365 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
366 "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
367 #
368 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
369 #
370 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
371 "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
372 #
373 # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
374 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
375 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
376 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
377 #
378 # The key must meet the following requirements before you can provide it to Compute Engine:
379 # - The key is wrapped using a RSA public key certificate provided by Google.
380 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
381 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
382 },
383 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
384 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
385 #
386 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
387 #
388 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
389 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
390 # - projects/project/zones/zone/diskTypes/diskType
391 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
392 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800393 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700394 #
395 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
396 #
397 # projects/debian-cloud/global/images/family/debian-8
398 #
399 # Alternatively, use a specific version of a public operating system image:
400 #
401 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
402 #
403 # To create a disk with a private image that you created, specify the image name in the following format:
404 #
405 # global/images/my-private-image
406 #
407 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
408 #
409 # global/images/family/my-private-family
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800410 #
411 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700412 "diskStorageType": "A String", # [Deprecated] Storage type of the disk.
413 },
414 "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
415 "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
416 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
417 "licenses": [ # [Output Only] Any valid publicly visible licenses.
418 "A String",
419 ],
420 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
421 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
422 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800423 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
424 #
425 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
426 #
427 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700428 },
429 ],
430 "machineType": "A String", # The machine type to use for instances that are created from this template.
431 "description": "A String", # An optional text description for the instances that are created from this instance template.
432 "tags": { # A set of instance tags. # A list of tags to apply to the instances that are created from this template. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.
433 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
434 "A String",
435 ],
436 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
437 #
438 # To see the latest fingerprint, make get() request to the instance.
439 },
440 "labels": { # Labels to apply to instances that are created from this template. Each label key/value pair must comply with RFC1035. Label values may be empty.
441 "a_key": "A String",
442 },
443 "scheduling": { # Sets the scheduling options for an Instance. # Specifies the scheduling options for the instances that are created from this template.
444 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
445 "preemptible": True or False, # Whether the instance is preemptible.
446 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
447 },
448 "canIpForward": True or False, # Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding for instances documentation for more information.
449 "serviceAccounts": [ # A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this template. Use metadata queries to obtain the access tokens for these instances.
450 { # A service account.
451 "scopes": [ # The list of scopes to be made available for this service account.
452 "A String",
453 ],
454 "email": "A String", # Email address of the service account.
455 },
456 ],
457 "networkInterfaces": [ # An array of network access configurations for this interface.
458 { # A network interface resource attached to an instance.
459 "accessConfigs": [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
460 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
461 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
462 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
463 "name": "A String", # Name of this access configuration.
464 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
465 },
466 ],
467 "networkIP": "A String", # An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
468 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
469 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
470 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
471 # - regions/region/subnetworks/subnetwork
472 "network": "A String", # URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:
473 #
474 # global/networks/default
475 #
476 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
477 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
478 # - projects/project/global/networks/network
479 # - global/networks/default
480 },
481 ],
482 "metadata": { # A metadata key/value entry. # The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.
483 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
484 {
485 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes.
486 "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
487 },
488 ],
489 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
490 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
491 },
492 },
493 "selfLink": "A String", # [Output Only] The URL for this instance template. The server defines this URL.
494 "name": "A String", # 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.
495 }
496
497
498Returns:
499 An object of the form:
500
501 { # An Operation resource, used to manage asynchronous API requests.
502 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
503 "clientOperationId": "A String", # [Output Only] Reserved for future use.
504 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
505 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
506 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
507 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
508 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
509 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
510 "progress": 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.
511 "httpErrorStatusCode": 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.
512 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
513 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
514 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
515 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
516 {
517 "message": "A String", # [Output Only] A human-readable description of the warning code.
518 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
519 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
520 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
521 {
522 "value": "A String", # [Output Only] A warning data value corresponding to the key.
523 "key": "A String", # [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).
524 },
525 ],
526 },
527 ],
528 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
529 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
530 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
531 "name": "A String", # [Output Only] Name of the resource.
532 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
533 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
534 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
535 {
536 "message": "A String", # [Output Only] An optional, human-readable error message.
537 "code": "A String", # [Output Only] The error type identifier for this error.
538 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
539 },
540 ],
541 },
542 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
543 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800544 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700545 }</pre>
546</div>
547
548<div class="method">
549 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
550 <pre>Retrieves a list of instance templates that are contained within the specified project and zone.
551
552Args:
553 project: string, Project ID for this request. (required)
554 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
555
556You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". 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.
557
558Currently, only sorting by name or creationTimestamp desc is supported.
559 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.
560 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.
561 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
562
563The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
564
565For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
566
567You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
568
569To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
570
571Returns:
572 An object of the form:
573
574 { # A list of instance templates.
575 "nextPageToken": "A String", # [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.
576 "items": [ # [Output Only] list of InstanceTemplate resources.
577 { # An Instance Template resource.
578 "kind": "compute#instanceTemplate", # [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
579 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
580 "id": "A String", # [Output Only] A unique identifier for this instance template. The server defines this identifier.
581 "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance template in RFC3339 text format.
582 "properties": { # The instance properties for this instance template.
583 "disks": [ # An array of disks that are associated with the instances that are created from this template.
584 { # An instance-attached disk resource.
585 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
586 #
587 # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
588 #
589 # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
590 #
591 # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
592 #
593 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
594 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
595 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
596 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
597 #
598 # The key must meet the following requirements before you can provide it to Compute Engine:
599 # - The key is wrapped using a RSA public key certificate provided by Google.
600 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
601 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
602 },
603 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
604 #
605 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
606 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
607 "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
608 #
609 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
610 #
611 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
612 "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
613 #
614 # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
615 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
616 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
617 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
618 #
619 # The key must meet the following requirements before you can provide it to Compute Engine:
620 # - The key is wrapped using a RSA public key certificate provided by Google.
621 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
622 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
623 },
624 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
625 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
626 #
627 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
628 #
629 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
630 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
631 # - projects/project/zones/zone/diskTypes/diskType
632 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
633 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800634 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700635 #
636 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
637 #
638 # projects/debian-cloud/global/images/family/debian-8
639 #
640 # Alternatively, use a specific version of a public operating system image:
641 #
642 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
643 #
644 # To create a disk with a private image that you created, specify the image name in the following format:
645 #
646 # global/images/my-private-image
647 #
648 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
649 #
650 # global/images/family/my-private-family
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800651 #
652 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700653 "diskStorageType": "A String", # [Deprecated] Storage type of the disk.
654 },
655 "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
656 "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
657 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
658 "licenses": [ # [Output Only] Any valid publicly visible licenses.
659 "A String",
660 ],
661 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
662 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
663 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800664 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
665 #
666 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
667 #
668 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700669 },
670 ],
671 "machineType": "A String", # The machine type to use for instances that are created from this template.
672 "description": "A String", # An optional text description for the instances that are created from this instance template.
673 "tags": { # A set of instance tags. # A list of tags to apply to the instances that are created from this template. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.
674 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
675 "A String",
676 ],
677 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
678 #
679 # To see the latest fingerprint, make get() request to the instance.
680 },
681 "labels": { # Labels to apply to instances that are created from this template. Each label key/value pair must comply with RFC1035. Label values may be empty.
682 "a_key": "A String",
683 },
684 "scheduling": { # Sets the scheduling options for an Instance. # Specifies the scheduling options for the instances that are created from this template.
685 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
686 "preemptible": True or False, # Whether the instance is preemptible.
687 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
688 },
689 "canIpForward": True or False, # Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding for instances documentation for more information.
690 "serviceAccounts": [ # A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this template. Use metadata queries to obtain the access tokens for these instances.
691 { # A service account.
692 "scopes": [ # The list of scopes to be made available for this service account.
693 "A String",
694 ],
695 "email": "A String", # Email address of the service account.
696 },
697 ],
698 "networkInterfaces": [ # An array of network access configurations for this interface.
699 { # A network interface resource attached to an instance.
700 "accessConfigs": [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
701 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
702 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
703 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
704 "name": "A String", # Name of this access configuration.
705 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
706 },
707 ],
708 "networkIP": "A String", # An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
709 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
710 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
711 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
712 # - regions/region/subnetworks/subnetwork
713 "network": "A String", # URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:
714 #
715 # global/networks/default
716 #
717 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
718 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
719 # - projects/project/global/networks/network
720 # - global/networks/default
721 },
722 ],
723 "metadata": { # A metadata key/value entry. # The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.
724 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
725 {
726 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes.
727 "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
728 },
729 ],
730 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
731 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
732 },
733 },
734 "selfLink": "A String", # [Output Only] The URL for this instance template. The server defines this URL.
735 "name": "A String", # 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.
736 },
737 ],
738 "kind": "compute#instanceTemplateList", # [Output Only] The resource type, which is always compute#instanceTemplatesListResponse for instance template lists.
739 "id": "A String", # [Output Only] A unique identifier for this instance template. The server defines this identifier.
740 "selfLink": "A String", # [Output Only] The URL for this instance template list. The server defines this URL.
741 }</pre>
742</div>
743
744<div class="method">
745 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
746 <pre>Retrieves the next page of results.
747
748Args:
749 previous_request: The request for the previous page. (required)
750 previous_response: The response from the request for the previous page. (required)
751
752Returns:
753 A request object that you can call 'execute()' on to request the next
754 page. Returns None if there are no more items in the collection.
755 </pre>
756</div>
757
758<div class="method">
759 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body)</code>
760 <pre>Returns permissions that a caller has on the specified resource.
761
762Args:
763 project: string, Project ID for this request. (required)
764 resource: string, Name of the resource for this request. (required)
765 body: object, The request body. (required)
766 The object takes the form of:
767
768{
769 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
770 "A String",
771 ],
772 }
773
774
775Returns:
776 An object of the form:
777
778 {
779 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
780 "A String",
781 ],
782 }</pre>
783</div>
784
785</body></html>