Table: turbot_smart_folder
Smart folders in Turbot allow groups of policies to be applied across a collection of resources.
Examples
List all smart folders
select id, titlefrom turbot_smart_folder;
List smart folders with their policy settings
select sf.trunk_title as smart_folder, pt.trunk_title as policy, ps.id, ps.precedence, ps.is_calculated, ps.valuefrom turbot_smart_folder as sf left join turbot_policy_setting as ps on ps.resource_id = sf.id left join turbot_policy_type as pt on pt.id = ps.policy_type_idorder by smart_folder;
List smart folders with their attached resources
Get each smart folder with an array of the resources attached to it:
select title, attached_resource_idsfrom turbot_smart_folderorder by title;
Create a row per smart folder and resource:
select sf.title as smart_folder, sf_resource_idfrom turbot_smart_folder as sf, jsonb_array_elements(sf.attached_resource_ids) as sf_resource_idorder by smart_folder, sf_resource_id;
Unfortunately, this query to join the smart folder with its resources does not work yet due to issues with qualifier handling in the Steampipe Postgres FDW:
select sf.title as smart_folder, r.trunk_title as resource, r.idfrom turbot_smart_folder as sf cross join jsonb_array_elements(sf.attached_resource_ids) as sf_resource_id left join turbot_resource as r on r.id = sf_resource_id :: bigint;
Schema for turbot_smart_folder
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
akas | jsonb | AKA (also known as) identifiers for the smart folder. | |
attached_resource_ids | jsonb | ||
color | text | Color of the smart folder in the UI. | |
create_timestamp | timestamp with time zone | When the smart folder was first discovered by Turbot. (It may have been created earlier.) | |
data | jsonb | Resource data. | |
description | text | Description of the smart folder. | |
id | bigint | = | Unique identifier of the smart folder. |
metadata | jsonb | Resource custom metadata. | |
parent_id | bigint | ID for the parent of this smart folder. | |
path | jsonb | Hierarchy path with all identifiers of ancestors of the smart folder. | |
resource_type_id | bigint | ID of the resource type for this smart folder. | |
resource_type_uri | text | URI of the resource type for this smart folder. | |
tags | jsonb | Tags for the smart folder. | |
timestamp | timestamp with time zone | Timestamp when the smart folder was last modified (created, updated or deleted). | |
title | text | Title of the smart folder. | |
trunk_title | text | Title with full path of the smart folder. | |
update_timestamp | timestamp with time zone | When the smart folder was last updated in Turbot. | |
version_id | bigint | Unique identifier for this version of the smart folder. | |
workspace | text | Specifies the workspace URL. |