Skip to main content

gateways

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

Overview

Namegateways
TypeResource
Idaws.iotsitewise.gateways

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_datestring (date-time)The date the gateway was created, in Unix epoch time.
gateway_arnstringThe ARN of the gateway, which has the following format. arn:${Partition}:iotsitewise:${Region}:${Account}:gateway/${GatewayId} (pattern: <code>^arn:aws(-cn|-us-gov)?:[a-zA-Z0-9-:/_.]+$</code>)
gateway_capability_summariesarrayA list of gateway capability summaries that each contain a namespace and status. Each gateway capability defines data sources for the gateway. To retrieve a capability configuration's definition, use DescribeGatewayCapabilityConfiguration.
gateway_idstringThe ID of the gateway device. (pattern: <code>^(?!00000000-0000-0000-0000-000000000000)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>)
gateway_namestringThe name of the gateway. (pattern: <code>[^\u0000-\u001F\u007F]+</code>)
gateway_platformobjectThe gateway's platform configuration. You can only specify one platform type in a gateway. (Legacy only) For Greengrass V1 gateways, specify the greengrass parameter with a valid Greengrass group ARN. For Greengrass V2 gateways, specify the greengrassV2 parameter with a valid core device thing name. If creating a V3 gateway (gatewayVersion=3), you must also specify the coreDeviceOperatingSystem. For Siemens Industrial Edge gateways, specify the siemensIE parameter with a valid IoT Core thing name.
gateway_versionstringThe version of the gateway. Options include: 2 - Classic streams, V2 gateway. 3 - MQTT-enabled, V3 gateway. (pattern: <code>^[0-9]+$</code>)
last_update_datestring (date-time)The date the gateway was last updated, in Unix epoch time.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_gatewayselectgateway_id, regionRetrieves information about a gateway.
list_gatewaysselectregionnextToken, maxResultsRetrieves a paginated list of gateways.
create_gatewayinsertregion, gatewayName, gatewayPlatformCreates a gateway, which is a virtual or edge device that delivers industrial data streams from local servers to IoT SiteWise. For more information, see Ingesting data using a gateway in the IoT SiteWise User Guide.
update_gatewayupdategateway_id, region, gatewayNameUpdates a gateway's name.
delete_gatewaydeletegateway_id, regionDeletes a gateway from IoT SiteWise. When you delete a gateway, some of the gateway's files remain in your gateway's file system.

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
gateway_idstringThe ID of the gateway to delete.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to return for each paginated request. Default: 50
nextTokenstringThe token to be used for the next set of paginated results.

SELECT examples

Retrieves information about a gateway.

SELECT
creation_date,
gateway_arn,
gateway_capability_summaries,
gateway_id,
gateway_name,
gateway_platform,
gateway_version,
last_update_date
FROM aws.iotsitewise.gateways
WHERE gateway_id = '{{ gateway_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a gateway, which is a virtual or edge device that delivers industrial data streams from local servers to IoT SiteWise. For more information, see Ingesting data using a gateway in the IoT SiteWise User Guide.

INSERT INTO aws.iotsitewise.gateways (
gatewayName,
gatewayPlatform,
gatewayVersion,
tags,
region
)
SELECT
'{{ gatewayName }}' /* required */,
'{{ gatewayPlatform }}' /* required */,
'{{ gatewayVersion }}',
'{{ tags }}',
'{{ region }}'
RETURNING
gateway_arn,
gateway_id
;

UPDATE examples

Updates a gateway's name.

UPDATE aws.iotsitewise.gateways
SET
gatewayName = '{{ gatewayName }}'
WHERE
gateway_id = '{{ gateway_id }}' --required
AND region = '{{ region }}' --required
AND gatewayName = '{{ gatewayName }}' --required;

DELETE examples

Deletes a gateway from IoT SiteWise. When you delete a gateway, some of the gateway's files remain in your gateway's file system.

DELETE FROM aws.iotsitewise.gateways
WHERE gateway_id = '{{ gateway_id }}' --required
AND region = '{{ region }}' --required
;