Skip to main content

gateways

Creates, updates, deletes or gets a gateway resource or lists gateways in a region

Overview

Namegateways
TypeResource
DescriptionResource schema for AWS::IoTSiteWise::Gateway
Idawscc.iotsitewise.gateways

Fields

NameDatatypeDescription
gateway_namestringA unique, friendly name for the gateway.
gateway_platformobjectThe gateway's platform. You can only specify one platform in a gateway.
gateway_versionstringThe version of the gateway you want to create.
tagsarrayA list of key-value pairs that contain metadata for the gateway.
gateway_idstringThe ID of the gateway device.
gateway_capability_summariesarrayA list of gateway capability summaries that each contain a namespace and status.
regionstringAWS region.

For more information, see AWS::IoTSiteWise::Gateway.

Methods

NameResourceAccessible byRequired Params
create_resourcegatewaysINSERTGatewayName, GatewayPlatform, region
delete_resourcegatewaysDELETEIdentifier, region
update_resourcegatewaysUPDATEIdentifier, PatchDocument, region
list_resourcesgateways_list_onlySELECTregion
get_resourcegatewaysSELECTIdentifier, region

SELECT examples

Gets all properties from an individual gateway.

SELECT
region,
gateway_name,
gateway_platform,
gateway_version,
tags,
gateway_id,
gateway_capability_summaries
FROM awscc.iotsitewise.gateways
WHERE
region = '{{ region }}' AND
Identifier = '{{ gateway_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new gateway resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.iotsitewise.gateways (
GatewayName,
GatewayPlatform,
region
)
SELECT
'{{ gateway_name }}',
'{{ gateway_platform }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a gateway resource, using stack-deploy.

/*+ update */
UPDATE awscc.iotsitewise.gateways
SET PatchDocument = string('{{ {
"GatewayName": gateway_name,
"Tags": tags,
"GatewayCapabilitySummaries": gateway_capability_summaries
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ gateway_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.iotsitewise.gateways
WHERE
Identifier = '{{ gateway_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the gateways resource, the following permissions are required:

iotsitewise:CreateGateway,
iotsitewise:DescribeGateway,
iotsitewise:DescribeGatewayCapabilityConfiguration,
iotsitewise:UpdateGatewayCapabilityConfiguration,
iam:PassRole,
iam:GetRole,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource