Skip to main content

system_templates

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

Overview

Namesystem_templates
TypeResource
Idaws.iotthingsgraph.system_templates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
definitionobjectA document that defines an entity.
summaryobjectAn object that contains summary information about a system.
validated_namespace_versioninteger (int64)The namespace version against which the system was validated. Use this value in your system instance.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_system_templateselectregionGets a system.
search_system_templatesselectregionSearches for summary information about systems in the user's account. You can filter by the ID of a workflow to return only systems that use the specified workflow.
create_system_templateinsertregion, definitionCreates a system. The system is validated against the entities in the latest version of the user's namespace unless another namespace version is specified in the request.
update_system_templateupdateregion, id, definitionUpdates the specified system. You don't need to run this action after updating a workflow. Any deployment that uses the system will see the changes in the system when it is redeployed.
delete_system_templatedeleteregionDeletes a system. New deployments can't contain the system after its deletion. Existing deployments that contain the system will continue to work because they use a snapshot of the system that is taken when it is deployed.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Gets a system.

SELECT
definition,
summary,
validated_namespace_version
FROM aws.iotthingsgraph.system_templates
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a system. The system is validated against the entities in the latest version of the user's namespace unless another namespace version is specified in the request.

INSERT INTO aws.iotthingsgraph.system_templates (
definition,
compatibleNamespaceVersion,
region
)
SELECT
'{{ definition }}' /* required */,
{{ compatibleNamespaceVersion }},
'{{ region }}'
RETURNING
summary
;

UPDATE examples

Updates the specified system. You don't need to run this action after updating a workflow. Any deployment that uses the system will see the changes in the system when it is redeployed.

UPDATE aws.iotthingsgraph.system_templates
SET
id = '{{ id }}',
definition = '{{ definition }}',
compatibleNamespaceVersion = {{ compatibleNamespaceVersion }}
WHERE
region = '{{ region }}' --required
AND id = '{{ id }}' --required
AND definition = '{{ definition }}' --required
RETURNING
summary;

DELETE examples

Deletes a system. New deployments can't contain the system after its deletion. Existing deployments that contain the system will continue to work because they use a snapshot of the system that is taken when it is deployed.

DELETE FROM aws.iotthingsgraph.system_templates
WHERE region = '{{ region }}' --required
;