Skip to main content

templates

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

Overview

Nametemplates
TypeResource
Idgoogle.integrations.templates

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Resource name of the template.
authorstringOptional. Creator of the template.
categoriesarrayRequired. Categories associated with the Template. The categories listed below will be utilized for the Template listing.
componentsarrayOptional. Components being used in the template. This could be used to categorize and filter.
createTimestring (google-datetime)Output only. Auto-generated.
descriptionstringOptional. Description of the template. The length should not be more than 255 characters
displayNamestringRequired. The name of the template
docLinkstringOptional. Link to template documentation.
lastUsedTimestring (google-datetime)Optional. Time the template was last used.
sharedWitharrayRequired. Resource names with which the template is shared for example ProjectNumber/Ord id
tagsarrayRequired. Tags which are used to identify templates. These tags could be for business use case, connectors etc.
templateBundleobjectRequired. Bundle which is part of the templates. The template entities in the bundle would be converted to an actual entity. (id: GoogleCloudIntegrationsV1alphaTemplateBundle)
updateTimestring (google-datetime)Output only. Auto-generated
usageCountstring (int64)Optional. Number of template usages.
usageInfostringOptional. Information on how to use the template. This should contain detailed information about usage of the template.
visibilitystringRequired. Visibility of the template.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_templates_getselectprojectsId, locationsId, templatesIdGet a template in the specified project.
projects_locations_templates_listselectprojectsId, locationsIdpageSize, pageToken, filter, orderBy, readMaskLists all templates matching the filter.
projects_locations_templates_createinsertprojectsId, locationsIdCreates a new template
projects_locations_templates_patchupdateprojectsId, locationsId, templatesIdupdateMaskUpdates the template by given id.
projects_locations_templates_deletedeleteprojectsId, locationsId, templatesIdDeletes a template
projects_locations_templates_searchexecprojectsId, locationsIdpageSize, pageToken, filter, orderBy, readMask, query, enableNaturalLanguageQueryUnderstandingSearch templates based on user query and filters. This api would query the templates and return a list of templates based on the user filter.
projects_locations_templates_useexecprojectsId, locationsId, templatesIdUse the template to create integration. This api would keep track of usage_count and last_used_time. PERMISSION_DENIED would be thrown if template is not accessible by client.
projects_locations_templates_importexecprojectsId, locationsId, templatesIdImport the template to an existing integration. This api would keep track of usage_count and last_used_time. PERMISSION_DENIED would be thrown if template is not accessible by client.
projects_locations_templates_shareexecprojectsId, locationsId, templatesIdShare a template with other clients. Only the template owner can share the templates with other projects. PERMISSION_DENIED would be thrown if the request is not from the owner.
projects_locations_templates_unshareexecprojectsId, locationsId, templatesIdUnshare a template from given clients. Owner of the template can unshare template with clients. Shared client can only unshare the template from itself. PERMISSION_DENIED would be thrown if request is not from owner or for unsharing itself.
projects_locations_templates_uploadexecprojectsId, locationsIdUploads a template. The content can be a previously downloaded template. Performs the same function as CreateTemplate, but accepts input in a string format, which holds the complete representation of the Template content.
projects_locations_templates_downloadexecprojectsId, locationsId, templatesIdfileFormatDownloads a template. Retrieves the Template and returns the response as a string.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationsIdstring
projectsIdstring
templatesIdstring
enableNaturalLanguageQueryUnderstandingboolean
fileFormatstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
querystring
readMaskstring (google-fieldmask)
updateMaskstring (google-fieldmask)

SELECT examples

Get a template in the specified project.

SELECT
name,
author,
categories,
components,
createTime,
description,
displayName,
docLink,
lastUsedTime,
sharedWith,
tags,
templateBundle,
updateTime,
usageCount,
usageInfo,
visibility
FROM google.integrations.templates
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND templatesId = '{{ templatesId }}' -- required;

INSERT examples

Creates a new template

INSERT INTO google.integrations.templates (
data__name,
data__displayName,
data__description,
data__usageInfo,
data__docLink,
data__templateBundle,
data__components,
data__tags,
data__categories,
data__author,
data__usageCount,
data__lastUsedTime,
data__visibility,
data__sharedWith,
projectsId,
locationsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ usageInfo }}',
'{{ docLink }}',
'{{ templateBundle }}',
'{{ components }}',
'{{ tags }}',
'{{ categories }}',
'{{ author }}',
'{{ usageCount }}',
'{{ lastUsedTime }}',
'{{ visibility }}',
'{{ sharedWith }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
author,
categories,
components,
createTime,
description,
displayName,
docLink,
lastUsedTime,
sharedWith,
tags,
templateBundle,
updateTime,
usageCount,
usageInfo,
visibility
;

UPDATE examples

Updates the template by given id.

UPDATE google.integrations.templates
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__usageInfo = '{{ usageInfo }}',
data__docLink = '{{ docLink }}',
data__templateBundle = '{{ templateBundle }}',
data__components = '{{ components }}',
data__tags = '{{ tags }}',
data__categories = '{{ categories }}',
data__author = '{{ author }}',
data__usageCount = '{{ usageCount }}',
data__lastUsedTime = '{{ lastUsedTime }}',
data__visibility = '{{ visibility }}',
data__sharedWith = '{{ sharedWith }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND templatesId = '{{ templatesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
author,
categories,
components,
createTime,
description,
displayName,
docLink,
lastUsedTime,
sharedWith,
tags,
templateBundle,
updateTime,
usageCount,
usageInfo,
visibility;

DELETE examples

Deletes a template

DELETE FROM google.integrations.templates
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND templatesId = '{{ templatesId }}' --required;

Lifecycle Methods

Search templates based on user query and filters. This api would query the templates and return a list of templates based on the user filter.

EXEC google.integrations.templates.projects_locations_templates_search 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@pageSize='{{ pageSize }}',
@pageToken='{{ pageToken }}',
@filter='{{ filter }}',
@orderBy='{{ orderBy }}',
@readMask='{{ readMask }}',
@query='{{ query }}',
@enableNaturalLanguageQueryUnderstanding={{ enableNaturalLanguageQueryUnderstanding }};