Prefect blocks allow you to manage configuration schemas, infrastructure, and secrets for use with deployments or flow scripts.
prefect block type ls
from the CLI or navigate to the Blocks page in the UI and click +.
SecretStr
type which are stored with additional encryption and not displayed by default in the UI.
Block types are identified by a slug that is not configurable.
S3Bucket
block contains methods for downloading data from, or upload data to, an S3 bucket; a SnowflakeConnector
block contains methods for querying Snowflake databases.
Returning to our Cube
example from above:
load
method with the relevant document name.Block | Slug | Description |
---|---|---|
Custom Webhook | custom-webhook | Call custom webhooks. |
Discord Webhook | discord-webhook | Call Discord webhooks. |
Local File System | local-file-system | Store data as a file on a local file system. |
Mattermost Webhook | mattermost-webhook | Send notifications through a provided Mattermost webhook. |
Microsoft Teams Webhook | ms-teams-webhook | Send notifications through a provided Microsoft Teams webhook. |
Opsgenie Webhook | opsgenie-webhook | Send notifications through a provided Opsgenie webhook. |
Pager Duty Webhook | pager-duty-webhook | Send notifications through a provided PagerDuty webhook. |
Remote File System | remote-file-system | Access files on a remote file system. |
Secret | secret | Store a secret value. The value will be obfuscated when this block is logged or shown in the UI. |
Sendgrid Email | sendgrid-email | Send notifications through Sendgrid email. |
Slack Webhook | slack-webhook | Send notifications through a provided Slack webhook. |
SMB | smb | Store data as a file on a SMB share. |
Twilio SMS | twilio-sms | Send notifications through Twilio SMS. |
prefect blocks register
.For example, to register all built-in notification blocks, run prefect block register -m prefect.blocks.notifications
.prefect-aws
library is installed.
Find available block types in many of the published Prefect integrations libraries.
If a block type is not available in the UI, you can register it through the CLI.
Block | Slug | Integration |
---|---|---|
ECS Task | ecs-task | prefect-aws |
MinIO Credentials | minio-credentials | prefect-aws |
S3 Bucket | s3-bucket | prefect-aws |
Azure Blob Storage Credentials | azure-blob-storage-credentials | prefect-azure |
Azure Container Instance Credentials | azure-container-instance-credentials | prefect-azure |
Azure Container Instance Job | azure-container-instance-job | prefect-azure |
Azure Cosmos DB Credentials | azure-cosmos-db-credentials | prefect-azure |
AzureML Credentials | azureml-credentials | prefect-azure |
BitBucket Credentials | bitbucket-credentials | prefect-bitbucket |
BitBucket Repository | bitbucket-repository | prefect-bitbucket |
Databricks Credentials | databricks-credentials | prefect-databricks |
dbt CLI BigQuery Target Configs | dbt-cli-bigquery-target-configs | prefect-dbt |
dbt CLI Profile | dbt-cli-profile | prefect-dbt |
dbt Cloud Credentials | dbt-cloud-credentials | prefect-dbt |
dbt CLI Global Configs | dbt-cli-global-configs | prefect-dbt |
dbt CLI Postgres Target Configs | dbt-cli-postgres-target-configs | prefect-dbt |
dbt CLI Snowflake Target Configs | dbt-cli-snowflake-target-configs | prefect-dbt |
dbt CLI Target Configs | dbt-cli-target-configs | prefect-dbt |
Docker Container | docker-container | prefect-docker |
Docker Host | docker-host | prefect-docker |
Docker Registry Credentials | docker-registry-credentials | prefect-docker |
Email Server Credentials | email-server-credentials | prefect-email |
BigQuery Warehouse | bigquery-warehouse | prefect-gcp |
GCP Cloud Run Job | cloud-run-job | prefect-gcp |
GCP Credentials | gcp-credentials | prefect-gcp |
GcpSecret | gcpsecret | prefect-gcp |
GCS Bucket | gcs-bucket | prefect-gcp |
Vertex AI Custom Training Job | vertex-ai-custom-training-job | prefect-gcp |
GitHub Credentials | github-credentials | prefect-github |
GitHub Repository | github-repository | prefect-github |
GitLab Credentials | gitlab-credentials | prefect-gitlab |
GitLab Repository | gitlab-repository | prefect-gitlab |
Kubernetes Cluster Config | kubernetes-cluster-config | prefect-kubernetes |
Kubernetes Credentials | kubernetes-credentials | prefect-kubernetes |
Kubernetes Job | kubernetes-job | prefect-kubernetes |
Shell Operation | shell-operation | prefect-shell |
Slack Credentials | slack-credentials | prefect-slack |
Slack Incoming Webhook | slack-incoming-webhook | prefect-slack |
Snowflake Connector | snowflake-connector | prefect-snowflake |
Snowflake Credentials | snowflake-credentials | prefect-snowflake |
Database Credentials | database-credentials | prefect-sqlalchemy |
SQLAlchemy Connector | sqlalchemy-connector | prefect-sqlalchemy |