Postgres Log Destination

Create a new PostgreSQL log destination

post/project/{project_id}/location/{location}/postgres/{postgres_database_reference}/log-destination

Request body

namestring required

Name for the Log Destination

type'otlp' | 'syslog' required

Destination type. "otlp" sends via OTLP HTTP (https://...); "syslog" sends via RFC 5424 over TLS (tcp://host:port)

urlstring required

Endpoint URL. For otlp: https://... For syslog: tcp://host:port

optionsobject

Authentication options. For otlp: {"headers": {"Header-Name": "value"}}. For syslog: {"structured_data": {"sd-id": {"key": "value"}}}

Response

A Postgres Log Destination

idstring required

ID of the log destination

namestring required

Name of the log destination

type'otlp' | 'syslog' required

Destination type: "otlp" or "syslog"

urlstring required

Destination URL

Example response

{
  "id": "1d000000000000000000000000"
}