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_idfrom alicloud_ecs_key_pair;
select name, key_pair_finger_print, creation_time, resource_group_idfrom 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_pairwhere 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 agefrom alicloud_ecs_key_pairwhere julianday(creation_time) <= julianday(date('now', '-30 day'))order by creation_time;
Schema for alicloud_ecs_key_pair
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The Alicloud Account ID in which the resource is located. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
creation_time | timestamp with time zone | The time when the key pair was created. | |
key_pair_finger_print | text | The fingerprint of the key pair. | |
name | text | = | The name of the key pair. |
region | text | The Alicloud region in which the resource is located. | |
resource_group_id | text | The ID of the resource group to which the key pair belongs. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
tags | jsonb | A map of tags for the resource. | |
tags_src | jsonb | A list of tags attached with 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)" -- alicloud
You can pass the configuration to the command with the --config
argument:
steampipe_export_alicloud --config '<your_config>' alicloud_ecs_key_pair