templates
Creates, updates, deletes, gets or lists a templates
resource.
Overview
Name | templates |
Type | Resource |
Id | google.integrations.templates |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_templates_get
- projects_locations_templates_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Resource name of the template. |
author | string | Optional. Creator of the template. |
categories | array | Required. Categories associated with the Template. The categories listed below will be utilized for the Template listing. |
components | array | Optional. Components being used in the template. This could be used to categorize and filter. |
createTime | string (google-datetime) | Output only. Auto-generated. |
description | string | Optional. Description of the template. The length should not be more than 255 characters |
displayName | string | Required. The name of the template |
docLink | string | Optional. Link to template documentation. |
lastUsedTime | string (google-datetime) | Optional. Time the template was last used. |
sharedWith | array | Required. Resource names with which the template is shared for example ProjectNumber/Ord id |
tags | array | Required. Tags which are used to identify templates. These tags could be for business use case, connectors etc. |
templateBundle | object | Required. Bundle which is part of the templates. The template entities in the bundle would be converted to an actual entity. (id: GoogleCloudIntegrationsV1alphaTemplateBundle) |
updateTime | string (google-datetime) | Output only. Auto-generated |
usageCount | string (int64) | Optional. Number of template usages. |
usageInfo | string | Optional. Information on how to use the template. This should contain detailed information about usage of the template. |
visibility | string | Required. Visibility of the template. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Resource name of the template. |
author | string | Optional. Creator of the template. |
categories | array | Required. Categories associated with the Template. The categories listed below will be utilized for the Template listing. |
components | array | Optional. Components being used in the template. This could be used to categorize and filter. |
createTime | string (google-datetime) | Output only. Auto-generated. |
description | string | Optional. Description of the template. The length should not be more than 255 characters |
displayName | string | Required. The name of the template |
docLink | string | Optional. Link to template documentation. |
lastUsedTime | string (google-datetime) | Optional. Time the template was last used. |
sharedWith | array | Required. Resource names with which the template is shared for example ProjectNumber/Ord id |
tags | array | Required. Tags which are used to identify templates. These tags could be for business use case, connectors etc. |
templateBundle | object | Required. Bundle which is part of the templates. The template entities in the bundle would be converted to an actual entity. (id: GoogleCloudIntegrationsV1alphaTemplateBundle) |
updateTime | string (google-datetime) | Output only. Auto-generated |
usageCount | string (int64) | Optional. Number of template usages. |
usageInfo | string | Optional. Information on how to use the template. This should contain detailed information about usage of the template. |
visibility | string | Required. Visibility of the template. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_templates_get | select | projectsId , locationsId , templatesId | Get a template in the specified project. | |
projects_locations_templates_list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy , readMask | Lists all templates matching the filter. |
projects_locations_templates_create | insert | projectsId , locationsId | Creates a new template | |
projects_locations_templates_patch | update | projectsId , locationsId , templatesId | updateMask | Updates the template by given id. |
projects_locations_templates_delete | delete | projectsId , locationsId , templatesId | Deletes a template | |
projects_locations_templates_search | exec | projectsId , locationsId | pageSize , pageToken , filter , orderBy , readMask , query , enableNaturalLanguageQueryUnderstanding | 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. |
projects_locations_templates_use | exec | projectsId , locationsId , templatesId | Use 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_import | exec | projectsId , locationsId , templatesId | Import 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_share | exec | projectsId , locationsId , templatesId | Share 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_unshare | exec | projectsId , locationsId , templatesId | Unshare 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_upload | exec | projectsId , locationsId | Uploads 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_download | exec | projectsId , locationsId , templatesId | fileFormat | Downloads 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.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
templatesId | string | |
enableNaturalLanguageQueryUnderstanding | boolean | |
fileFormat | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
query | string | |
readMask | string (google-fieldmask) | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_templates_get
- projects_locations_templates_list
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;
Lists all templates matching the filter.
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND readMask = '{{ readMask }}';
INSERT
examples
- projects_locations_templates_create
- Manifest
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
;
# Description fields are for documentation purposes
- name: templates
props:
- name: projectsId
value: string
description: Required parameter for the templates resource.
- name: locationsId
value: string
description: Required parameter for the templates resource.
- name: name
value: string
description: >
Identifier. Resource name of the template.
- name: displayName
value: string
description: >
Required. The name of the template
- name: description
value: string
description: >
Optional. Description of the template. The length should not be more than 255 characters
- name: usageInfo
value: string
description: >
Optional. Information on how to use the template. This should contain detailed information about usage of the template.
- name: docLink
value: string
description: >
Optional. Link to template documentation.
- name: templateBundle
value: object
description: >
Required. Bundle which is part of the templates. The template entities in the bundle would be converted to an actual entity.
- name: components
value: array
description: >
Optional. Components being used in the template. This could be used to categorize and filter.
- name: tags
value: array
description: >
Required. Tags which are used to identify templates. These tags could be for business use case, connectors etc.
- name: categories
value: array
description: >
Required. Categories associated with the Template. The categories listed below will be utilized for the Template listing.
- name: author
value: string
description: >
Optional. Creator of the template.
- name: usageCount
value: string
description: >
Optional. Number of template usages.
- name: lastUsedTime
value: string
description: >
Optional. Time the template was last used.
- name: visibility
value: string
description: >
Required. Visibility of the template.
valid_values: ['VISIBILITY_UNSPECIFIED', 'PRIVATE', 'SHARED', 'PUBLIC']
- name: sharedWith
value: array
description: >
Required. Resource names with which the template is shared for example ProjectNumber/Ord id
UPDATE
examples
- projects_locations_templates_patch
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
- projects_locations_templates_delete
Deletes a template
DELETE FROM google.integrations.templates
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND templatesId = '{{ templatesId }}' --required;
Lifecycle Methods
- projects_locations_templates_search
- projects_locations_templates_use
- projects_locations_templates_import
- projects_locations_templates_share
- projects_locations_templates_unshare
- projects_locations_templates_upload
- projects_locations_templates_download
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 }};
Use 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.
EXEC google.integrations.templates.projects_locations_templates_use
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@templatesId='{{ templatesId }}' --required
@@json=
'{
"integrationDetails": "{{ integrationDetails }}",
"subIntegrations": "{{ subIntegrations }}",
"integrationRegion": "{{ integrationRegion }}"
}';
Import 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.
EXEC google.integrations.templates.projects_locations_templates_import
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@templatesId='{{ templatesId }}' --required
@@json=
'{
"integration": "{{ integration }}",
"subIntegrations": "{{ subIntegrations }}"
}';
Share 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.
EXEC google.integrations.templates.projects_locations_templates_share
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@templatesId='{{ templatesId }}' --required
@@json=
'{
"resourceNames": "{{ resourceNames }}"
}';
Unshare 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.
EXEC google.integrations.templates.projects_locations_templates_unshare
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@templatesId='{{ templatesId }}' --required
@@json=
'{
"resourceNames": "{{ resourceNames }}"
}';
Uploads 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.
EXEC google.integrations.templates.projects_locations_templates_upload
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"content": "{{ content }}",
"fileFormat": "{{ fileFormat }}"
}';
Downloads a template. Retrieves the Template
and returns the response as a string.
EXEC google.integrations.templates.projects_locations_templates_download
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@templatesId='{{ templatesId }}' --required,
@fileFormat='{{ fileFormat }}';