Table: twilio_account_key - Query Twilio Account Keys using SQL
Twilio Account Keys are secure, revocable keys that are used to authenticate API requests. Each key is unique and can be used in place of a primary account SID and auth token. These keys can be created, viewed, and revoked through the Twilio console.
Table Usage Guide
The twilio_account_key
table provides insights into Twilio Account Keys. As a developer or system administrator, you can explore detailed information about each key, including its creation date, last update date, and status. This table is particularly useful for managing and auditing the use of API keys in your Twilio account.
Important Notes
- You must authenticate using either an Auth Token or a Main API Key to query this table.
Examples
Basic info
Determine the areas in which your Twilio account keys were created to manage and track their usage over time. This aids in understanding the account key's lifecycle and ensuring their optimal utilization.
select sid, friendly_name, date_createdfrom twilio_account_key;
select sid, friendly_name, date_createdfrom twilio_account_key;
List keys older than 90 days
Explore which Twilio account keys are older than 90 days to ensure timely key rotation and enhance security measures. This is useful in maintaining good security practices and avoiding potential vulnerabilities due to outdated keys.
select sid, friendly_name, date_created, extract( day from current_timestamp - date_created ) as agefrom twilio_account_keywhere extract( day from current_timestamp - date_created ) > 90;
select sid, friendly_name, date_created, julianday('now') - julianday(date_created) as agefrom twilio_account_keywhere julianday('now') - julianday(date_created) > 90;
Schema for twilio_account_key
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_sid | text | =, !=, ~~, ~~*, !~~, !~~* | The SID of the Account that created the resource. |
date_created | timestamp with time zone | The date and time that the resource was created. | |
date_updated | timestamp with time zone | The date and time that the resource was last updated. | |
friendly_name | text | The string that you assigned to describe the resource. | |
sid | text | The unique string that identifies the resource. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
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)" -- twilio
You can pass the configuration to the command with the --config
argument:
steampipe_export_twilio --config '<your_config>' twilio_account_key