gateways
Creates, updates, deletes or gets a gateway resource or lists gateways in a region
Overview
| Name | gateways |
| Type | Resource |
| Description | Resource schema for AWS::IoTSiteWise::Gateway |
| Id | awscc.iotsitewise.gateways |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
gateway_name | string | A unique, friendly name for the gateway. |
gateway_platform | object | The gateway's platform. You can only specify one platform in a gateway. |
gateway_version | string | The version of the gateway you want to create. |
tags | array | A list of key-value pairs that contain metadata for the gateway. |
gateway_id | string | The ID of the gateway device. |
gateway_capability_summaries | array | A list of gateway capability summaries that each contain a namespace and status. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
gateway_id | string | The ID of the gateway device. |
region | string | AWS region. |
For more information, see AWS::IoTSiteWise::Gateway.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | gateways | INSERT | GatewayName, GatewayPlatform, region |
delete_resource | gateways | DELETE | Identifier, region |
update_resource | gateways | UPDATE | Identifier, PatchDocument, region |
list_resources | gateways_list_only | SELECT | region |
get_resource | gateways | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all gateways in a region.
SELECT
region,
gateway_id
FROM awscc.iotsitewise.gateways_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new gateway resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ 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
;
/*+ create */
INSERT INTO awscc.iotsitewise.gateways (
GatewayName,
GatewayPlatform,
GatewayVersion,
Tags,
GatewayCapabilitySummaries,
region
)
SELECT
'{{ gateway_name }}',
'{{ gateway_platform }}',
'{{ gateway_version }}',
'{{ tags }}',
'{{ gateway_capability_summaries }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: gateway
props:
- name: gateway_name
value: '{{ gateway_name }}'
- name: gateway_platform
value:
greengrass_v2:
core_device_thing_name: '{{ core_device_thing_name }}'
core_device_operating_system: '{{ core_device_operating_system }}'
siemens_ie:
iot_core_thing_name: '{{ iot_core_thing_name }}'
- name: gateway_version
value: '{{ gateway_version }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: gateway_capability_summaries
value:
- capability_namespace: '{{ capability_namespace }}'
capability_configuration: '{{ capability_configuration }}'
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:
| Parameter | Description |
|---|---|
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:
- Create
- Read
- Update
- Delete
- List
iotsitewise:CreateGateway,
iotsitewise:DescribeGateway,
iotsitewise:DescribeGatewayCapabilityConfiguration,
iotsitewise:UpdateGatewayCapabilityConfiguration,
iam:PassRole,
iam:GetRole,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource
iotsitewise:DescribeGateway,
iotsitewise:DescribeGatewayCapabilityConfiguration,
iotsitewise:ListTagsForResource
iotsitewise:UpdateGateway,
iotsitewise:UpdateGatewayCapabilityConfiguration,
iotsitewise:TagResource,
iotsitewise:UntagResource,
iotsitewise:DescribeGateway,
iotsitewise:DescribeGatewayCapabilityConfiguration,
iotsitewise:ListTagsForResource
iotsitewise:DescribeGateway,
iotsitewise:DescribeGatewayCapabilityConfiguration,
iotsitewise:DeleteGateway
iotsitewise:ListGateways,
iotsitewise:ListTagsForResource