components-contrib/state/postgresql/metadata.yaml

96 lines
3.4 KiB
YAML

# yaml-language-server: $schema=../../component-metadata-schema.json
schemaVersion: v1
type: state
name: postgresql
version: v1
status: stable
title: "PostgreSQL"
urls:
- title: Reference
url: https://docs.dapr.io/reference/components-reference/supported-state-stores/setup-postgresql/
capabilities:
# If actorStateStore is present, the metadata key actorStateStore can be used
- actorStateStore
- crud
- transactional
- etag
- query
- ttl
builtinAuthenticationProfiles:
- name: "azuread"
metadata:
- name: useAzureAD
required: true
type: bool
example: '"true"'
description: |
Must be set to `true` to enable the component to retrieve access tokens from Azure AD.
This authentication method only works with Azure Database for PostgreSQL databases.
- name: connectionString
required: true
sensitive: true
description: |
The connection string for the PostgreSQL database
This must contain the user, which corresponds to the name of the user created inside PostgreSQL that maps to the Azure AD identity; this is often the name of the corresponding principal (e.g. the name of the Azure AD application). This connection string should not contain any password.
example: |
"host=mydb.postgres.database.azure.com user=myapplication port=5432 database=dapr_test sslmode=require"
type: string
authenticationProfiles:
- title: "Connection string"
description: "Authenticate using a Connection String"
metadata:
- name: connectionString
required: true
sensitive: true
description: The connection string for the PostgreSQL database
example: |
"host=localhost user=postgres password=example port=5432 connect_timeout=10 database=dapr_test"
type: string
metadata:
- name: timeoutInSeconds
required: false
description: Timeout, in seconds, for all database operations.
example: "30"
default: "20"
type: number
- name: tableName
required: false
description: |
Name of the table where the data is stored.
Can optionally have the schema name as prefix, such as `public.state`
example: "public.state"
default: "state"
type: string
- name: metadataTableName
required: false
description: |
Name of the table Dapr uses to store a few metadata properties.
Can optionally have the schema name as prefix, such as `public.dapr_metadata`
example: "public.dapr_metadata"
default: "dapr_metadata"
type: string
- name: cleanupIntervalInSeconds
required: false
description: |
Interval, in seconds, to clean up rows with an expired TTL.
Setting this to values <=0 disables the periodic cleanup.
example: "1800"
default: "3600" # 1h
type: number
- name: maxConns
required: false
description: |
Maximum number of connections pooled by this component.
Set to 0 or lower to use the default value, which is the greater of 4 or the number of CPUs.
example: "4"
default: "0"
type: number
- name: connectionMaxIdleTime
required: false
description: |
Max idle time before unused connections are automatically closed in the
connection pool. By default, there's no value and this is left to the
database driver to choose.
example: "5m"
type: duration