Skip to main content

region_instance_templates

Creates, updates, deletes, gets or lists a region_instance_templates resource.

Overview

Nameregion_instance_templates
TypeResource
Idgoogle.compute.region_instance_templates

Fields

NameDatatypeDescription
idstring[Output Only] A unique identifier for this instance template. The server defines this identifier.
namestringName 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.
descriptionstringAn optional description of this resource. Provide this property when you create the resource.
creationTimestampstring[Output Only] The creation timestamp for this instance template in RFC3339 text format.
kindstring[Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
propertiesobject
regionstring[Output Only] URL of the region where the instance template resides. Only applicable for regional resources.
selfLinkstring[Output Only] The URL for this instance template. The server defines this URL.
sourceInstancestringThe 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: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance
sourceInstanceParamsobjectA specification of the parameters to use when creating the instance template from a source instance.

Methods

NameAccessible byRequired ParamsDescription
getSELECTinstanceTemplate, project, regionReturns the specified instance template.
listSELECTproject, regionRetrieves a list of instance templates that are contained within the specified project and region.
insertINSERTproject, regionCreates an instance template in the specified project and region using the global instance template whose URL is included in the request.
deleteDELETEinstanceTemplate, project, regionDeletes the specified instance template. Deleting an instance template is permanent and cannot be undone.

SELECT examples

Retrieves a list of instance templates that are contained within the specified project and region.

SELECT
id,
name,
description,
creationTimestamp,
kind,
properties,
region,
selfLink,
sourceInstance,
sourceInstanceParams
FROM google.compute.region_instance_templates
WHERE project = '{{ project }}'
AND region = '{{ region }}';

INSERT example

Use the following StackQL query and manifest file to create a new region_instance_templates resource.

/*+ create */
INSERT INTO google.compute.region_instance_templates (
project,
region,
name,
description,
properties,
sourceInstance,
sourceInstanceParams,
region
)
SELECT
'{{ project }}',
'{{ region }}',
'{{ name }}',
'{{ description }}',
'{{ properties }}',
'{{ sourceInstance }}',
'{{ sourceInstanceParams }}',
'{{ region }}'
;

DELETE example

Deletes the specified region_instance_templates resource.

/*+ delete */
DELETE FROM google.compute.region_instance_templates
WHERE instanceTemplate = '{{ instanceTemplate }}'
AND project = '{{ project }}'
AND region = '{{ region }}';