components-contrib/state/postgresql/v1/metadata.yaml

152 lines
5.8 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
- name: "aws"
metadata:
- name: useAWSIAM
required: true
type: bool
example: '"true"'
description: |
Must be set to `true` to enable the component to retrieve access tokens from AWS IAM.
This authentication method only works with AWS Relational Database Service 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 AWS IAM policy. This connection string should not contain any password. Note that the database name field is denoted by dbname with AWS.
example: |
"host=mydb.postgres.database.aws.com user=myapplication port=5432 dbname=dapr_test sslmode=require"
type: string
- name: awsAccessKey
type: string
required: false
description: |
Deprecated as of Dapr 1.17. Use 'accessKey' instead if using AWS IAM.
If both fields are set, then 'accessKey' value will be used.
AWS access key associated with an IAM account.
example: '"AKIAIOSFODNN7EXAMPLE"'
- name: awsSecretKey
type: string
required: false
sensitive: true
description: |
Deprecated as of Dapr 1.17. Use 'secretKey' instead if using AWS IAM.
If both fields are set, then 'secretKey' value will be used.
The secret key associated with the access key.
example: '"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"'
- name: awsRegion
type: string
required: false
description: |
This maintains backwards compatibility with existing fields.
It will be deprecated as of Dapr 1.17. Use 'region' instead.
The AWS Region where the AWS service is deployed to.
example: '"us-east-1"'
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: timeout
required: false
description: Timeout for all database operations.
example: "30s"
default: "20s"
type: duration
- 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: cleanupInterval
required: false
description: |
Interval to clean up rows with an expired TTL.
Setting this to values <=0 disables the periodic cleanup.
example: '"10m", "-1"'
default: "1h"
type: duration
- 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
- name: queryExecMode
required: false
description: |
Controls the default mode for executing queries. By default Dapr uses the extended protocol and automatically prepares and caches prepared statements.
However, this may be incompatible with proxies such as PGBouncer. In this case it may be preferrable to use `exec` or `simple_protocol`.
allowedValues:
- "cache_statement"
- "cache_describe"
- "describe_exec"
- "exec"
- "simple_protocol"
example: "cache_describe"
default: ""