system_templates
Creates, updates, deletes, gets or lists a system_templates resource.
Overview
| Name | system_templates |
| Type | Resource |
| Id | aws.iotthingsgraph.system_templates |
Fields
The following fields are returned by SELECT queries:
- get_system_template
- search_system_templates
| Name | Datatype | Description |
|---|---|---|
definition | object | A document that defines an entity. |
summary | object | An object that contains summary information about a system. |
validated_namespace_version | integer (int64) | The namespace version against which the system was validated. Use this value in your system instance. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the system. (pattern: <code>^urn:tdm:(([a-z]{2}-(gov-)?[a-z]{4,9}-[0-9]{1,3}/[0-9]+/)[\p{Alnum}]+(/[\p{Alnum}]+)):([\p{Alpha}]):([\p{Alnum}]+(/[\p{Alnum}]+))$</code>) |
arn | string | The ARN of the system. |
created_at | string (date-time) | The date when the system was created. |
revision_number | integer (int64) | The revision number of the system. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_system_template | select | region | Gets a system. | |
search_system_templates | select | region | Searches 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_template | insert | region, definition | 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. | |
update_system_template | update | region, id, definition | 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. | |
delete_system_template | delete | region | 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. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_system_template
- search_system_templates
Gets a system.
SELECT
definition,
summary,
validated_namespace_version
FROM aws.iotthingsgraph.system_templates
WHERE region = '{{ region }}' -- required
;
Searches 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.
SELECT
id,
arn,
created_at,
revision_number
FROM aws.iotthingsgraph.system_templates
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_system_template
- Manifest
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
;
# Description fields are for documentation purposes
- name: system_templates
props:
- name: region
value: "{{ region }}"
description: Required parameter for the system_templates resource.
- name: definition
description: |
A document that defines an entity.
value:
language: "{{ language }}"
text: "{{ text }}"
- name: compatibleNamespaceVersion
value: {{ compatibleNamespaceVersion }}
description: |
The namespace version in which the system is to be created. If no value is specified, the latest version is used by default.
UPDATE examples
- update_system_template
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
- delete_system_template
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
;