pydo.monitoring.create_destination()

Generated on 8 May 2026 from pydo version v0.34.0

Usage

client.monitoring.create_destination(
    body={
        "name": "managed_opensearch_cluster",
        "type": "opensearch_dbaas",
        "config": {...},
    },
)
Returns JSONRaises HttpResponseError

Description

To create a new destination, send a POST request to /v2/monitoring/sinks/destinations.

Parameters

name string optional

Example: managed_opensearch_cluster

destination name

type string required

The destination type. opensearch_dbaas for a DigitalOcean managed OpenSearch
cluster or opensearch_ext for an externally managed one.

One of: opensearch_dbaas, opensearch_ext

config object required
Show child properties
credentials object optional

Credentials for an OpenSearch cluster user. Optional if cluster_uuid is passed.

Show child properties
username string optional

Example: username

password string optional

Example: password

endpoint string required

Example: example.com

host of the OpenSearch cluster

cluster_uuid string optional

Example: 85148069-7e35-4999-80bd-6fa1637ca385

A unique identifier for a managed OpenSearch cluster.

cluster_name string optional

Example: managed_dbaas_cluster

Name of a managed OpenSearch cluster.

index_name string optional

Example: logs

OpenSearch index to send logs to.

retention_days integer optional

Example: 14

Number of days to retain logs in an OpenSearch cluster.

Default: 14

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "name": "managed_opensearch_cluster",
  "type": "opensearch_dbaas",
  "config": {
    "endpoint": "db-opensearch-nyc3-123456-do-user-123456-0.g.db.ondigitalocean.com",
    "cluster_uuid": "85148069-7e35-4999-80bd-6fa1637ca385",
    "cluster_name": "managed_dbaas_cluster",
    "index_name": "logs",
    "retention_days": 14
  }
}

resp = client.monitoring.create_destination(body=req)

Response Example

Show Response Example
{
  "destination": {
    "id": "01f30bfa-319a-4769-ba95-9d43971fb514",
    "name": "managed_opensearch_cluster",
    "type": "opensearch_dbaas",
    "config": {
      "id": "41078d41-165c-4cff-9f0a-19536e3e3d49",
      "endpoint": "example.com",
      "cluster_uuid": "85148069-7e35-4999-80bd-6fa1637ca385",
      "cluster_name": "managed_dbaas_cluster",
      "index_name": "logs",
      "retention_days": 14
    }
  }
}

More Information

See /v2/monitoring/sinks/destinations in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.