{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"To update a logsink for a database cluster, send a PUT request to\n`/v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID`.\n","properties":{"path":{"type":"object","properties":{"database_cluster_uuid":{"type":"string","format":"uuid","examples":["9cc10173-e9ea-4176-9dbc-a4cee4c4ff30"],"description":"A unique identifier for a database cluster."},"logsink_id":{"type":"string","examples":["50484ec3-19d6-4cd3-b56f-3b0381c289a6"],"description":"A unique identifier for a logsink of a database cluster"}},"required":["database_cluster_uuid","logsink_id"],"additionalProperties":false},"body":{"$ref":"#/definitions/logsink_update","examples":[{"config":{"server":"192.168.0.1","port":514,"tls":false,"format":"rfc3164"}}]}},"required":["path","body"],"additionalProperties":false,"definitions":{"logsink_update":{"type":"object","properties":{"config":{"anyOf":[{"$ref":"#/definitions/rsyslog_logsink"},{"$ref":"#/definitions/elasticsearch_logsink"},{"$ref":"#/definitions/opensearch_logsink"},{"$ref":"#/definitions/datadog_logsink"}]}},"required":["config"]},"rsyslog_logsink":{"type":"object","properties":{"server":{"type":"string","description":"DNS name or IPv4 address of the rsyslog server","examples":["192.168.0.1"]},"port":{"type":"integer","maximum":65535,"description":"The internal port on which the rsyslog server is listening","examples":[514]},"tls":{"type":"boolean","description":"Use TLS (as the messages are not filtered and may contain sensitive information, it is highly recommended to set this to true if the remote server supports it)","examples":[false]},"format":{"type":"string","enum":["rfc5424","rfc3164","custom"],"description":"Message format used by the server, this can be either rfc3164 (the old BSD style message format), `rfc5424` (current syslog message format) or custom","examples":["rfc5424"]},"logline":{"type":"string","description":"Conditional (required if `format` == `custom`).\n\nSyslog log line template for a custom format, supporting limited rsyslog style templating (using `%tag%`). Supported tags are: `HOSTNAME`, `app-name`, `msg`, `msgid`, `pri`, `procid`, `structured-data`, `timestamp` and `timestamp:::date-rfc3339`.\n\n---\n**Datadog Integration Example for Non-Mongo clusters**:\n```\nDD_KEY <%pri%>1 %timestamp:::date-rfc3339% %HOSTNAME%.DB_NAME %app-name% - - - %msg%\n```\n- Replace `DD_KEY` with your actual Datadog API key.\n- Replace `DB_NAME` with the actual name of your database cluster.\n- Configure the Server:\n  - US Region: Use `intake.logs.datadoghq.com`\n  - EU Region: Use `tcp-intake.logs.datadoghq.eu`\n- Configure the Port:\n  - US Region: Use port `10516`\n  - EU Region: Use port `443`\n- Enable TLS:\n  - Ensure the TLS checkbox is enabled.\n- Note: This configuration applies to **non-Mongo clusters only**. For **Mongo clusters**, use the `datadog_logsink` integration instead.\n","examples":["<%pri%>%timestamp:::date-rfc3339% %HOSTNAME% %app-name% %msg%"]},"sd":{"type":"string","description":"content of the structured data block of rfc5424 message","examples":["TOKEN tag=\"LiteralValue\""]},"ca":{"type":"string","description":"PEM encoded CA certificate","examples":["-----BEGIN CERTIFICATE-----\\n...\\n-----END CERTIFICATE-----\\n"]},"key":{"type":"string","description":"(PEM format) client key if the server requires client authentication","examples":["-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----\\n"]},"cert":{"type":"string","description":"(PEM format) client cert to use","examples":["-----BEGIN CERTIFICATE-----\\n...\\n-----END CERTIFICATE-----\\n"]}},"required":["server","port","tls","format"]},"elasticsearch_logsink":{"type":"object","properties":{"url":{"type":"string","description":"Elasticsearch connection URL","examples":["https://user:passwd@192.168.0.1:9200"]},"index_prefix":{"type":"string","description":"Elasticsearch index prefix","examples":["elastic-logs"]},"index_days_max":{"type":"integer","default":7,"maximum":10000,"minimum":1,"description":"Maximum number of days of logs to keep","examples":[5]},"timeout":{"type":"number","default":10,"minimum":10,"maximum":120,"description":"Elasticsearch request timeout limit","examples":[10]},"ca":{"type":"string","description":"PEM encoded CA certificate","examples":["-----BEGIN CERTIFICATE-----\\n...\\n-----END CERTIFICATE-----\\n"]}},"required":["url","index_prefix"]},"opensearch_logsink":{"type":"object","properties":{"url":{"type":"string","description":"Opensearch connection URL","examples":["https://user:passwd@192.168.0.1:9200"]},"index_prefix":{"type":"string","description":"Opensearch index prefix","examples":["opensearch-logs"]},"index_days_max":{"type":"integer","default":7,"maximum":10000,"minimum":1,"description":"Maximum number of days of logs to keep","examples":[5]},"timeout":{"type":"number","default":10,"minimum":10,"maximum":120,"description":"Opensearch request timeout limit","examples":[10]},"ca":{"type":"string","description":"PEM encoded CA certificate","examples":["-----BEGIN CERTIFICATE-----\\n...\\n-----END CERTIFICATE-----\\n"]}},"required":["url","index_prefix"]},"datadog_logsink":{"type":"object","description":"Configuration for Datadog integration **applicable only to MongoDB clusters**.\n","properties":{"site":{"type":"string","description":"Datadog connection URL","examples":["http-intake.logs.datadoghq.com"]},"datadog_api_key":{"type":"string","description":"Datadog API key","examples":["xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]}},"required":["site","datadog_api_key"]}}},"name":"Update Logsink for a Database Cluster\n","id":"digitalocean.databases_update_logsink","example":{"path":{"database_cluster_uuid":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30","logsink_id":"50484ec3-19d6-4cd3-b56f-3b0381c289a6"},"body":{"config":{"server":"192.168.0.1","port":514,"tls":false,"format":"rfc5424"}}},"maxRequests":1,"summary":false}}