steampipe plugin install aws

Table: aws_organizations_root - Query AWS Organizations Root using SQL

AWS Organizations uses a hierarchical structure to manage accounts. At the top of this hierarchy is the "root." The root is the starting point for organizing your AWS accounts. The root acts as the parent container for all the accounts in your organization. It can also contain organizational units (OUs), which are sub-containers that can themselves contain accounts or further nested OUs.

Table Usage Guide

The aws_organizations_root table in Steampipe provides you the information about AWS Organizations Root Account.

Examples

Basic info

It's particularly useful in contexts where managing or auditing AWS Organizations.

select
name,
id,
arn
from
aws_organizations_root;
select
name,
id,
arn
from
aws_organizations_root;

Get the policy details attached to organization root account

The types of policies that are currently enabled for the root and therefore can be attached to the root or to its OUs or accounts.

select
id,
name,
p ->> 'Status' as policy_status,
p ->> 'Type' as policy_type
from
aws_organizations_root,
jsonb_array_elements(policy_types) as p;
select
id,
name,
json_extract(json_each.value, '$.Status') AS policy_status,
json_extract(json_each.value, '$.Type') AS policy_type
from
aws_organizations_root,
json_each(policy_types) as p;

Schema for aws_organizations_root

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) of the root.
idtextThe unique identifier (ID) for the root.
nametextThe friendly name of the root.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
policy_typesjsonbThe types of policies that are currently enabled for the root and therefore can be attached to the root or to its OUs or accounts.
regiontextThe AWS Region in which the resource is located.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
titletextTitle of the resource.

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_organizations_root