Skip to main content

system_instances

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

Overview

Namesystem_instances
TypeResource
Idaws.iotthingsgraph.system_instances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
definitionobjectA document that defines an entity.
flow_actions_role_arnstringThe AWS Identity and Access Management (IAM) role that AWS IoT Things Graph assumes during flow execution in a cloud deployment. This role must have read and write permissionss to AWS Lambda and AWS IoT and to any other AWS services that the flow uses.
metrics_configurationobjectAn object that specifies whether cloud metrics are collected in a deployment and, if so, what role is used to collect metrics.
s_3_bucket_namestringThe Amazon Simple Storage Service bucket where information about a system instance is stored.
summaryobjectAn object that contains summary information about a system instance.
validated_dependency_revisionsarrayA list of objects that contain all of the IDs and revision numbers of workflows and systems that are used in a system instance.
validated_namespace_versioninteger (int64)The version of the user's namespace against which the system instance was validated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_system_instanceselectregionGets a system instance.
search_system_instancesselectregionSearches for system instances in the user's account.
create_system_instanceinsertregion, definition, targetCreates a system instance. This action validates the system instance, prepares the deployment-related resources. For Greengrass deployments, it updates the Greengrass group that is specified by the greengrassGroupName parameter. It also adds a file to the S3 bucket specified by the s3BucketName parameter. You need to call DeploySystemInstance after running this action. For Greengrass deployments, since this action modifies and adds resources to a Greengrass group and an S3 bucket on the caller's behalf, the calling identity must have write permissions to both the specified Greengrass group and S3 bucket. Otherwise, the call will fail with an authorization error. For cloud deployments, this action requires a flowActionsRoleArn value. This is an IAM role that has permissions to access AWS services, such as AWS Lambda and AWS IoT, that the flow uses when it executes. If the definition document doesn't specify a version of the user's namespace, the latest version will be used by default.
delete_system_instancedeleteregionDeletes a system instance. Only system instances that have never been deployed, or that have been undeployed can be deleted. Users can create a new system instance that has the same ID as a deleted system instance.

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 instance.

SELECT
definition,
flow_actions_role_arn,
metrics_configuration,
s_3_bucket_name,
summary,
validated_dependency_revisions,
validated_namespace_version
FROM aws.iotthingsgraph.system_instances
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a system instance. This action validates the system instance, prepares the deployment-related resources. For Greengrass deployments, it updates the Greengrass group that is specified by the greengrassGroupName parameter. It also adds a file to the S3 bucket specified by the s3BucketName parameter. You need to call DeploySystemInstance after running this action. For Greengrass deployments, since this action modifies and adds resources to a Greengrass group and an S3 bucket on the caller's behalf, the calling identity must have write permissions to both the specified Greengrass group and S3 bucket. Otherwise, the call will fail with an authorization error. For cloud deployments, this action requires a flowActionsRoleArn value. This is an IAM role that has permissions to access AWS services, such as AWS Lambda and AWS IoT, that the flow uses when it executes. If the definition document doesn't specify a version of the user's namespace, the latest version will be used by default.

INSERT INTO aws.iotthingsgraph.system_instances (
tags,
definition,
target,
greengrassGroupName,
s3BucketName,
metricsConfiguration,
flowActionsRoleArn,
region
)
SELECT
'{{ tags }}',
'{{ definition }}' /* required */,
'{{ target }}' /* required */,
'{{ greengrassGroupName }}',
'{{ s3BucketName }}',
'{{ metricsConfiguration }}',
'{{ flowActionsRoleArn }}',
'{{ region }}'
RETURNING
summary
;

DELETE examples

Deletes a system instance. Only system instances that have never been deployed, or that have been undeployed can be deleted. Users can create a new system instance that has the same ID as a deleted system instance.

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