steampipe plugin install fastly

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,
locked
from
fastly_service_version;
select
service_id,
number,
active,
created_at,
locked
from
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,
locked
from
fastly_service_version
where
created_at >= now() - interval '30 days';
select
service_id,
number,
active,
created_at,
locked
from
fastly_service_version
where
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,
locked
from
fastly_service_version
where
not active;
select
service_id,
number,
active,
created_at,
locked
from
fastly_service_version
where
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,
locked
from
fastly_service_version
where
locked;
select
service_id,
number,
active,
created_at,
locked
from
fastly_service_version
where
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,
locked
from
fastly_service_version
where
deleted_at is null;
select
service_id,
number,
active,
created_at,
locked
from
fastly_service_version
where
deleted_at is null;

Schema for fastly_service_version

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
activebooleanWhether this is the active version or not.
commenttextA freeform descriptive note.
created_attimestamp with time zoneTimestamp (UTC) of when the version was created.
deleted_attimestamp with time zoneTimestamp (UTC) of when the version was deleted.
deployedbooleanWhether the version is deployed.
lockedbooleanWhether this version is locked or not. Objects can not be added or edited on locked versions.
numberbigintThe number of this version.
service_idtextAlphanumeric string identifying the service.
stagingbooleanWhether the version is in staging.
testingbooleanWhether the version is undergoing testing.
updated_attimestamp with time zoneTimestamp (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