Resource: InstanceTemplate
Represents an Instance Template resource.
Google Compute Engine has two Instance Template resources:
You can reuse a global instance template in different regions whereas you can use a regional instance template in a specified region only. If you want to reduce cross-region dependency or achieve data residency, use a regional instance template.
To create VMs, managed instance groups, and reservations, you can use either global or regional instance templates.
For more information, read Instance Templates.
JSON representation |
---|
{ "kind": string, "id": string, "creationTimestamp": string, "name": string, "description": string, "properties": { object ( |
Fields | |
---|---|
kind |
[Output Only] The resource type, which is always
for instance templates. |
id |
[Output Only] A unique identifier for this instance template. The server defines this identifier. |
creation |
[Output Only] The creation timestamp for this instance template in RFC3339 text format. |
name |
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 |
description |
An optional description of this resource. Provide this property when you create the resource. |
properties |
The instance properties for this instance template. |
self |
[Output Only] The URL for this instance template. The server defines this URL. |
source |
The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values:
|
source |
The source instance params to use to create this instance template. |
region |
[Output Only] URL of the region where the instance template resides. Only applicable for regional resources. |
SourceInstanceParams
A specification of the parameters to use when creating the instance template from a source instance.
JSON representation |
---|
{
"diskConfigs": [
{
object ( |
Fields | |
---|---|
disk |
Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes. |
DiskInstantiationConfig
A specification of the desired way to instantiate a disk in the instance template when its created from a source instance.
JSON representation |
---|
{
"deviceName": string,
"instantiateFrom": enum ( |
Fields | |
---|---|
device |
Specifies the device name of the disk to which the configurations apply to. |
instantiate |
Specifies whether to include the disk and what image to use. Possible values are:
|
auto |
Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). |
custom |
The custom source image to be used to restore this disk when instantiating this instance template. |
DiskInstantiationOptions
Enums | |
---|---|
DEFAULT |
Use the default instantiation option for the corresponding type of disk. For boot disk and any other R/W disks, new custom images will be created from each disk. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes. |
CUSTOM_IMAGE |
Use the custom image specified in the customImage field. Applicable to: boot disk, additional read-write disks. |
SOURCE_IMAGE |
Use the same source image used for creation of the source instance's corresponding disk. The request will fail if the source VM's disk was created from a snapshot. Applicable to: boot disk, additional read-write disks. |
SOURCE_IMAGE_FAMILY |
Use the same source image family used for creation of the source instance's corresponding disk. The request will fail if the source image of the source disk does not belong to any image family. Applicable to: boot disk, additional read-write disks. |
BLANK |
Create a blank disk. The disk will be created unformatted. Applicable to: additional read-write disks, local SSDs. |
ATTACH_READ_ONLY |
Attach the existing disk in read-only mode. The request will fail if the disk was attached in read-write mode on the source instance. Applicable to: read-only disks. |
DO_NOT_INCLUDE |
Do not include the disk in the instance template. Applicable to: additional read-write disks, local SSDs, read-only disks. |
Methods |
|
---|---|
|
The method compute.v1.InstanceTemplatesService.AggregatedList is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceTemplatesService.Delete is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceTemplatesService.Get is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceTemplatesService.GetPolicy is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceTemplatesService.Insert is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceTemplatesService.List is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceTemplatesService.SetPolicy is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceTemplatesService.TestPermissions is not available in this (s3nsapis.fr) universe. |