turbot/alicloud
steampipe plugin install alicloud

Table: alicloud_ecs_key_pair - Query Alibaba Cloud ECS Key Pairs using SQL

Alibaba Cloud Elastic Compute Service (ECS) provides scalable, on-demand cloud servers for secure, flexible, and efficient application environments. ECS supports the key pairs method for logging on to an instance. A key pair consists of a public key and a private key. You can use key pairs to log on to your instances securely without entering a password.

Table Usage Guide

The alicloud_ecs_key_pair table provides insights into key pairs within Alibaba Cloud Elastic Compute Service (ECS). As a system administrator or DevOps engineer, explore key pair-specific details through this table, including the key pair name, creation time, key pair fingerprint, and resource group ID. Utilize it to manage and monitor your key pairs, ensuring secure and efficient access to your instances.

Examples

Basic info

Determine the areas in which specific resources are being utilized by assessing the creation time and associated resource group. This can help in managing and optimizing resource allocation in a cloud environment.

select
name,
key_pair_finger_print,
creation_time,
resource_group_id
from
alicloud_ecs_key_pair;
select
name,
key_pair_finger_print,
creation_time,
resource_group_id
from
alicloud_ecs_key_pair;

List key pairs older than 30 days

Discover key pairs that have been in existence for over 30 days. This is useful for maintaining security and access control by regularly updating or changing key pairs.

select
name,
key_pair_finger_print,
creation_time,
age(creation_time)
from
alicloud_ecs_key_pair
where
creation_time <= (current_date - interval '30' day)
order by
creation_time;
select
name,
key_pair_finger_print,
creation_time,
julianday('now') - julianday(creation_time) as age
from
alicloud_ecs_key_pair
where
julianday(creation_time) <= julianday(date('now', '-30 day'))
order by
creation_time;

Schema for alicloud_ecs_key_pair

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The Alicloud Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
creation_timetimestamp with time zoneThe time when the key pair was created.
key_pair_finger_printtextThe fingerprint of the key pair.
nametext=The name of the key pair.
regiontextThe Alicloud region in which the resource is located.
resource_group_idtextThe ID of the resource group to which the key pair belongs.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
tagsjsonbA map of tags for the resource.
tags_srcjsonbA list of tags attached with the resource.
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)" -- alicloud

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

steampipe_export_alicloud --config '<your_config>' alicloud_ecs_key_pair