steampipe plugin install aws

Table: aws_iot_thing_group - Query AWS IoT Thing Groups using SQL

In AWS IoT Core, an IoT Thing Group is a logical collection of IoT devices (Things) that enables collective management and interaction. These groups are integral to AWS IoT Core's device management capabilities, allowing for organized, efficient control and management of device fleets. This is particularly advantageous in large-scale IoT deployments where individual device management is not feasible.

Table Usage Guide

The aws_iot_thing_group table can be utilized to obtain detailed information about IoT Thing Groups. This includes their names, IDs, descriptions, and hierarchical structures. This table is essential for IoT administrators and developers for effective organization and oversight of groups of IoT devices within AWS.

Examples

Basic info

Acquire essential details about AWS IoT Thing Groups, including their names, IDs, descriptions, and hierarchical relationships. This fundamental query is crucial for an overview of the groups and their structures.

select
group_name,
thing_group_id,
thing_group_description,
arn,
creation_date,
parent_group_name
from
aws_iot_thing_group;
select
group_name,
thing_group_id,
thing_group_description,
arn,
creation_date,
parent_group_name
from
aws_iot_thing_group;

Filter thing groups by parent group

Identify specific IoT Thing Groups based on their parent group. This query is useful for analyzing the hierarchical organization of your IoT devices.

select
group_name,
thing_group_id,
creation_date,
parent_group_name,
version
from
aws_iot_thing_group
where
parent_group_name = 'foo';
select
group_name,
thing_group_id,
creation_date,
parent_group_name,
version
from
aws_iot_thing_group
where
parent_group_name = 'foo';

List thing groups created in the last 30 days

Discover Thing Groups that have been created in the last 30 days. This query helps in tracking recent additions to your IoT environment.

select
group_name,
thing_group_id,
parent_group_name,
creation_date,
status
from
aws_iot_thing_group
where
creation_date >= now() - interval '30 days';
select
group_name,
thing_group_id,
parent_group_name,
creation_date,
status
from
aws_iot_thing_group
where
datetime(creation_date) >= datetime('now', '-30 days');

List active thing groups

List Thing Groups that are currently being used to manage and organize devices (referred to as "things") within your IoT environment.

select
group_name,
thing_group_id,
query_string,
query_version,
status
from
aws_iot_thing_group
where
status = 'ACTIVE';
select
group_name,
thing_group_id,
query_string,
query_version,
status
from
aws_iot_thing_group
where
status = 'ACTIVE';

Schema for aws_iot_thing_group

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The AWS Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
arntextThe Amazon Resource Name (ARN) for the thing group.
attribute_payloadjsonbThe thing group attributes in JSON format.
creation_datetimestamp with time zoneThe UNIX timestamp of when the thing group was created.
group_nametext=The group name.
index_nametextThe dynamic thing group index name.
parent_group_nametext=The parent thing group name.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
query_stringtextThe dynamic thing group search query string.
query_versiontextThe dynamic thing group query version.
regiontextThe AWS Region in which the resource is located.
root_to_parent_thing_groupsjsonbThe root parent thing group.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statustextThe dynamic thing group status.
tagsjsonbA map of tags for the resource.
tags_srcjsonbA list of tags currently associated with the thing group.
thing_group_descriptiontextThe thing group description.
thing_group_idtextThe thing group ID.
titletextTitle of the resource.
versionbigintThe version of the thing group.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws

You can pass the configuration to the command with the --config argument:

steampipe_export_aws --config '<your_config>' aws_iot_thing_group