Table: fastly_condition - Query Fastly Conditions using SQL
Fastly Conditions are logical expressions that specify when a particular behavior should be triggered in Fastly's Content Delivery Network (CDN) service. Conditions are used to control how and when certain actions are executed within Fastly. They are associated with specific Fastly services and can be used in various configurations like caching, routing, and response manipulation.
Table Usage Guide
The fastly_condition
table provides insights into the conditions configured within Fastly Content Delivery Network (CDN). As a site reliability engineer, explore condition-specific details through this table, including its type, statement, and associated service. Utilize it to uncover information about conditions, such as those used for caching policies, routing rules, or response manipulations.
Examples
Basic info
Explore the fundamental details of specific conditions within your Fastly service to understand their priority and creation time. This could be particularly useful for auditing and managing your service configurations effectively.
select name, service_id, service_version, type, priority, created_atfrom fastly_condition;
select name, service_id, service_version, type, priority, created_atfrom fastly_condition;
List conditions that are not deleted
Explore conditions within your Fastly service configuration that are still active and have not been deleted. This allows you to review and manage your current settings and priorities effectively.
select name, service_id, service_version, type, priority, created_atfrom fastly_conditionwhere deleted_at is null;
select name, service_id, service_version, type, priority, created_atfrom fastly_conditionwhere deleted_at is null;
List conditions that are of 'CACHE' type
Explore which conditions in your Fastly configuration are set to 'CACHE' type. This can help in managing cache behavior and troubleshooting caching issues.
select name, service_id, service_version, type, priority, created_atfrom fastly_conditionwhere type = 'CACHE';
select name, service_id, service_version, type, priority, created_atfrom fastly_conditionwhere type = 'CACHE';
List conditions that are of high priority
Explore which conditions within the Fastly service are marked as high priority. This can be useful in identifying areas that require immediate attention or action.
select name, service_id, service_version, type, priority, created_atfrom fastly_conditionwhere priority = 1;
select name, service_id, service_version, type, priority, created_atfrom fastly_conditionwhere priority = 1;
Schema for fastly_condition
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
comment | text | A freeform descriptive note. | |
created_at | timestamp with time zone | Timestamp (UTC) of when the condition was created. | |
deleted_at | timestamp with time zone | Timestamp (UTC) of when the condition was deleted. | |
name | text | = | Name of the condition. |
priority | bigint | Priority determines execution order. Lower numbers execute first. | |
service_id | text | =, !=, ~~, ~~*, !~~, !~~* | Alphanumeric string identifying the service. |
service_version | bigint | Integer identifying a service version. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
statement | text | A conditional expression in VCL used to determine if the condition is met. | |
title | text | Title of the resource. | |
type | text | Type of the condition. | |
updated_at | timestamp with time zone | Timestamp (UTC) of when the condition 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_condition