Table: fastly_service_version - Query Fastly Service Versions using SQL
Fastly Service Versions are an integral part of Fastly's edge cloud platform. Each version of a service represents a specific configuration. Users can create new versions, clone existing versions, activate a particular version, and much more.
Table Usage Guide
The fastly_service_version
table provides deep visibility into the versions of Fastly services. If you are a DevOps engineer or an IT administrator, this table can be extremely useful for tracking changes, understanding the configuration of each version, and managing your Fastly services more efficiently. It provides details about each version, including its status, settings, and associated services.
Examples
Basic info
Explore active services within Fastly by identifying the services that are currently active, when they were created, and whether they are locked. This query is useful for understanding the status of your services and their history.
select service_id, number, active, created_at, lockedfrom fastly_service_version;
select service_id, number, active, created_at, lockedfrom fastly_service_version;
List versions created in the last 30 days
Explore which service versions have been created in the last 30 days. This is useful for tracking recent changes and updates, determining the active status, and identifying if any versions have been locked.
select service_id, number, active, created_at, lockedfrom fastly_service_versionwhere created_at >= now() - interval '30 days';
select service_id, number, active, created_at, lockedfrom fastly_service_versionwhere created_at >= datetime('now', '-30 days');
List all inactive versions
Explore which service versions are inactive in Fastly, allowing you to understand the history and management of your service versions. This can be particularly useful when reviewing changes or troubleshooting issues.
select service_id, number, active, created_at, lockedfrom fastly_service_versionwhere not active;
select service_id, number, active, created_at, lockedfrom fastly_service_versionwhere active = 0;
List all locked versions
Explore which service versions are currently locked. This could be useful in understanding the status of your services and identifying any potential issues or bottlenecks.
select service_id, number, active, created_at, lockedfrom fastly_service_versionwhere locked;
select service_id, number, active, created_at, lockedfrom fastly_service_versionwhere locked = 1;
List versions that are not deleted
Analyze the settings of your Fastly service to identify all versions that are still active and not deleted, allowing you to manage and streamline your services effectively. This can be particularly useful in maintaining a clean and efficient service environment.
select service_id, number, active, created_at, lockedfrom fastly_service_versionwhere deleted_at is null;
select service_id, number, active, created_at, lockedfrom fastly_service_versionwhere deleted_at is null;
Schema for fastly_service_version
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
active | boolean | Whether this is the active version or not. | |
comment | text | A freeform descriptive note. | |
created_at | timestamp with time zone | Timestamp (UTC) of when the version was created. | |
deleted_at | timestamp with time zone | Timestamp (UTC) of when the version was deleted. | |
deployed | boolean | Whether the version is deployed. | |
locked | boolean | Whether this version is locked or not. Objects can not be added or edited on locked versions. | |
number | bigint | The number of this version. | |
service_id | text | =, !=, ~~, ~~*, !~~, !~~* | Alphanumeric string identifying the service. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
staging | boolean | Whether the version is in staging. | |
testing | boolean | Whether the version is undergoing testing. | |
updated_at | timestamp with time zone | Timestamp (UTC) of when the version was updated. |
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)" -- fastly
You can pass the configuration to the command with the --config
argument:
steampipe_export_fastly --config '<your_config>' fastly_service_version