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 = 'us-east-1' AND
Identifier = '{{ gateway_id }}';
Lists all gateways in a region.
SELECT
region,
gateway_id
FROM awscc.iotsitewise.gateways_list_only
WHERE
region = 'us-east-1';
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 }}';
/*+ create */
INSERT INTO awscc.iotsitewise.gateways (
GatewayName,
GatewayPlatform,
GatewayVersion,
Tags,
GatewayCapabilitySummaries,
region
)
SELECT
'{{ gateway_name }}',
'{{ gateway_platform }}',
'{{ gateway_version }}',
'{{ tags }}',
'{{ gateway_capability_summaries }}',
'{{ region }}';
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.iotsitewise.gateways
WHERE
Identifier = '{{ gateway_id }}' AND
region = 'us-east-1';
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