Skip to content

Commit

Permalink
Updated the doc to match the latest doc format and added the hydrated…
Browse files Browse the repository at this point in the history
… config for rate limiter
  • Loading branch information
ParthaI committed Jan 30, 2024
1 parent 02cbb65 commit e42af98
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 14 deletions.
8 changes: 7 additions & 1 deletion aws/table_aws_iot_thing_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ func tableAwsIotThingType(_ context.Context) *plugin.Table {
},
List: &plugin.ListConfig{
Hydrate: listIotThingTypes,
Tags: map[string]string{"service": "iot", "action": "ListThingTypes"},
Tags: map[string]string{"service": "iot", "action": "ListThingTypes"},
},
HydrateConfig: []plugin.HydrateConfig{
{
Func: getIotThingType,
Tags: map[string]string{"service": "iot", "action": "DescribeThingType"},
},
},
GetMatrixItemFunc: SupportedRegionMatrix(iotv1.EndpointsID),
Columns: awsRegionalColumns([]*plugin.Column{
Expand Down
97 changes: 84 additions & 13 deletions docs/tables/aws_iot_thing_type.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
# Table: aws_iot_thing_type
---
title: "Steampipe Table: aws_iot_thing_type - Query AWS IoT Thing Type using SQL"
description: "Allows users to query AWS IoT Thing Type to gain insights into each thing type's configuration, including ARN, name, creation date, and deprecation status."
---

AWS IoT Thing Type is a feature in AWS IoT Core that allows you to categorize your IoT devices (Things) into different types based on common characteristics or use cases. A Thing Type is essentially a template that defines attributes and properties common to a particular class or category of devices. By defining Thing Types, you can manage and interact with groups of Things more effectively and consistently.
# Table: aws_iot_thing_type - Query AWS IoT Thing Types using SQL

In AWS IoT Core, the IoT Thing Type feature enables the categorization of IoT devices (Things) into different types based on shared characteristics or use cases. A Thing Type acts as a template, defining attributes and properties common to a specific class or category of devices. Defining Thing Types facilitates more effective and consistent management and interaction with groups of Things.

## Table Usage Guide

The `aws_iot_thing_type` table can be used to access detailed information about the types of IoT Things, including their names, IDs, descriptions, and creation dates. This table is particularly useful for IoT administrators and developers who need to oversee the classification and properties of IoT devices within AWS.

## Examples

### Basic info
### Basic Info
Retrieve essential details about AWS IoT Thing Types. This query is vital for understanding the various types of IoT Things, their descriptions, and when they were created.

```sql+postgres
select
thing_type_name,
arn,
thing_type_id,
thing_type_description,
creation_date
from
aws_iot_thing_type;
```

```sql
```sql+sqlite
select
thing_type_name,
arn,
Expand All @@ -17,9 +38,10 @@ from
aws_iot_thing_type;
```

### List deprecated thing types
### List Deprecated Thing Types
Identify Thing Types that have been marked as deprecated. This query helps track Thing Types that are no longer recommended for use.

```sql
```sql+postgres
select
thing_type_name,
arn,
Expand All @@ -33,9 +55,39 @@ where
deprecated;
```

### List thing types created in the last 30 days
```sql+sqlite
select
thing_type_name,
arn,
thing_type_id,
thing_type_description,
creation_date,
deprecated
from
aws_iot_thing_type
where
deprecated;
```

### List Thing Types Created in the Last 30 Days
Find Thing Types that were created within the last 30 days. This query is useful for monitoring recent additions and updates in your IoT environment.

```sql+postgres
select
thing_type_name,
arn,
thing_type_id,
thing_type_description,
creation_date,
deprecated,
searchable_attributes
from
aws_iot_thing_type
where
creation_date >= now() - interval '30 days';
```

```sql
```sql+sqlite
select
thing_type_name,
arn,
Expand All @@ -47,12 +99,13 @@ select
from
aws_iot_thing_type
where
creation_date >= now() - interval '30' day;
datetime(creation_date) >= datetime('now', '-30 days');
```

### List thing types scheduled for deprecation within the next 30 days
### List Thing Types Scheduled for Deprecation Within the Next 30 Days
Discover Thing Types scheduled for deprecation in the next 30 days. This query assists in proactive planning for transitioning away from soon-to-be deprecated Thing Types.

```sql
```sql+postgres
select
thing_type_name,
arn,
Expand All @@ -63,5 +116,23 @@ select
from
aws_iot_thing_type
where
deprecation_date <= now() - interval '30' day;
```
deprecation_date <= now() - interval '30 days';
```

```sql+sqlite
select
thing_type_name,
arn,
thing_type_id,
creation_date,
tags,
deprecation_date
from
aws_iot_thing_type
where
datetime(deprecation_date) <= datetime('now', '-30 days');
```

---

This updated format offers a comprehensive guide for querying AWS IoT Thing Types using SQL, supporting various operational and management needs in IoT environments.

0 comments on commit e42af98

Please sign in to comment.