Table: aws_oam_link - Query AWS OAM Links using SQL
The AWS OAM (Operations Account Management) Link is a service that allows you to manage and organize your AWS accounts. It provides a simple way to create and manage links between your AWS accounts and your AWS Organizations. This makes it easier to manage your accounts, reduce operational overhead, and improve security compliance across your organization.
Table Usage Guide
The aws_oam_link
table in Steampipe provides you with information about the links between an AWS resource and an AWS OAM (Operations Account Management) resource. This table allows you, as a DevOps engineer, to query link-specific details, including the link status, link type, and associated metadata. You can utilize this table to gather insights on links, such as their current status, the type of AWS resource linked, the type of OAM resource linked, and more. The schema outlines for you the various attributes of the OAM link, including the link ID, creation date, status, and associated tags.
Examples
Basic info
Explore which AWS resources are linked in your environment to understand the connections and dependencies between them. This could be useful for instance, in managing and optimizing your cloud resources or troubleshooting issues.
select id, arn, sink_arn, label, resource_typesfrom aws_oam_link;
select id, arn, sink_arn, label, resource_typesfrom aws_oam_link;
Get sink details of each link
Explore the connections between different components in your network to understand the flow of data. This can help in identifying bottlenecks or potential points of failure, enhancing overall system efficiency and reliability.
select l.id, l.arn, s.name as sink_name, l.sink_arnfrom aws_oam_link as l, aws_oam_sink as s;
select l.id, l.arn, s.name as sink_name, l.sink_arnfrom aws_oam_link as l, aws_oam_sink as s;
List links that share data of CloudWatch log group resource type
Determine the areas in which links are sharing data of a specific CloudWatch log group resource type. This can be useful for assessing the elements within your AWS environment that are interacting with these log groups, aiding in both security and resource management.
select l.id, l.arn, l.label, l.label_template, r as resource_typefrom aws_oam_link as l, jsonb_array_elements_text(resource_types) as rwhere r = 'AWS::Logs::LogGroup';
select l.id, l.arn, l.label, l.label_template, json_extract(r.value, '$') as resource_typefrom aws_oam_link as l, json_each(resource_types) as rwhere json_extract(r.value, '$') = 'AWS::Logs::LogGroup';
Schema for aws_oam_link
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
arn | text | = | The ARN of the link. |
id | text | The random ID string that Amazon Web Service generates as part of the link ARN. | |
label | text | The label that was assigned to this link at creation, with the variables resolved to their actual values. | |
label_template | text | The exact label template that was specified when the link was created, with the template variables not resolved. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
region | text | The AWS Region in which the resource is located. | |
resource_types | jsonb | The resource types supported by this link. | |
sink_arn | text | The ARN of the sink that this link is attached to. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
tags | jsonb | A map of tags for the resource. | |
title | text | Title 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_oam_link