pydo.databases.create_logsink()

Description

To create logsink for a database cluster, send a POST request to /v2/databases/$DATABASE_ID/logsink.

Parameters

Name Type Required Description Default Value
database_cluster_uuid string True A unique identifier for a database cluster.
body JSON or IO[bytes] True

Responses

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

A JSON object with a key of sink.

Click to expand an example response for Create an opensearch logsink.
{
  "value": {
    "sink": {
      "sink_id": "dfcc9f57d86bf58e321c2c6c31c7a971be244ac7",
      "sink_name": "logs-sink",
      "sink_type": "opensearch",
      "config": {
        "url": "https://user:[email protected]:25060",
        "index_prefix": "opensearch-logs",
        "index_days_max": 5
      }
    }
  }
}
Click to expand an example response for Create an elasticsearch logsink.
{
  "value": {
    "sink": {
      "sink_id": "dfcc9f57d86bf58e321c2c6c31c7a971be244ac7",
      "sink_name": "logs-sink",
      "sink_type": "elasticsearch",
      "config": {
        "url": "https://user:[email protected]:25060",
        "index_prefix": "elasticsearch-logs",
        "index_days_max": 5
      }
    }
  }
}
Click to expand an example response for Create a rsyslog logsink.
{
  "value": {
    "sink": {
      "sink_id": "dfcc9f57d86bf58e321c2c6c31c7a971be244ac7",
      "sink_name": "logs-sink",
      "sink_type": "rsyslog",
      "config": {
        "server": "192.168.0.1",
        "port": 514,
        "tls": false,
        "format": "rfc5424"
      }
    }
  }
}

Unauthorized

Click to expand an example response.
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}

The resource was not found.

Click to expand an example response.
{
  "id": "not_found",
  "message": "The resource you requested could not be found."
}

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}