openapi: 3.0.0 info: title: DigitalOcean Databases API version: '2.0' description: "# Introduction\n\nThe DigitalOcean API allows you to manage Droplets and resources within the\nDigitalOcean cloud in a simple, programmatic way using conventional HTTP requests.\n\nAll of the functionality that you are familiar with in the DigitalOcean\ncontrol panel is also available through the API, allowing you to script the\ncomplex actions that your situation requires.\n\nThe API documentation will start with a general overview about the design\nand technology that has been implemented, followed by reference information\nabout specific endpoints.\n\n## Requests\n\nAny tool that is fluent in HTTP can communicate with the API simply by\nrequesting the correct URI. Requests should be made using the HTTPS protocol\nso that traffic is encrypted. The interface responds to different methods\ndepending on the action required.\n\n|Method|Usage|\n|--- |--- |\n|GET|For simple retrieval of information about your account, Droplets, or environment, you should use the GET method. The information you request will be returned to you as a JSON object. The attributes defined by the JSON object can be used to form additional requests. Any request using the GET method is read-only and will not affect any of the objects you are querying.|\n|DELETE|To destroy a resource and remove it from your account and environment, the DELETE method should be used. This will remove the specified object if it is found. If it is not found, the operation will return a response indicating that the object was not found. This idempotency means that you do not have to check for a resource's availability prior to issuing a delete command, the final state will be the same regardless of its existence.|\n|PUT|To update the information about a resource in your account, the PUT method is available. Like the DELETE Method, the PUT method is idempotent. It sets the state of the target using the provided values, regardless of their current values. Requests using the PUT method do not need to check the current attributes of the object.|\n|PATCH|Some resources support partial modification. In these cases, the PATCH method is available. Unlike PUT which generally requires a complete representation of a resource, a PATCH request is a set of instructions on how to modify a resource updating only specific attributes.|\n|POST|To create a new object, your request should specify the POST method. The POST request includes all of the attributes necessary to create a new object. When you wish to create a new object, send a POST request to the target endpoint.|\n|HEAD|Finally, to retrieve metadata information, you should use the HEAD method to get the headers. This returns only the header of what would be returned with an associated GET request. Response headers contain some useful information about your API access and the results that are available for your request. For instance, the headers contain your current rate-limit value and the amount of time available until the limit resets. It also contains metrics about the total number of objects found, pagination information, and the total content length.|\n\n\n## HTTP Statuses\n\nAlong with the HTTP methods that the API responds to, it will also return\nstandard HTTP statuses, including error codes.\n\nIn the event of a problem, the status will contain the error code, while the\nbody of the response will usually contain additional information about the\nproblem that was encountered.\n\nIn general, if the status returned is in the 200 range, it indicates that\nthe request was fulfilled successfully and that no error was encountered.\n\nReturn codes in the 400 range typically indicate that there was an issue\nwith the request that was sent. Among other things, this could mean that you\ndid not authenticate correctly, that you are requesting an action that you\ndo not have authorization for, that the object you are requesting does not\nexist, or that your request is malformed.\n\nIf you receive a status in the 500 range, this generally indicates a\nserver-side problem. This means that we are having an issue on our end and\ncannot fulfill your request currently.\n\n400 and 500 level error responses will include a JSON object in their body,\nincluding the following attributes:\n\n|Name|Type|Description|\n|--- |--- |--- |\n|id|string|A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be \"not_found.\"|\n|message|string|A message providing additional information about the error, including details to help resolve it when possible.|\n|request_id|string|Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.|\n\n### Example Error Response\n\n```\n HTTP/1.1 403 Forbidden\n {\n \"id\": \"forbidden\",\n \"message\": \"You do not have access for the attempted action.\"\n }\n```\n\n## Responses\n\nWhen a request is successful, a response body will typically be sent back in\nthe form of a JSON object. An exception to this is when a DELETE request is\nprocessed, which will result in a successful HTTP 204 status and an empty\nresponse body.\n\nInside of this JSON object, the resource root that was the target of the\nrequest will be set as the key. This will be the singular form of the word\nif the request operated on a single object, and the plural form of the word\nif a collection was processed.\n\nFor example, if you send a GET request to `/v2/droplets/$DROPLET_ID` you\nwill get back an object with a key called \"`droplet`\". However, if you send\nthe GET request to the general collection at `/v2/droplets`, you will get\nback an object with a key called \"`droplets`\".\n\nThe value of these keys will generally be a JSON object for a request on a\nsingle object and an array of objects for a request on a collection of\nobjects.\n\n### Response for a Single Object\n\n```json\n {\n \"droplet\": {\n \"name\": \"example.com\"\n . . .\n }\n }\n```\n\n### Response for an Object Collection\n\n```json\n {\n \"droplets\": [\n {\n \"name\": \"example.com\"\n . . .\n },\n {\n \"name\": \"second.com\"\n . . .\n }\n ]\n }\n```\n\n## Meta\n\nIn addition to the main resource root, the response may also contain a\n`meta` object. This object contains information about the response itself.\n\nThe `meta` object contains a `total` key that is set to the total number of\nobjects returned by the request. This has implications on the `links` object\nand pagination.\n\nThe `meta` object will only be displayed when it has a value. Currently, the\n`meta` object will have a value when a request is made on a collection (like\n`droplets` or `domains`).\n\n\n### Sample Meta Object\n\n```json\n {\n . . .\n \"meta\": {\n \"total\": 43\n }\n . . .\n }\n```\n\n## Links & Pagination\n\nThe `links` object is returned as part of the response body when pagination\nis enabled. By default, 20 objects are returned per page. If the response\ncontains 20 objects or fewer, no `links` object will be returned. If the\nresponse contains more than 20 objects, the first 20 will be returned along\nwith the `links` object.\n\nYou can request a different pagination limit or force pagination by\nappending `?per_page=` to the request with the number of items you would\nlike per page. For instance, to show only two results per page, you could\nadd `?per_page=2` to the end of your query. The maximum number of results\nper page is 200.\n\nThe `links` object contains a `pages` object. The `pages` object, in turn,\ncontains keys indicating the relationship of additional pages. The values of\nthese are the URLs of the associated pages. The keys will be one of the\nfollowing:\n\n* **first**: The URI of the first page of results.\n* **prev**: The URI of the previous sequential page of results.\n* **next**: The URI of the next sequential page of results.\n* **last**: The URI of the last page of results.\n\nThe `pages` object will only include the links that make sense. So for the\nfirst page of results, no `first` or `prev` links will ever be set. This\nconvention holds true in other situations where a link would not make sense.\n\n### Sample Links Object\n\n```json\n {\n . . .\n \"links\": {\n \"pages\": {\n \"last\": \"https://api.digitalocean.com/v2/images?page=2\",\n \"next\": \"https://api.digitalocean.com/v2/images?page=2\"\n }\n }\n . . .\n }\n```\n\n## Rate Limit\n\nRequests through the API are rate limited per OAuth token. Current rate limits:\n\n* 5,000 requests per hour\n* 250 requests per minute (5% of the hourly total)\n\nOnce you exceed either limit, you will be rate limited until the next cycle\nstarts. Space out any requests that you would otherwise issue in bursts for\nthe best results.\n\nThe rate limiting information is contained within the response headers of\neach request. The relevant headers are:\n\n* **ratelimit-limit**: The number of requests that can be made per hour.\n* **ratelimit-remaining**: The number of requests that remain before you hit your request limit. See the information below for how the request limits expire.\n* **ratelimit-reset**: This represents the time when the oldest request will expire. The value is given in [Unix epoch time](http://en.wikipedia.org/wiki/Unix_time). See below for more information about how request limits expire.\n\nMore rate limiting information is returned only within burst limit error response headers:\n* **retry-after**: The number of seconds to wait before making another request when rate limited.\n\nAs long as the `ratelimit-remaining` count is above zero, you will be able\nto make additional requests.\n\nThe way that a request expires and is removed from the current limit count\nis important to understand. Rather than counting all of the requests for an\nhour and resetting the `ratelimit-remaining` value at the end of the hour,\neach request instead has its own timer.\n\nThis means that each request contributes toward the `ratelimit-remaining`\ncount for one complete hour after the request is made. When that request's\ntimer runs out, it is no longer counted towards the request limit.\n\nThis has implications on the meaning of the `ratelimit-reset` header as\nwell. Because the entire rate limit is not reset at one time, the value of\nthis header is set to the time when the _oldest_ request will expire.\n\nKeep this in mind if you see your `ratelimit-reset` value change, but not\nmove an entire hour into the future.\n\nIf the `ratelimit-remaining` reaches zero, subsequent requests will receive\na 429 error code until the request reset has been reached. \n\n`ratelimit-remaining` reaching zero can also indicate that the \"burst limit\" of 250 \nrequests per minute limit was met, even if the 5,000 requests per hour limit was not. \nIn this case, the 429 error response will include a `retry-after` header to indicate how \nlong to wait (in seconds) until the request may be retried.\n\nYou can see the format of the response in the examples. \n\n**Note:** The following endpoints have special rate limit requirements that\nare independent of the limits defined above.\n\n* Only 12 `POST` requests to the `/v2/floating_ips` endpoint to create Floating IPs can be made per 60 seconds.\n* Only 10 `GET` requests to the `/v2/account/keys` endpoint to list SSH keys can be made per 60 seconds.\n* Only 5 requests to any and all `v2/cdn/endpoints` can be made per 10 seconds. This includes `v2/cdn/endpoints`, \n `v2/cdn/endpoints/$ENDPOINT_ID`, and `v2/cdn/endpoints/$ENDPOINT_ID/cache`.\n* Only 50 strings within the `files` json struct in the `v2/cdn/endpoints/$ENDPOINT_ID/cache` [payload](https://docs.digitalocean.com/reference/api/api-reference/#operation/cdn_purge_cache) \n can be requested every 20 seconds.\n\n### Sample Rate Limit Headers\n\n```\n . . .\n ratelimit-limit: 1200\n ratelimit-remaining: 1193\n rateLimit-reset: 1402425459\n . . .\n```\n\n ### Sample Rate Limit Headers When Burst Limit is Reached:\n\n```\n . . .\n ratelimit-limit: 5000\n ratelimit-remaining: 0\n rateLimit-reset: 1402425459\n retry-after: 29\n . . .\n```\n\n### Sample Rate Exceeded Response\n\n```\n 429 Too Many Requests\n {\n id: \"too_many_requests\",\n message: \"API Rate limit exceeded.\"\n }\n```\n\n## Curl Examples\n\nThroughout this document, some example API requests will be given using the\n`curl` command. This will allow us to demonstrate the various endpoints in a\nsimple, textual format.\n \n These examples assume that you are using a Linux or macOS command line. To run\nthese commands on a Windows machine, you can either use cmd.exe, PowerShell, or WSL:\n\n* For cmd.exe, use the `set VAR=VALUE` [syntax](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/set_1)\nto define environment variables, call them with `%VAR%`, then replace all backslashes (`\\`) in the examples with carets (`^`).\n\n* For PowerShell, use the `$Env:VAR = \"VALUE\"` [syntax](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.2)\nto define environment variables, call them with `$Env:VAR`, then replace `curl` with `curl.exe` and all backslashes (`\\`) in the examples with backticks (`` ` ``).\n\n* WSL is a compatibility layer that allows you to emulate a Linux terminal on a Windows machine.\nInstall WSL with our [community tutorial](https://www.digitalocean.com/community/tutorials/how-to-install-the-windows-subsystem-for-linux-2-on-microsoft-windows-10), \nthen follow this API documentation normally.\n\nThe names of account-specific references (like Droplet IDs, for instance)\nwill be represented by variables. For instance, a Droplet ID may be\nrepresented by a variable called `$DROPLET_ID`. You can set the associated\nvariables in your environment if you wish to use the examples without\nmodification.\n\nThe first variable that you should set to get started is your OAuth\nauthorization token. The next section will go over the details of this, but\nyou can set an environmental variable for it now.\n\nGenerate a token by going to the [Apps & API](https://cloud.digitalocean.com/settings/applications)\nsection of the DigitalOcean control panel. Use an existing token if you have\nsaved one, or generate a new token with the \"Generate new token\" button.\nCopy the generated token and use it to set and export the TOKEN variable in\nyour environment as the example shows.\n\nYou may also wish to set some other variables now or as you go along. For\nexample, you may wish to set the `DROPLET_ID` variable to one of your\nDroplet IDs since this will be used frequently in the API.\n\nIf you are following along, make sure you use a Droplet ID that you control\nso that your commands will execute correctly.\n\nIf you need access to the headers of a response through `curl`, you can pass\nthe `-i` flag to display the header information along with the body. If you\nare only interested in the header, you can instead pass the `-I` flag, which\nwill exclude the response body entirely.\n\n\n### Set and Export your OAuth Token\n\n```\nexport DIGITALOCEAN_TOKEN=your_token_here\n```\n\n### Set and Export a Variable\n\n```\nexport DROPLET_ID=1111111\n```\n\n## Parameters\n\nThere are two different ways to pass parameters in a request with the API.\n\nWhen passing parameters to create or update an object, parameters should be\npassed as a JSON object containing the appropriate attribute names and\nvalues as key-value pairs. When you use this format, you should specify that\nyou are sending a JSON object in the header. This is done by setting the\n`Content-Type` header to `application/json`. This ensures that your request\nis interpreted correctly.\n\nWhen passing parameters to filter a response on GET requests, parameters can\nbe passed using standard query attributes. In this case, the parameters\nwould be embedded into the URI itself by appending a `?` to the end of the\nURI and then setting each attribute with an equal sign. Attributes can be\nseparated with a `&`. Tools like `curl` can create the appropriate URI when\ngiven parameters and values; this can also be done using the `-F` flag and\nthen passing the key and value as an argument. The argument should take the\nform of a quoted string with the attribute being set to a value with an\nequal sign.\n\n### Pass Parameters as a JSON Object\n\n```\n curl -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"name\": \"example.com\", \"ip_address\": \"127.0.0.1\"}' \\\n -X POST \"https://api.digitalocean.com/v2/domains\"\n```\n\n### Pass Filter Parameters as a Query String\n\n```\n curl -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -X GET \\\n \"https://api.digitalocean.com/v2/images?private=true\"\n```\n\n## Cross Origin Resource Sharing\n\nIn order to make requests to the API from other domains, the API implements\nCross Origin Resource Sharing (CORS) support.\n\nCORS support is generally used to create AJAX requests outside of the domain\nthat the request originated from. This is necessary to implement projects\nlike control panels utilizing the API. This tells the browser that it can\nsend requests to an outside domain.\n\nThe procedure that the browser initiates in order to perform these actions\n(other than GET requests) begins by sending a \"preflight\" request. This sets\nthe `Origin` header and uses the `OPTIONS` method. The server will reply\nback with the methods it allows and some of the limits it imposes. The\nclient then sends the actual request if it falls within the allowed\nconstraints.\n\nThis process is usually done in the background by the browser, but you can\nuse curl to emulate this process using the example provided. The headers\nthat will be set to show the constraints are:\n\n* **Access-Control-Allow-Origin**: This is the domain that is sent by the client or browser as the origin of the request. It is set through an `Origin` header.\n* **Access-Control-Allow-Methods**: This specifies the allowed options for requests from that domain. This will generally be all available methods.\n* **Access-Control-Expose-Headers**: This will contain the headers that will be available to requests from the origin domain.\n* **Access-Control-Max-Age**: This is the length of time that the access is considered valid. After this expires, a new preflight should be sent.\n* **Access-Control-Allow-Credentials**: This will be set to `true`. It basically allows you to send your OAuth token for authentication.\n\nYou should not need to be concerned with the details of these headers,\nbecause the browser will typically do all of the work for you.\n" license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html contact: name: DigitalOcean API Team email: api-engineering@digitalocean.com termsOfService: https://www.digitalocean.com/legal/terms-of-service-agreement/ servers: - url: https://api.digitalocean.com description: production security: - bearer_auth: [] tags: - name: Databases description: "DigitalOcean's [managed database service](https://docs.digitalocean.com/products/databases)\nsimplifies the creation and management of highly available database clusters. Currently, it\noffers support for [PostgreSQL](http://docs.digitalocean.com/products/databases/postgresql/),\n[Redis](https://docs.digitalocean.com/products/databases/redis/),\n[MySQL](https://docs.digitalocean.com/products/databases/mysql/), \n[MongoDB](https://docs.digitalocean.com/products/databases/mongodb/), and\n[OpenSearch](https://docs.digitalocean.com/products/databases/opensearch/).\n\nBy sending requests to the `/v2/databases` endpoint, you can list, create, or delete\ndatabase clusters as well as scale the size of a cluster, add or remove read-only replicas,\nand manage other configuration details.\n\nDatabase clusters may be deployed in a multi-node, high-availability configuration.\nIf your machine type is above the basic nodes, your node plan is above the smallest option,\nor you are running MongoDB, you may additionally include up to two standby nodes in your cluster.\n\nThe size of individual nodes in a database cluster is represented by a human-readable slug,\nwhich is used in some of the following requests. Each slug denotes the node's identifier,\nCPU count, and amount of RAM, in that order.\n\nFor a list of currently available database slugs and options, use the `/v2/databases/options` endpoint or use the \n`doctl databases options` [command](https://docs.digitalocean.com/reference/doctl/reference/databases/options)." paths: /v2/databases/options: get: operationId: databases_list_options summary: List Database Options description: 'To list all of the options available for the offered database engines, send a GET request to `/v2/databases/options`. The result will be a JSON object with an `options` key.' tags: - Databases responses: '200': $ref: '#/components/responses/options' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/options\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n options, _, err := client.Databases.ListOptions(ctx)\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list_options()' security: - bearer_auth: - database:read /v2/databases: get: operationId: databases_list_clusters summary: List All Database Clusters description: 'To list all of the database clusters available on your account, send a GET request to `/v2/databases`. To limit the results to database clusters with a specific tag, include the `tag_name` query parameter set to the name of the tag. For example, `/v2/databases?tag_name=$TAG_NAME`. The result will be a JSON object with a `databases` key. This will be set to an array of database objects, each of which will contain the standard database attributes. The embedded `connection` and `private_connection` objects will contain the information needed to access the database cluster. For multi-node clusters, the `standby_connection` and `standby_private_connection` objects will contain the information needed to connect to the cluster''s standby node(s). The embedded `maintenance_window` object will contain information about any scheduled maintenance for the database cluster.' tags: - Databases parameters: - $ref: '#/components/parameters/tag_name' responses: '200': $ref: '#/components/responses/database_clusters' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n opt := &godo.ListOptions{\n Page: 1,\n PerPage: 200,\n }\n\n clusters, _, err := client.Databases.List(ctx, opt)\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list_clusters(tag_name="production")' security: - bearer_auth: - database:read post: operationId: databases_create_cluster summary: Create a New Database Cluster description: 'To create a database cluster, send a POST request to `/v2/databases`. The response will be a JSON object with a key called `database`. The value of this will be an object that contains the standard attributes associated with a database cluster. The initial value of the database cluster''s `status` attribute will be `creating`. When the cluster is ready to receive traffic, this will transition to `online`. The embedded `connection` and `private_connection` objects will contain the information needed to access the database cluster. For multi-node clusters, the `standby_connection` and `standby_private_connection` objects will contain the information needed to connect to the cluster''s standby node(s). DigitalOcean managed PostgreSQL and MySQL database clusters take automated daily backups. To create a new database cluster based on a backup of an existing cluster, send a POST request to `/v2/databases`. In addition to the standard database cluster attributes, the JSON body must include a key named `backup_restore` with the name of the original database cluster and the timestamp of the backup to be restored. Creating a database from a backup is the same as forking a database in the control panel. Note: Backups are not supported for Redis clusters.' tags: - Databases requestBody: required: true content: application/json: schema: allOf: - $ref: '#/components/schemas/database_cluster' - type: object properties: backup_restore: $ref: '#/components/schemas/database_backup' examples: Create a New Database Cluster: value: name: backend engine: pg version: '14' region: nyc3 size: db-s-2vcpu-4gb storage_size_mib: 61440 num_nodes: 2 tags: - production Create a New Database Cluster with trusted sources: value: name: backend engine: pg version: '14' region: nyc3 size: db-s-2vcpu-4gb num_nodes: 2 storage_size_mib: 61440 tags: - production rules: - type: ip_addr value: 192.168.1.1 - type: k8s value: ff2a6c52-5a44-4b63-b99c-0e98e7a63d61 - type: droplet value: '163973392' - type: tag value: test Restore from a Database Cluster Backup: value: name: backend-restored backup_restore: database_name: backend backup_created_at: '2019-01-31T19:25:22Z' engine: pg version: '14' region: nyc3 size: db-s-2vcpu-4gb num_nodes: 2 responses: '201': $ref: '#/components/responses/database_cluster' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"name\": \"backend\", \"engine\": \"pg\", \"version\": \"14\", \"region\": \"nyc3\", \"size\": \"db-s-2vcpu-4gb\", \"num_nodes\": 2, \"storage_size_mib\": 61440, \"tags\": [\"production\"]}' \\\n \"https://api.digitalocean.com/v2/databases\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n createRequest := &godo.DatabaseCreateRequest{\n Name: \"backend\",\n EngineSlug: \"pg\",\n Version: \"14\",\n Region: \"nyc3\",\n SizeSlug: \"db-s-2vcpu-4gb\",\n NumNodes: 2,\n StorageSizeMiB : 61440,\n }\n\n cluster, _, err := client.Databases.Create(ctx, createRequest)\n}" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\ncreate_req = {\n \"name\": \"backend\",\n \"engine\": \"pg\",\n \"version\": \"14\",\n \"region\": \"nyc3\",\n \"size\": \"db-s-2vcpu-4gb\",\n \"num_nodes\": 2,\n \"storage_size_mib\": 61440,\n \"tags\": [\n \"production\"\n ]\n}\n\ncreate_resp = client.databases.create_cluster(body=create_req)" security: - bearer_auth: - database:create /v2/databases/{database_cluster_uuid}: get: operationId: databases_get_cluster summary: Retrieve an Existing Database Cluster description: 'To show information about an existing database cluster, send a GET request to `/v2/databases/$DATABASE_ID`. The response will be a JSON object with a database key. This will be set to an object containing the standard database cluster attributes. The embedded `connection` and `private_connection` objects will contain the information needed to access the database cluster. For multi-node clusters, the `standby_connection` and `standby_private_connection` objects contain the information needed to connect to the cluster''s standby node(s). The embedded maintenance_window object will contain information about any scheduled maintenance for the database cluster.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/database_cluster' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n cluster, _, err := client.Databases.Get(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_cluster(database_cluster_uuid="a7a89a")' security: - bearer_auth: - database:read delete: operationId: databases_destroy_cluster summary: Destroy a Database Cluster description: 'To destroy a specific database, send a DELETE request to `/v2/databases/$DATABASE_ID`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: 'curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30" ' - lang: Go source: "import (\n \"context\"\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n pat := \"mytoken\"\n\n client := godo.NewFromToken(pat)\n ctx := context.TODO()\n\n _, err := client.Databases.Delete(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) delete_resp = client.databases.destroy_cluster(database_cluster_uuid="a7abba8")' security: - bearer_auth: - database:delete /v2/databases/{database_cluster_uuid}/config: get: operationId: databases_get_config summary: Retrieve an Existing Database Cluster Configuration description: 'Shows configuration parameters for an existing database cluster by sending a GET request to `/v2/databases/$DATABASE_ID/config`. The response is a JSON object with a `config` key, which is set to an object containing any database configuration parameters. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/database_config' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/config\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_config(database_cluster_uuid="a7a90ab")' security: - bearer_auth: - database:read patch: operationId: databases_patch_config summary: Update the Database Configuration for an Existing Database description: 'To update the configuration for an existing database cluster, send a PATCH request to `/v2/databases/$DATABASE_ID/config`. ' tags: - Databases requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/database_config' example: config: sql_mode: ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES sql_require_primary_key: true parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X PATCH \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"config\": {\"sql_mode\": \"ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES\",\"sql_require_primary_key\": true}}' \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/config\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.databases.patch_config(database_cluster_uuid="a7aba9d")' security: - bearer_auth: - database:update /v2/databases/{database_cluster_uuid}/ca: get: operationId: databases_get_ca summary: Retrieve the Public Certificate description: 'To retrieve the public certificate used to secure the connection to the database cluster send a GET request to `/v2/databases/$DATABASE_ID/ca`. The response will be a JSON object with a `ca` key. This will be set to an object containing the base64 encoding of the public key certificate. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/ca' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/ca\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n ca, _, err := client.Databases.GetCA(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_ca(database_cluster_uuid="aba77ada")' security: - bearer_auth: - database:read /v2/databases/{database_cluster_uuid}/online-migration: get: operationId: databases_get_migrationStatus summary: Retrieve the Status of an Online Migration description: 'To retrieve the status of the most recent online migration, send a GET request to `/v2/databases/$DATABASE_ID/online-migration`. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/online_migration' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: 'curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/online-migration"' - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_migration_status(database_cluster_uuid="a7a7ab90")' security: - bearer_auth: - database:read put: operationId: databases_update_onlineMigration summary: Start an Online Migration description: To start an online migration, send a PUT request to `/v2/databases/$DATABASE_ID/online-migration` endpoint. Migrating a cluster establishes a connection with an existing cluster and replicates its contents to the target cluster. Online migration is only available for MySQL, PostgreSQL, and Redis clusters. tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/source_database' example: source: host: source-do-user-6607903-0.b.db.ondigitalocean.com dbname: defaultdb port: 25060 username: doadmin password: paakjnfe10rsrsmf disable_ssl: false ignore_dbs: - db0 - db1 responses: '200': $ref: '#/components/responses/online_migration' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: 'curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d ''{"source":{"host":"source-do-user-6607903-0.b.db.ondigitalocean.com","dbname":"defaultdb","port":25060,"username":"doadmin","password":"paakjnfe10rsrsmf"},"disable_ssl":false,"ignore_dbs":["db0","db1"]}'' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/online-migration"' - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"source\": {\n \"host\": \"source-do-user-6607903-0.b.db.ondigitalocean.com\",\n \"dbname\": \"defaultdb\",\n \"port\": 25060,\n \"username\": \"doadmin\",\n \"password\": \"paakjnfe10rsrsmf\"\n },\n \"disable_ssl\": False\n \"ignore_dbs\": [\"db0\",\"db1\"]\n}\n\nupdate_resp = client.databases.update_online_migration(database_cluster_uuid=\"a7a8bas\", body=req)" security: - bearer_auth: - database:update /v2/databases/{database_cluster_uuid}/online-migration/{migration_id}: delete: operationId: databases_delete_onlineMigration summary: Stop an Online Migration description: 'To stop an online migration, send a DELETE request to `/v2/databases/$DATABASE_ID/online-migration/$MIGRATION_ID`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/migration_id' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: 'curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/online-migration/77b28fc8-19ff-11eb-8c9c-c68e24557488"' - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) delete_resp = client.databases.delete_online_migration(database_cluster_uuid="9cc10173", migration="77b28fc8")' security: - bearer_auth: - database:delete /v2/databases/{database_cluster_uuid}/migrate: put: operationId: databases_update_region summary: Migrate a Database Cluster to a New Region description: 'To migrate a database cluster to a new region, send a `PUT` request to `/v2/databases/$DATABASE_ID/migrate`. The body of the request must specify a `region` attribute. A successful request will receive a 202 Accepted status code with no body in response. Querying the database cluster will show that its `status` attribute will now be set to `migrating`. This will transition back to `online` when the migration has completed. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' requestBody: required: true content: application/json: schema: type: object properties: region: type: string example: lon1 description: A slug identifier for the region to which the database cluster will be migrated. required: - region example: region: lon1 responses: '202': $ref: '#/components/responses/accepted' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X PUT \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"region\":\"lon1\"}' \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/migrate\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n migrateRequest := &godo.DatabaseMigrateRequest{\n Region: \"lon1\",\n }\n\n _, err := client.Databases.Migrate(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", migrateRequest)\n}" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"region\": \"lon1\"\n}\n\nupdate_resp = client.databases.update_region(database_cluster_uuid=\"a7a8bas\", body=req)" security: - bearer_auth: - database:update /v2/databases/{database_cluster_uuid}/resize: put: operationId: databases_update_clusterSize summary: Resize a Database Cluster description: 'To resize a database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/resize`. The body of the request must specify both the size and num_nodes attributes. A successful request will receive a 202 Accepted status code with no body in response. Querying the database cluster will show that its status attribute will now be set to resizing. This will transition back to online when the resize operation has completed.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/database_cluster_resize' example: size: db-s-4vcpu-8gb num_nodes: 3 storage_size_mib: 163840 responses: '202': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: 'curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d ''{"size":"db-s-4vcpu-8gb", "num_nodes":3, "storage_size_mib":163840}'' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/resize" ' - lang: Go source: "import (\n \"context\"\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n pat := \"mytoken\"\n\n client := godo.NewFromToken(pat)\n ctx := context.TODO()\n\n resizeRequest := &godo.DatabaseResizeRequest{\n SizeSlug: \"db-s-4vcpu-8gb\",\n NumNodes: 3,\n StorageSizeMib: 163840,\n }\n}" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"size\": \"db-s-4vcpu-8gb\",\n \"num_nodes\": 3,\n \"storage_size_mib\": 163840\n}\n\nupdate_resp = client.databases.update_cluster_size(database_cluster_uuid=\"a7a8bas\", body=req)" security: - bearer_auth: - database:update /v2/databases/{database_cluster_uuid}/firewall: get: operationId: databases_list_firewall_rules summary: List Firewall Rules (Trusted Sources) for a Database Cluster description: 'To list all of a database cluster''s firewall rules (known as "trusted sources" in the control panel), send a GET request to `/v2/databases/$DATABASE_ID/firewall`. The result will be a JSON object with a `rules` key.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/firewall_rules' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/firewall\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n rules, _, err := client.Databases.GetFirewallRules(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list_firewall_rules(database_cluster_uuid="a7aab9a")' security: - bearer_auth: - database:read put: operationId: databases_update_firewall_rules summary: Update Firewall Rules (Trusted Sources) for a Database description: 'To update a database cluster''s firewall rules (known as "trusted sources" in the control panel), send a PUT request to `/v2/databases/$DATABASE_ID/firewall` specifying which resources should be able to open connections to the database. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses. When a tag is provided, any Droplet or Kubernetes node with that tag applied to it will have access. The firewall is limited to 100 rules (or trusted sources). When possible, we recommend [placing your databases into a VPC network](https://docs.digitalocean.com/products/networking/vpc/) to limit access to them instead of using a firewall. A successful' tags: - Databases requestBody: required: true content: application/json: schema: type: object properties: rules: type: array items: $ref: '#/components/schemas/firewall_rule' example: rules: - type: ip_addr value: 192.168.1.1 - type: k8s value: ff2a6c52-5a44-4b63-b99c-0e98e7a63d61 - type: droplet value: '163973392' - type: tag value: backend parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X PUT \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"rules\": [{\"type\": \"ip_addr\",\"value\": \"192.168.1.1\"},{\"type\": \"droplet\",\"value\": \"163973392\"},{\"type\": \"k8s\",\"value\": \"ff2a6c52-5a44-4b63-b99c-0e98e7a63d61\"},{\"type\": \"tag\",\"value\": \"backend\"}]}' \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/firewall\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n req := godo.DatabaseUpdateFirewallRulesRequest{\n Rules: []*godo.DatabaseFirewallRule{\n {\n Type: \"ip_addr\",\n Value: \"192.168.1.1\",\n },\n {\n Type: \"droplet\",\n Value: \"163973392\",\n },\n {\n Type: \"k8s\",\n Value: \"ff2a6c52-5a44-4b63-b99c-0e98e7a63d61\",\n },\n },\n }\n _, err := client.Databases.UpdateFirewallRules(ctx, dbID, &req)\n}" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"rules\": [\n {\n \"type\": \"ip_addr\",\n \"value\": \"192.168.1.1\"\n },\n {\n \"type\": \"k8s\",\n \"value\": \"ff2a6c52-5a44-4b63-b99c-0e98e7a63d61\"\n },\n {\n \"type\": \"droplet\",\n \"value\": \"163973392\"\n },\n {\n \"type\": \"tag\",\n \"value\": \"backend\"\n }\n ]\n}\nupdate_resp = client.databases.update_firewall_rules(database_cluster_uuid=\"a7a8bas\", body=req)" security: - bearer_auth: - database:update /v2/databases/{database_cluster_uuid}/maintenance: put: operationId: databases_update_maintenanceWindow summary: Configure a Database Cluster's Maintenance Window description: 'To configure the window when automatic maintenance should be performed for a database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/maintenance`. A successful request will receive a 204 No Content status code with no body in response.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/database_maintenance_window' example: day: tuesday hour: '14:00' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X PUT \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"day\": \"tuesday\", \"hour\": \"14:00\"}' \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/maintenance\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n maintenanceRequest := &godo.DatabaseUpdateMaintenanceRequest{\n Day: \"thursday\",\n Hour: \"16:00\",\n }\n\n _, err := client.Databases.UpdateMaintenance(ctx, \"88055188-9e54-4f21-ab11-8a918ed79ee2\", maintenanceRequest)\n}" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"day\": \"tuesday\",\n \"hour\": \"14:00\"\n}\n\nupdate_resp = client.databases.update_maintenance_window(database_cluster_uuid=\"a7a8bas\", body=req)" security: - bearer_auth: - database:update /v2/databases/{database_cluster_uuid}/install_update: put: operationId: databases_install_update summary: Start Database Maintenance description: 'To start the installation of updates for a database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/install_update`. A successful request will receive a 204 No Content status code with no body in response.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X PUT \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/install_update\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n _, err := client.Databases.InstallUpdate(ctx, \"88055188-9e54-4f21-ab11-8a918ed79ee2\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) update_resp = client.databases.install_update(database_cluster_uuid="a7a8bas")' security: - bearer_auth: - database:update /v2/databases/{database_cluster_uuid}/backups: get: operationId: databases_list_backups summary: List Backups for a Database Cluster description: 'To list all of the available backups of a PostgreSQL or MySQL database cluster, send a GET request to `/v2/databases/$DATABASE_ID/backups`. **Note**: Backups are not supported for Redis clusters. The result will be a JSON object with a `backups key`. This will be set to an array of backup objects, each of which will contain the size of the backup and the timestamp at which it was created.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/database_backups' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/backups\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n backups, _, err := client.Databases.ListBackups(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", nil)\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list_backups(database_cluster_uuid="a9a8a77")' security: - bearer_auth: - database:read /v2/databases/{database_cluster_uuid}/replicas: get: operationId: databases_list_replicas summary: List All Read-only Replicas description: 'To list all of the read-only replicas associated with a database cluster, send a GET request to `/v2/databases/$DATABASE_ID/replicas`. **Note**: Read-only replicas are not supported for Redis clusters. The result will be a JSON object with a `replicas` key. This will be set to an array of database replica objects, each of which will contain the standard database replica attributes.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/database_replicas' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n replicas, _, err := client.Databases.ListReplicas(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", nil)\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list_replicas(database_cluster_uuid="a7aba3")' security: - bearer_auth: - database:read post: operationId: databases_create_replica summary: Create a Read-only Replica description: 'To create a read-only replica for a PostgreSQL or MySQL database cluster, send a POST request to `/v2/databases/$DATABASE_ID/replicas` specifying the name it should be given, the size of the node to be used, and the region where it will be located. **Note**: Read-only replicas are not supported for Redis clusters. The response will be a JSON object with a key called `replica`. The value of this will be an object that contains the standard attributes associated with a database replica. The initial value of the read-only replica''s `status` attribute will be `forking`. When the replica is ready to receive traffic, this will transition to `active`.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' requestBody: content: application/json: schema: allOf: - $ref: '#/components/schemas/database_replica' required: - name - size example: name: read-nyc3-01 region: nyc3 size: db-s-2vcpu-4gb storage_size_mib: 61440 responses: '201': $ref: '#/components/responses/database_replica' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"name\":\"read-nyc3-01\", \"region\":\"nyc3\", \"size\": \"db-s-2vcpu-4gb\", \"storage_size_mib\": 61440}' \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n replicaRequest := &godo.DatabaseCreateReplicaRequest{\n\n Name: \"read-nyc3-01\",\n Region: \"nyc3\",\n Size: \"db-s-2vcpu-4gb\",\n StorageSizeMiB : 61440,\n }\n\n replica, _, err := client.Databases.CreateReplica(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", replicaRequest)\n}" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\ncreate_req = {\n \"name\": \"read-nyc3-01\",\n \"region\": \"nyc3\",\n \"size\": \"db-s-2vcpu-4gb\",\n \"storage_size_mib\": 61440,\n}\n\ncreate_resp = client.databases.create_replica(database_cluster_uuid=\"9cc10173\", body=create_req)" security: - bearer_auth: - database:create /v2/databases/{database_cluster_uuid}/events: get: operationId: databases_list_events_logs summary: List all Events Logs description: 'To list all of the cluster events, send a GET request to `/v2/databases/$DATABASE_ID/events`. The result will be a JSON object with a `events` key. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/events_logs' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/events\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n replicas, _, err := client.Databases.ListProjectEvents(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", nil)\n}" security: - bearer_auth: - database:read /v2/databases/{database_cluster_uuid}/replicas/{replica_name}: get: operationId: databases_get_replica summary: Retrieve an Existing Read-only Replica description: 'To show information about an existing database replica, send a GET request to `/v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME`. **Note**: Read-only replicas are not supported for Redis clusters. The response will be a JSON object with a `replica key`. This will be set to an object containing the standard database replica attributes.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/replica_name' responses: '200': $ref: '#/components/responses/database_replica' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas/read-nyc3-01\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n replica, _, err := client.Databases.GetReplica(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"read-nyc3-01\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_replica(database_cluster_uuid="a7a90a", replica_name="backend-replica")' security: - bearer_auth: - database:read delete: operationId: databases_destroy_replica summary: Destroy a Read-only Replica description: 'To destroy a specific read-only replica, send a DELETE request to `/v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME`. **Note**: Read-only replicas are not supported for Redis clusters. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/replica_name' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X DELETE \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas/read-nyc3-01\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n _, err := client.Databases.DeleteReplica(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"read-nyc3-01\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) delete_resp = client.databases.destroy_replica(database_cluster_uuid="ba88aab", replica_name="read_nyc_3")' security: - bearer_auth: - database:delete /v2/databases/{database_cluster_uuid}/replicas/{replica_name}/promote: put: operationId: databases_promote_replica summary: Promote a Read-only Replica to become a Primary Cluster description: 'To promote a specific read-only replica, send a PUT request to `/v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME/promote`. **Note**: Read-only replicas are not supported for Redis clusters. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/replica_name' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X PUT \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas/read-nyc3-01/promote\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n _, err := client.Databases.PromoteReplicaToPrimary(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"read-nyc3-01\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.databases.promote_replica(database_cluster_uuid="a7a8bas", replica_name="ba8ab22")' security: - bearer_auth: - database:update /v2/databases/{database_cluster_uuid}/users: get: operationId: databases_list_users summary: List all Database Users description: 'To list all of the users for your database cluster, send a GET request to `/v2/databases/$DATABASE_ID/users`. Note: User management is not supported for Redis clusters. The result will be a JSON object with a `users` key. This will be set to an array of database user objects, each of which will contain the standard database user attributes. For MySQL clusters, additional options will be contained in the mysql_settings object. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/users' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n users, _, err := client.Databases.ListUsers(ctx, \"88055188-9e54-4f21-ab11-8a918ed79ee2\", nil)\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list_users(database_cluster_uuid="a7aba3")' security: - bearer_auth: - database:read post: operationId: databases_add_user summary: Add a Database User description: 'To add a new database user, send a POST request to `/v2/databases/$DATABASE_ID/users` with the desired username. Note: User management is not supported for Redis clusters. When adding a user to a MySQL cluster, additional options can be configured in the `mysql_settings` object. When adding a user to a Kafka cluster, additional options can be configured in the `settings` object. The response will be a JSON object with a key called `user`. The value of this will be an object that contains the standard attributes associated with a database user including its randomly generated password. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' requestBody: required: true content: application/json: schema: allOf: - $ref: '#/components/schemas/database_user' - type: object properties: readonly: type: boolean example: true description: "For MongoDB clusters, set to `true` to create a read-only user.\nThis option is not currently supported for other database engines. \n" examples: Add New User: value: name: app-01 Add New User with MySQL Auth Plugin: value: name: app-02 mysql_settings: auth_plugin: mysql_native_password Add New Read Only User (MongoDB Only): value: name: my-readonly readonly: true Add New User for Postgres with replication rights: value: name: app-02 settings: pg_allow_replication: true Add New User with Kafka ACLs: value: name: app-03 settings: acl: - permission: produceconsume topic: customer-events - permission: produce topic: customer-events.* - permission: consume topic: customer-events responses: '201': $ref: '#/components/responses/user' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"name\": \"app-01\"}' \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n addUserRequest := &godo.DatabaseCreateUserRequest{\n Name: \"app-01\",\n }\n\n user, _, err := client.Databases.CreateUser(ctx, \"88055188-9e54-4f21-ab11-8a918ed79ee2\", addUserRequest)\n\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) add_user_resp = client.databases.add_user(database_cluster_uuid="ab7bb7a", body={"name": "app-01"})' security: - bearer_auth: - database:create /v2/databases/{database_cluster_uuid}/users/{username}: get: operationId: databases_get_user summary: Retrieve an Existing Database User description: 'To show information about an existing database user, send a GET request to `/v2/databases/$DATABASE_ID/users/$USERNAME`. Note: User management is not supported for Redis clusters. The response will be a JSON object with a `user` key. This will be set to an object containing the standard database user attributes. For MySQL clusters, additional options will be contained in the `mysql_settings` object. For Kafka clusters, additional options will be contained in the `settings` object. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/username' responses: '200': $ref: '#/components/responses/user' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users/app-01\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n user, _, err := client.Databases.GetUser(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"app-01\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_user(database_cluster_uuid="9a9aba", username="admin")' security: - bearer_auth: - database:read delete: operationId: databases_delete_user summary: Remove a Database User description: 'To remove a specific database user, send a DELETE request to `/v2/databases/$DATABASE_ID/users/$USERNAME`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. Note: User management is not supported for Redis clusters. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/username' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X DELETE \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users/app-01\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n _, err := client.Databases.DeleteUser(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"app-01\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) delete_resp = client.databases.delete_user(database_cluster_uuid="aba134a", username="backend_user1")' security: - bearer_auth: - database:delete put: operationId: databases_update_user summary: Update a Database User description: 'To update an existing database user, send a PUT request to `/v2/databases/$DATABASE_ID/users/$USERNAME` with the desired settings. **Note**: only `settings` can be updated via this type of request. If you wish to change the name of a user, you must recreate a new user. The response will be a JSON object with a key called `user`. The value of this will be an object that contains the name of the update database user, along with the `settings` object that has been updated. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/username' requestBody: required: true content: application/json: schema: allOf: - type: object properties: settings: $ref: '#/components/schemas/user_settings' required: - settings examples: Update User Kafka ACLs: value: settings: acl: - id: acl128aaaa99239 permission: produceconsume topic: customer-events - id: acl293098flskdf permission: produce topic: customer-events.* - id: acl128ajei20123 permission: consume topic: customer-events responses: '201': $ref: '#/components/responses/user' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X PUT \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"settings\": {\"acl\": [{\"topic\": \"events\", \"permission\": \"produce\"}]}}' \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n userName := \"test-user\"\n\n updateUserRequest := &godo.DatabaseUpdateUserRequest{\n Settings: {\n ACL: [\n {\n Permssion: \"consume\",\n Topic: \"events\",\n }\n {\n Permission: \"produce\",\n Topic: \"metrics\",\n }\n ]\n }\n }\n\n user, _, err := client.Databases.UpdateUser(ctx, \"88055188-9e54-4f21-ab11-8a918ed79ee2\", userName, updateUserRequest)\n}" security: - bearer_auth: - database:update /v2/databases/{database_cluster_uuid}/users/{username}/reset_auth: post: operationId: databases_reset_auth summary: Reset a Database User's Password or Authentication Method description: 'To reset the password for a database user, send a POST request to `/v2/databases/$DATABASE_ID/users/$USERNAME/reset_auth`. For `mysql` databases, the authentication method can be specifying by including a key in the JSON body called `mysql_settings` with the `auth_plugin` value specified. The response will be a JSON object with a `user` key. This will be set to an object containing the standard database user attributes. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/username' requestBody: required: true content: application/json: schema: type: object properties: mysql_settings: $ref: '#/components/schemas/mysql_settings' example: mysql_settings: auth_plugin: caching_sha2_password responses: '200': $ref: '#/components/responses/user' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"mysql_settings\":{\"auth_plugin\": \"caching_sha2_password\"}}' \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users/app-01/reset_auth\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n resetUserAuthRequest := &godo.DatabaseResetUserAuthRequest{\n MySQLSettings: &DatabaseMySQLUserSettings{\n AuthPlugin: \"caching_sha2_password\",\n },\n }\n user, _, err := client.Databases.ResetUserAuth(ctx, \"88055188-9e54-4f21-ab11-8a918ed79ee2\", \"app-01\", resetuserAuthRequest)\n}" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"mysql_settings\": {\n \"auth_plugin\": \"caching_sha2_password\"\n }\n}\n\nget_resp = client.databases.reset_auth(database_cluster_uuid=\"a7a8bas\", username=\"admin\", body=req)" security: - bearer_auth: - database:update /v2/databases/{database_cluster_uuid}/dbs: get: operationId: databases_list summary: List All Databases description: 'To list all of the databases in a clusters, send a GET request to `/v2/databases/$DATABASE_ID/dbs`. The result will be a JSON object with a `dbs` key. This will be set to an array of database objects, each of which will contain the standard database attributes. Note: Database management is not supported for Redis clusters. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/databases' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/dbs\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n dbs, _, err := client.Databases.ListDBs(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", nil)\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list(database_cluster_uuid="a7aba9d")' security: - bearer_auth: - database:read post: operationId: databases_add summary: Add a New Database description: 'To add a new database to an existing cluster, send a POST request to `/v2/databases/$DATABASE_ID/dbs`. Note: Database management is not supported for Redis clusters. The response will be a JSON object with a key called `db`. The value of this will be an object that contains the standard attributes associated with a database. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/database' example: name: alpha responses: '201': $ref: '#/components/responses/database' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"name\": \"alpha\"}' \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/dbs\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n createDBReq := &godo.DatabaseCreateDBRequest{\n Name: \"alpha\",\n }\n\n db, _, err := client.Databases.CreateDB(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", createDBReq)\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) add_resp = client.databases.add(database_cluster_uuid="9cc10173", body={"name": "alpha"})' security: - bearer_auth: - database:create /v2/databases/{database_cluster_uuid}/dbs/{database_name}: get: operationId: databases_get summary: Retrieve an Existing Database description: 'To show information about an existing database cluster, send a GET request to `/v2/databases/$DATABASE_ID/dbs/$DB_NAME`. Note: Database management is not supported for Redis clusters. The response will be a JSON object with a `db` key. This will be set to an object containing the standard database attributes. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/database_name' responses: '200': $ref: '#/components/responses/database' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/dbs/alpha\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n db, _, err := client.Databases.GetDB(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"alpha\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get(database_cluster_uuid="a9a8a77", database_name="admin")' security: - bearer_auth: - database:read delete: operationId: databases_delete summary: Delete a Database description: 'To delete a specific database, send a DELETE request to `/v2/databases/$DATABASE_ID/dbs/$DB_NAME`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. Note: Database management is not supported for Redis clusters. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/database_name' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X DELETE \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/dbs/alpha\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n _, err := client.Databases.DeleteDB(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"alpha\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) delete_resp = client.databases.delete(database_cluster_uuid="a7abda", database_name="ba1341")' security: - bearer_auth: - database:delete /v2/databases/{database_cluster_uuid}/pools: get: operationId: databases_list_connectionPools summary: List Connection Pools (PostgreSQL) description: 'To list all of the connection pools available to a PostgreSQL database cluster, send a GET request to `/v2/databases/$DATABASE_ID/pools`. The result will be a JSON object with a `pools` key. This will be set to an array of connection pool objects.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/connection_pools' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: 'curl -X GET / -H "Content-Type: application/json" / -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" / "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/pools" ' - lang: Go source: "import (\n \"context\"\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n pat := \"mytoken\"\n\n client := godo.NewFromToken(pat)\n ctx := context.TODO()\n\n pools, _, err := client.Databases.ListPools(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", nil)\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list_connection_pools(database_cluster_uuid="a7aab9a")' security: - bearer_auth: - database:read post: operationId: databases_add_connectionPool summary: Add a New Connection Pool (PostgreSQL) description: 'For PostgreSQL database clusters, connection pools can be used to allow a database to share its idle connections. The popular PostgreSQL connection pooling utility PgBouncer is used to provide this service. [See here for more information](https://docs.digitalocean.com/products/databases/postgresql/how-to/manage-connection-pools/) about how and why to use PgBouncer connection pooling including details about the available transaction modes. To add a new connection pool to a PostgreSQL database cluster, send a POST request to `/v2/databases/$DATABASE_ID/pools` specifying a name for the pool, the user to connect with, the database to connect to, as well as its desired size and transaction mode. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/connection_pool' example: name: backend-pool mode: transaction size: 10 db: defaultdb user: doadmin responses: '201': $ref: '#/components/responses/connection_pool' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: 'curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d ''{"name": "backend-pool","mode": "transaction","size": 10,"db": "defaultdb","user": "doadmin"}'' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/pools" ' - lang: Go source: "import (\n \"context\"\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n pat := \"mytoken\"\n\n client := godo.NewFromToken(pat)\n ctx := context.TODO()\n\n createPoolReq := &godo.DatabaseCreatePoolRequest{\n Name: \"backend-pool\",\n Database: \"defaultdb\",\n Size: 10,\n User: \"doadmin\",\n Mode: \"transaction\",\n }\n\n pool, _, err := client.Databases.CreatePool(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", createPoolReq)\n}" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nadd_conn_pool_req = {\n \"name\": \"backend-pool\",\n \"mode\": \"transaction\",\n \"size\": 10,\n \"db\": \"defaultdb\",\n \"user\": \"doadmin\"\n} \n\nadd_conn_pool_resp = client.databases.add_connection_pool(database_cluster_uuid=\"9cc10173\", body=add_conn_pool_req)" security: - bearer_auth: - database:create /v2/databases/{database_cluster_uuid}/pools/{pool_name}: get: operationId: databases_get_connectionPool summary: Retrieve Existing Connection Pool (PostgreSQL) description: 'To show information about an existing connection pool for a PostgreSQL database cluster, send a GET request to `/v2/databases/$DATABASE_ID/pools/$POOL_NAME`. The response will be a JSON object with a `pool` key.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/pool_name' responses: '200': $ref: '#/components/responses/connection_pool' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: 'curl -X GET / -H "Content-Type: application/json" / -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" / "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/pools/backend-pool" ' - lang: Go source: "import (\n \"context\"\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n pat := \"mytoken\"\n\n client := godo.NewFromToken(pat)\n ctx := context.TODO()\n\n pool, _, err := client.Databases.GetPool(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"backend-pool\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_connection_pool(database_cluster_uuid="a7aba8a", pool_name="backend-pool") ' security: - bearer_auth: - database:read put: operationId: databases_update_connectionPool summary: Update Connection Pools (PostgreSQL) description: To update a connection pool for a PostgreSQL database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/pools/$POOL_NAME`. tags: - Databases requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/connection_pool_update' example: mode: transaction size: 10 db: defaultdb user: doadmin parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/pool_name' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: 'curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d ''{"mode": "transaction", "size": 15, "db": "defaultdb", "user": "doadmin"}'' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/pools/backend-pool" ' - lang: Go source: "import (\n \"context\"\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n pat := \"mytoken\"\n\n client := godo.NewFromToken(pat)\n ctx := context.TODO()\n\n updateReq := &godo.DatabaseUpdatePoolRequest{\n User: \"doadmin\",\n Size: 15,\n Database: \"defaultdb\",\n Mode: \"transaction\",\n }\n\n _, err := client.Databases.UpdatePool(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"backend-pool\", updateReq)\n\n}" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"mode\": \"transaction\",\n \"size\": 10,\n \"db\": \"defaultdb\",\n \"user\": \"doadmin\"\n}\n\nupdate_resp = client.databases.update_connection_pool(database_cluster_uuid=\"a7a8bas\", pool_name=\"conn_pool\", body=req)" security: - bearer_auth: - database:update delete: operationId: databases_delete_connectionPool summary: Delete a Connection Pool (PostgreSQL) description: 'To delete a specific connection pool for a PostgreSQL database cluster, send a DELETE request to `/v2/databases/$DATABASE_ID/pools/$POOL_NAME`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/pool_name' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: 'curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/pools/backend-pool"' - lang: Go source: "import (\n \"context\"\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n pat := \"mytoken\"\n\n client := godo.NewFromToken(pat)\n ctx := context.TODO()\n\n _, err := client.Databases.DeletePool(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"backend-pool\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) delete_conn_pool = client.databases.delete_connection_pool(database_cluster_uuid="9cc10173", pool_name="backend-pool")' security: - bearer_auth: - database:delete /v2/databases/{database_cluster_uuid}/eviction_policy: get: operationId: databases_get_evictionPolicy summary: Retrieve the Eviction Policy for a Redis Cluster description: 'To retrieve the configured eviction policy for an existing Redis cluster, send a GET request to `/v2/databases/$DATABASE_ID/eviction_policy`. The response will be a JSON object with an `eviction_policy` key. This will be set to a string representing the eviction policy.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/eviction_policy_response' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cdb64e5-61e4-4b30-b711-11ef66d84558/eviction_policy\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n db, _, err := client.Databases.GetEvictionPolicy(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_eviction_policy(database_cluster_uuid="a7aa89a")' security: - bearer_auth: - database:read put: operationId: databases_update_evictionPolicy summary: Configure the Eviction Policy for a Redis Cluster description: To configure an eviction policy for an existing Redis cluster, send a PUT request to `/v2/databases/$DATABASE_ID/eviction_policy` specifying the desired policy. tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' requestBody: required: true content: application/json: schema: type: object required: - eviction_policy properties: eviction_policy: $ref: '#/components/schemas/eviction_policy_model' example: eviction_policy: allkeys_lru responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X PUT \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"eviction_policy\":\"allkeys_lru\"}' \\\n \"https://api.digitalocean.com/v2/databases/9cdb64e5-61e4-4b30-b711-11ef66d84558/eviction_policy\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n db, _, err := client.Databases.SetEvictionPolicy(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", \"allkeys_lru\")\n}" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"eviction_policy\": \"allkeys_lru\"\n}\n\nupdate_resp = client.databases.update_eviction_policy(database_cluster_uuid=\"a7a8bas\", body=req)" security: - bearer_auth: - database:update /v2/databases/{database_cluster_uuid}/sql_mode: get: operationId: databases_get_sql_mode summary: Retrieve the SQL Modes for a MySQL Cluster description: 'To retrieve the configured SQL modes for an existing MySQL cluster, send a GET request to `/v2/databases/$DATABASE_ID/sql_mode`. The response will be a JSON object with a `sql_mode` key. This will be set to a string representing the configured SQL modes.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/sql_mode' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cdb64e5-61e4-4b30-b711-11ef66d84558/sql_mode\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n sqlMode, _, err := client.Databases.GetSQLMode(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_sql_mode(database_cluster_uuid="90abaa8")' security: - bearer_auth: - database:read put: operationId: databases_update_sql_mode summary: Update SQL Mode for a Cluster description: 'To configure the SQL modes for an existing MySQL cluster, send a PUT request to `/v2/databases/$DATABASE_ID/sql_mode` specifying the desired modes. See the official MySQL 8 documentation for a [full list of supported SQL modes](https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-full). A successful request will receive a 204 No Content status code with no body in response.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/sql_mode' example: sql_mode: ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X PUT \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"sql_mode\":\"ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE\"}' \\\n \"https://api.digitalocean.com/v2/databases/9cdb64e5-61e4-4b30-b711-11ef66d84558/sql_mode\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n sqlMode := \"ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE\"\n _, err := client.Databases.SetSQLMode(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", sqlMode)\n}" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"sql_mode\": \"ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE\"\n}\n\nupdate_resp = client.databases.update_sql_mode(database_cluster_uuid=\"a7a8bas\", body=req)" security: - bearer_auth: - database:update /v2/databases/{database_cluster_uuid}/upgrade: put: operationId: databases_update_major_version summary: Upgrade Major Version for a Database description: 'To upgrade the major version of a database, send a PUT request to `/v2/databases/$DATABASE_ID/upgrade`, specifying the target version. A successful request will receive a 204 No Content status code with no body in response.' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/version-2' example: version: '14' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X PUT \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"version\":\"14\"}' \\\n \"https://api.digitalocean.com/v2/databases/9cdb64e5-61e4-4b30-b711-11ef66d84558/upgrade\"" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"version\": \"14\"\n}\n\nupdate_resp = client.databases.update_major_version(database_cluster_uuid=\"a7a8bas\", body=req)" security: - bearer_auth: - database:update /v2/databases/{database_cluster_uuid}/topics: get: operationId: databases_list_kafka_topics summary: List Topics for a Kafka Cluster description: 'To list all of a Kafka cluster''s topics, send a GET request to `/v2/databases/$DATABASE_ID/topics`. The result will be a JSON object with a `topics` key. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/kafka_topics' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/topics\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n replicas, _, err := client.Databases.ListTopics(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", nil)\n}" security: - bearer_auth: - database:read post: operationId: databases_create_kafka_topic summary: Create Topic for a Kafka Cluster description: 'To create a topic attached to a Kafka cluster, send a POST request to `/v2/databases/$DATABASE_ID/topics`. The result will be a JSON object with a `topic` key. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' requestBody: content: application/json: schema: allOf: - $ref: '#/components/schemas/kafka_topic_create' required: - name example: name: customer-events partitions: 3 replication: 2 config: retention_bytes: -1 retention_ms: 100000 responses: '201': $ref: '#/components/responses/kafka_topic' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"name\":\"customer-events\", \"partition_count\":3, \"replication_factor\": 3, \"config\": {\"retentionMS\": 1000000}}' \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/topics\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n createRequest := &DatabaseCreateTopicRequest{\n Name: \"events\",\n PartitionCount: 3,\n ReplicationFactor: 2,\n Config: &TopicConfig{\n RetentionMS: 60000,\n }\n },\n\n cluster, _, err := client.Databases.CreateTopic(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", createRequest)\n}" security: - bearer_auth: - database:create /v2/databases/{database_cluster_uuid}/topics/{topic_name}: get: operationId: databases_get_kafka_topic summary: Get Topic for a Kafka Cluster description: 'To retrieve a given topic by name from the set of a Kafka cluster''s topics, send a GET request to `/v2/databases/$DATABASE_ID/topics/$TOPIC_NAME`. The result will be a JSON object with a `topic` key. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/kafka_topic_name' responses: '200': $ref: '#/components/responses/kafka_topic' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/topics/customer-events\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n \n topicName := \"events\"\n\n user, _, err := client.Databases.GetTopic(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", topicName)\n}" security: - bearer_auth: - database:read put: operationId: databases_update_kafka_topic summary: Update Topic for a Kafka Cluster description: 'To update a topic attached to a Kafka cluster, send a PUT request to `/v2/databases/$DATABASE_ID/topics/$TOPIC_NAME`. The result will be a JSON object with a `topic` key. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/kafka_topic_name' requestBody: content: application/json: schema: allOf: - $ref: '#/components/schemas/kafka_topic_update' example: partitions: 3 replication: 2 config: retention_bytes: -1 retention_ms: 100000 responses: '200': $ref: '#/components/responses/kafka_topic' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X PUT \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"partition_count\":3, \"replication_factor\": 3, \"config\": {\"retentionMS\": 1000000}}' \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/topics/customer-events\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n topicName := \"events\"\n updateRequest := &DatabaseUpdateTopicRequest{\n PartitionCount: 3,\n ReplicationFactor: 2,\n Config: &TopicConfig{\n RetentionMS: 60000,\n },\n }\n\n _, err := client.Databases.UpdateTopic(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", topicName, updateRequest)\n}" security: - bearer_auth: - database:update delete: operationId: databases_delete_kafka_topic summary: Delete Topic for a Kafka Cluster description: 'To delete a single topic within a Kafka cluster, send a DELETE request to `/v2/databases/$DATABASE_ID/topics/$TOPIC_NAME`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/kafka_topic_name' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X DELETE \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/topics/customer-events\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n topicName := \"events\"\n\n _, err := client.Databases.DeleteTopic(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", topicName)\n}" security: - bearer_auth: - database:delete /v2/databases/{database_cluster_uuid}/logsink: get: operationId: databases_list_logsink summary: 'List Logsinks for a Database Cluster ' description: 'To list logsinks for a database cluster, send a GET request to `/v2/databases/$DATABASE_ID/logsink`. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '201': $ref: '#/components/responses/logsinks' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/logsink\"" security: - bearer_auth: - database:read post: operationId: databases_create_logsink summary: 'Create Logsink for a Database Cluster ' description: 'To create logsink for a database cluster, send a POST request to `/v2/databases/$DATABASE_ID/logsink`. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' requestBody: required: true content: application/json: schema: allOf: - $ref: '#/components/schemas/logsink_create' required: - sink_name - sink_type - config examples: Create an opensearch logsink: value: sink_name: logs-sink sink_type: opensearch config: url: https://user:passwd@192.168.0.1:25060 index_prefix: opensearch-logs index_days_max: 5 Create an elasticsearch logsink: value: sink_name: logs-sink sink_type: elasticsearch config: url: https://user:passwd@192.168.0.1:25060 index_prefix: elasticsearch-logs index_days_max: 5 Create a rsyslog logsink: value: sink_name: logs-sink sink_type: rsyslog config: server: 192.168.0.1 port: 514 tls: false format: rfc5424 responses: '201': $ref: '#/components/responses/logsink' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"sink_name\": \"logsink\", \"sink_type\": \"rsyslog\", \"config\": {\"server\": \"192.168.10.1\", \"port\": 514, \"tls\": false, \"format\": \"rfc5424\"}}' \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/logsink\"" security: - bearer_auth: - database:create /v2/databases/{database_cluster_uuid}/logsink/{logsink_id}: get: operationId: databases_get_logsink summary: 'Get Logsink for a Database Cluster ' description: 'To get a logsink for a database cluster, send a GET request to `/v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID`. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/logsink_id' responses: '201': $ref: '#/components/responses/logsink' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/logsink/77b28fc8-19ff-11eb-8c9c-c68e24557488\"" security: - bearer_auth: - database:read put: operationId: databases_update_logsink summary: 'Update Logsink for a Database Cluster ' description: 'To update a logsink for a database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID`. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/logsink_id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/logsink_update' example: config: server: 192.168.0.1 port: 514 tls: false format: rfc3164 responses: '200': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X PUT \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"config\": {\"server\": \"192.168.1.1\", \"port\": 514, \"tls\": false, \"format\": \"rfc3164\"}}' \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/logsink/77b28fc8-19ff-11eb-8c9c-c68e24557488\"" security: - bearer_auth: - database:update delete: operationId: databases_delete_logsink summary: 'Delete Logsink for a Database Cluster ' description: 'To delete a logsink for a database cluster, send a DELETE request to `/v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID`. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/logsink_id' responses: '200': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X DELETE \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/logsink/77b28fc8-19ff-11eb-8c9c-c68e24557488\"" security: - bearer_auth: - database:delete /v2/databases/metrics/credentials: get: operationId: databases_get_cluster_metrics_credentials summary: Retrieve Database Clusters' Metrics Endpoint Credentials description: To show the credentials for all database clusters' metrics endpoints, send a GET request to `/v2/databases/metrics/credentials`. The result will be a JSON object with a `credentials` key. tags: - Databases responses: '200': $ref: '#/components/responses/database_metrics_auth' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/metrics/credentials\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n creds, _, _ := client.Databases.GetMetricsCredentials(ctx)\n}" security: - bearer_auth: - database:update put: operationId: databases_update_cluster_metrics_credentials summary: Update Database Clusters' Metrics Endpoint Credentials description: To update the credentials for all database clusters' metrics endpoints, send a PUT request to `/v2/databases/metrics/credentials`. A successful request will receive a 204 No Content status code with no body in response. tags: - Databases requestBody: content: application/json: schema: allOf: - $ref: '#/components/schemas/database_metrics_credentials' example: credentials: basic_auth_username: new_username basic_auth_password: new_password responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X PUT \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"credentials\": {\"basic_auth_username\": \"new_username\", \"basic_auth_password\": \"new_password\"}}'\\\n \"https://api.digitalocean.com/v2/databases/metrics/credentials\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n _, _ = client.Databases.UpdateMetricsCredentials(ctx, &godo.DatabaseUpdateMetricsCredentialsRequest{\n Credentials: &godo.DatabaseMetricsCredentials{\n BasicAuthUsername: \"a_new_username\",\n BasicAuthPassword: \"a_new_password\",\n },\n })\n}" security: - bearer_auth: - database:update /v2/databases/{database_cluster_uuid}/indexes: get: operationId: databases_list_opeasearch_indexes summary: List Indexes for a OpenSearch Cluster description: 'To list all of a OpenSearch cluster''s indexes, send a GET request to `/v2/databases/$DATABASE_ID/indexes`. The result will be a JSON object with a `indexes` key. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' responses: '200': $ref: '#/components/responses/opensearch_indexes' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/indexes\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n replicas, _, err := client.Databases.ListIndexes(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", nil)\n}" security: - bearer_auth: - database:read /v2/databases/{database_cluster_uuid}/indexes/{index_name}: delete: operationId: databases_delete_opensearch_index summary: Delete Index for OpenSearch Cluster description: 'To delete a single index within OpenSearch cluster, send a DELETE request to `/v2/databases/$DATABASE_ID/indexes/$INDEX_NAME`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. ' tags: - Databases parameters: - $ref: '#/components/parameters/database_cluster_uuid' - $ref: '#/components/parameters/opensearch_index_name' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X DELETE \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/indexes/sample-index\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n indexName := \"sampe-index\"\n\n _, err := client.Databases.DeleteIndex(ctx, \"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30\", indexName)\n}" security: - bearer_auth: - database:delete components: schemas: logsink_base_verbose: type: object properties: sink_id: type: string example: dfcc9f57d86bf58e321c2c6c31c7a971be244ac7 description: A unique identifier for Logsink sink_name: type: string description: The name of the Logsink example: prod-logsink sink_type: type: string enum: - rsyslog - elasticsearch - opensearch example: rsyslog backup: type: object properties: created_at: type: string format: date-time example: '2019-01-31T19:25:22Z' description: A time value given in ISO8601 combined date and time format at which the backup was created. size_gigabytes: type: number example: 0.03364864 description: The size of the database backup in GBs. required: - created_at - size_gigabytes database_layout_option: type: object properties: num_nodes: type: integer example: 1 sizes: type: array items: type: string example: - db-s-1vcpu-1gb - db-s-1vcpu-2gb readOnly: true description: An array of objects containing the slugs available with various node counts online_migration: type: object properties: id: type: string description: The ID of the most recent migration. example: 77b28fc8-19ff-11eb-8c9c-c68e24557488 status: type: string description: The current status of the migration. enum: - running - canceled - error - done example: running created_at: type: string description: The time the migration was initiated, in ISO 8601 format. example: '2020-10-29T15:57:38Z' logsink_verbose: type: object allOf: - $ref: '#/components/schemas/logsink_base_verbose' - properties: config: anyOf: - $ref: '#/components/schemas/rsyslog_logsink' - $ref: '#/components/schemas/elasticsearch_logsink' - $ref: '#/components/schemas/opensearch_logsink' example: config: server: 192.168.0.1 port: 514 tls: false format: rfc5424 rsyslog_logsink: type: object properties: server: type: string example: 192.168.0.1 description: DNS name or IPv4 address of the rsyslog server port: type: integer example: 514 maximum: 65535 description: The internal port on which the rsyslog server is listening tls: type: boolean example: false 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) format: type: string enum: - rfc5424 - rfc3164 - custom example: rfc5424 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 logline: type: string example: <%pri%>%timestamp:::date-rfc3339% %HOSTNAME% %app-name% %msg% description: 'Conditional (required if `format` == `custom`). Syslog 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`. ' sd: type: string example: TOKEN tag="LiteralValue" description: content of the structured data block of rfc5424 message ca: type: string example: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n' description: PEM encoded CA certificate key: type: string example: '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n' description: (PEM format) client key if the server requires client authentication cert: type: string example: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n' description: (PEM format) client cert to use required: - server - port - tls - format logsink_update: type: object properties: config: anyOf: - $ref: '#/components/schemas/rsyslog_logsink' - $ref: '#/components/schemas/elasticsearch_logsink' - $ref: '#/components/schemas/opensearch_logsink' required: - config database_user: type: object properties: name: type: string example: app-01 description: The name of a database user. role: type: string enum: - primary - normal example: normal description: 'A string representing the database user''s role. The value will be either "primary" or "normal". ' readOnly: true password: type: string example: jge5lfxtzhx42iff description: A randomly generated password for the database user. readOnly: true access_cert: type: string example: '-----BEGIN CERTIFICATE----- MIIFFjCCA/6gAwIBAgISA0AznUJmXhu08/89ZuSPC/kRMA0GCSqGSIb3DQEBCwUA MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xNjExMjQwMDIzMDBaFw0x NzAyMjIwMDIzMDBaMCQxIjAgBgNVBAMTGWNsb3VkLmFuZHJld3NvbWV0aGluZy5j b20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDBIZMz8pnK6V52SVf+ CYssOfCQHAx5f0Ou5rYbq3xNh8VWHIYJCQ1QxQIxKSP6+uODSYrb2KWyurP1DwGb 8OYm0J3syEDtCUQik1cpCzpeNlAZ2f8FzXyYQAqPopxdRpsFz8DtZnVvu86XwrE4 oFPl9MReICmZfBNWylpV5qgFPoXyJ70ZAsTm3cEe3n+LBXEnY4YrVDRWxA3wZ2mz Z03HZ1hHrxK9CMnS829U+8sK+UneZpCO7yLRPuxwhmps0wpK/YuZZfRAKF1FZRna k/SIQ28rnWufmdg16YqqHgl5JOgnb3aslKRvL4dI2Gwnkd2IHtpZnTR0gxFXfqqb QwuRAgMBAAGjggIaMIICFjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYB BQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFLsAFcxAhFX1 MbCnzr9hEO5rL4jqMB8GA1UdIwQYMBaAFKhKamMEfd265tE5t6ZFZe/zqOyhMHAG CCsGAQUFBwEBBGQwYjAvBggrBgEFBQcwAYYjaHR0cDovL29jc3AuaW50LXgzLmxl dHNlbmNyeXB0Lm9yZy8wLwYIKwYBBQUHMAKGI2h0dHA6Ly9jZXJ0LmludC14My5s ZXRzZW5jcnlwdC5vcmcvMCQGA1UdEQQdMBuCGWNsb3VkLmFuZHJld3NvbWV0aGlu Zy5jb20wgf4GA1UdIASB9jCB8zAIBgZngQwBAgWrgeYGCysGAQQBgt8TAQEBMIHW MCYGCCsGAQUFBwIBFhpodHRwOi8vY3BzLmxldHNlbmNyeXB0Lm9yZzCBqwYIKwYB BQUHAgIwgZ4MgZtUaGlzIENlcnRpZmljYXRlIG1heSBvbmx5IGJlIHJlbGllZCB1 cG9uIGJ5IFJlbHlpbmcgUGFydGllcyBhbmQgb25seSQ2ziBhY2NvcmRhbmNlIHdp dGggdGhlIENlcnRpZmljYXRlIFBvbGljeSBmb3VuZCBhdCBodHRwczovL2xldHNl bmNyeXB0Lm9yZy9yZXBvc2l0b3J5LzANBgkqhkiG9w0BAQsFAAOCAQEAOZVQvrjM PKXLARTjB5XsgfyDN3/qwLl7SmwGkPe+B+9FJpfScYG1JzVuCj/SoaPaK34G4x/e iXwlwOXtMOtqjQYzNu2Pr2C+I+rVmaxIrCUXFmC205IMuUBEeWXG9Y/HvXQLPabD D3Gdl5+Feink9SDRP7G0HaAwq13hI7ARxkL9p+UIY39X0dV3WOboW2Re8nrkFXJ7 q9Z6shK5QgpBfsLjtjNsQzaGV3ve1gOg25aTJGearBWOvEjJNA1wGMoKVXOtYwm/ WyWoVdCQ8HmconcbJB6xc0UZ1EjvzRr5ZIvSa5uHZD0L3m7/kpPWlAlFJ7hHASPu UlF1zblDmg2Iaw== -----END CERTIFICATE-----' description: Access certificate for TLS client authentication. (Kafka only) readOnly: true access_key: type: string example: '-----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDBIZMz8pnK6V52 SVf+CYssOfCQHAx5f0Ou5rYbq3xNh8VHAIYJCQ1QxQIxKSP6+uODSYrb2KWyurP1 DwGb8OYm0J3syEDtCUQik1cpCzpeNlAZ2f8FzXyYQAqPopxdRpsFz8DtZnVvu86X wrE4oFPl9MReICmZfBNWylpV5qgFPoXyJ70ZAsTm3cEe3n+LBXEnY4YrVDRWxA3w Z2mzZ03HZ1hHrxK9CMnS829U+8sK+UneZpCO7yLRPuxwhmps0wpK/YuZZfRAKF1F ZRnak/SIQ28rnWufmdg16YqqHgl5JOgnb3aslKRvL4dI2Gwnkd2IHtpZnTR0gxFX fqqbQwuRAgMBAAECggEBAILLmkW0JzOkmLTDNzR0giyRkLoIROqDpfLtjKdwm95l 9NUBJcU4vCvXQITKt/NhtnNTexcowg8pInb0ksJpg3UGE+4oMNBXVi2UW5MQZ5cm cVkQqgXkBF2YAY8FMaB6EML+0En2+dGR/3gIAr221xsFiXe1kHbB8Nb2c/d5HpFt eRpLVJnK+TxSr78PcZA8DDGlSgwvgimdAaFUNO2OqB9/0E9UPyKk2ycdff/Z6ldF 0hkCLtdYTTl8Kf/OwjcuTgmA2O3Y8/CoQX/L+oP9Rvt9pWCEfuebiOmHJVPO6Y6x gtQVEXwmF1pDHH4Qtz/e6UZTdYeMl9G4aNO2CawwcaYECgYEA57imgSOG4XsJLRh GGncV9R/xhy4AbDWLtAMzQRX4ktvKCaHWyQV2XK2we/cu29NLv2Y89WmerTNPOU+ P8+pB31uty2ELySVn15QhKpQClVEAlxCnnNjXYrii5LOM80+lVmxvQwxVd8Yz8nj IntyioXNBEnYS7V2RxxFGgFun1cCgYEA1V3W+Uyamhq8JS5EY0FhyGcXdHd70K49 W1ou7McIpncf9tM9acLS1hkI98rd2T69Zo8mKoV1V2hjFaKUYfNys6tTkYWeZCcJ 3rW44j9DTD+FmmjcX6b8DzfybGLehfNbCw6n67/r45DXIV/fk6XZfkx6IEGO4ODt Nfnvx4TuI1cCgYBACDiKqwSUvmkUuweOo4IuCxyb5Ee8v98P5JIE/VRDxlCbKbpx pxEam6aBBQVcDi+n8o0H3WjjlKc6UqbW/01YMoMrvzotxNBLz8Y0QtQHZvR6KoCG RKCKstxTcWflzKuknbqN4RapAhNbKBDJ8PMSWfyDWNyaXzSmBdvaidbF1QKBgDI0 o4oD0Xkjg1QIYAUu9FBQmb9JAjRnW36saNBEQS/SZg4RRKknM683MtoDvVIKJk0E sAlfX+4SXQZRPDMUMtA+Jyrd0xhj6zmhbwClvDMr20crF3fWdgcqtft1BEFmsuyW JUMe5OWmRkjPI2+9ncDPRAllA7a8lnSV/Crph5N/AoGBAIK249temKrGe9pmsmAo QbNuYSmwpnMoAqdHTrl70HEmK7ob6SIVmsR8QFAkH7xkYZc4Bxbx4h1bdpozGB+/ AangbiaYJcAOD1QyfiFbflvI1RFeHgrk7VIafeSeQv6qu0LLMi2zUbpgVzxt78Wg eTuK2xNR0PIM8OI7pRpgyj1I -----END PRIVATE KEY-----' description: Access key for TLS client authentication. (Kafka only) readOnly: true mysql_settings: $ref: '#/components/schemas/mysql_settings' settings: $ref: '#/components/schemas/user_settings' required: - name kafka_advanced_config: type: object properties: compression_type: description: Specify the final compression type for a given topic. This configuration accepts the standard compression codecs ('gzip', 'snappy', 'lz4', 'zstd'). It additionally accepts 'uncompressed' which is equivalent to no compression; and 'producer' which means retain the original compression codec set by the producer. type: string enum: - gzip - snappy - lz4 - zstd - uncompressed - producer example: gzip group_initial_rebalance_delay_ms: description: The amount of time, in milliseconds, the group coordinator will wait for more consumers to join a new group before performing the first rebalance. A longer delay means potentially fewer rebalances, but increases the time until processing begins. The default value for this is 3 seconds. During development and testing it might be desirable to set this to 0 in order to not delay test execution time. type: integer example: 3000 minimum: 0 maximum: 300000 group_min_session_timeout_ms: description: The minimum allowed session timeout for registered consumers. Longer timeouts give consumers more time to process messages in between heartbeats at the cost of a longer time to detect failures. type: integer example: 6000 minimum: 0 maximum: 60000 group_max_session_timeout_ms: description: The maximum allowed session timeout for registered consumers. Longer timeouts give consumers more time to process messages in between heartbeats at the cost of a longer time to detect failures. type: integer example: 1800000 minimum: 0 maximum: 1800000 connections_max_idle_ms: description: 'Idle connections timeout: the server socket processor threads close the connections that idle for longer than this.' type: integer minimum: 1000 example: 540000 maximum: 3600000 max_incremental_fetch_session_cache_slots: description: The maximum number of incremental fetch sessions that the broker will maintain. type: integer example: 1000 minimum: 1000 maximum: 10000 message_max_bytes: description: The maximum size of message that the server can receive. type: integer example: 1048588 minimum: 0 maximum: 100001200 offsets_retention_minutes: description: Log retention window in minutes for offsets topic type: integer example: 10080 minimum: 1 maximum: 2147483647 log_cleaner_delete_retention_ms: description: How long are delete records retained? type: integer minimum: 0 maximum: 315569260000 example: 86400000 log_cleaner_min_cleanable_ratio: description: Controls log compactor frequency. Larger value means more frequent compactions but also more space wasted for logs. Consider setting log_cleaner_max_compaction_lag_ms to enforce compactions sooner, instead of setting a very high value for this option. type: number minimum: 0.2 maximum: 0.9 example: 0.5 log_cleaner_max_compaction_lag_ms: description: The maximum amount of time message will remain uncompacted. Only applicable for logs that are being compacted type: integer minimum: 30000 maximum: 9223372036854776000 example: 60000 log_cleaner_min_compaction_lag_ms: description: The minimum time a message will remain uncompacted in the log. Only applicable for logs that are being compacted. type: integer minimum: 0 maximum: 9223372036854776000 example: 100000 log_cleanup_policy: description: The default cleanup policy for segments beyond the retention window type: string enum: - delete - compact - compact,delete example: delete log_flush_interval_messages: description: The number of messages accumulated on a log partition before messages are flushed to disk type: integer minimum: 1 maximum: 9223372036854776000 example: 9223372036854776000 log_flush_interval_ms: description: The maximum time in ms that a message in any topic is kept in memory before flushed to disk. If not set, the value in log.flush.scheduler.interval.ms is used type: integer minimum: 0 maximum: 9223372036854776000 example: 1000000 log_index_interval_bytes: description: The interval with which Kafka adds an entry to the offset index type: integer minimum: 0 maximum: 104857600 example: 4096 log_index_size_max_bytes: description: The maximum size in bytes of the offset index type: integer minimum: 1048576 maximum: 104857600 example: 10485760 log_message_downconversion_enable: description: This configuration controls whether down-conversion of message formats is enabled to satisfy consume requests. type: boolean example: true log_message_timestamp_type: description: Define whether the timestamp in the message is message create time or log append time. type: string enum: - CreateTime - LogAppendTime example: CreateTime log_message_timestamp_difference_max_ms: description: The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message type: integer minimum: 0 maximum: 9223372036854776000 example: 1000000 log_preallocate: description: Controls whether to preallocate a file when creating a new segment type: boolean example: false log_retention_bytes: description: The maximum size of the log before deleting messages type: integer minimum: -1 maximum: 9223372036854776000 example: 1000000 log_retention_hours: description: The number of hours to keep a log file before deleting it type: integer minimum: -1 maximum: 2147483647 example: 1000000 log_retention_ms: description: The number of milliseconds to keep a log file before deleting it (in milliseconds), If not set, the value in log.retention.minutes is used. If set to -1, no time limit is applied. type: integer minimum: -1 maximum: 9223372036854776000 example: 100000000 log_roll_jitter_ms: description: The maximum jitter to subtract from logRollTimeMillis (in milliseconds). If not set, the value in log.roll.jitter.hours is used type: integer minimum: 0 maximum: 9223372036854776000 example: 10000000 log_roll_ms: description: The maximum time before a new log segment is rolled out (in milliseconds). type: integer minimum: 1 maximum: 9223372036854776000 example: 1000000 log_segment_bytes: description: The maximum size of a single log file type: integer minimum: 10485760 maximum: 1073741824 example: 100000000 log_segment_delete_delay_ms: description: The amount of time to wait before deleting a file from the filesystem type: integer minimum: 0 maximum: 3600000 example: 60000 auto_create_topics_enable: description: Enable auto creation of topics type: boolean example: true min_insync_replicas: description: When a producer sets acks to 'all' (or '-1'), min_insync_replicas specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. type: integer minimum: 1 maximum: 7 example: 1 num_partitions: description: Number of partitions for autocreated topics type: integer minimum: 1 maximum: 1000 example: 10 default_replication_factor: description: Replication factor for autocreated topics type: integer minimum: 1 maximum: 10 example: 2 replica_fetch_max_bytes: description: The number of bytes of messages to attempt to fetch for each partition (defaults to 1048576). This is not an absolute maximum, if the first record batch in the first non-empty partition of the fetch is larger than this value, the record batch will still be returned to ensure that progress can be made. type: integer minimum: 1048576 maximum: 104857600 example: 2097152 replica_fetch_response_max_bytes: description: Maximum bytes expected for the entire fetch response (defaults to 10485760). Records are fetched in batches, and if the first record batch in the first non-empty partition of the fetch is larger than this value, the record batch will still be returned to ensure that progress can be made. As such, this is not an absolute maximum. type: integer minimum: 10485760 maximum: 1048576000 example: 20971520 max_connections_per_ip: description: The maximum number of connections allowed from each ip address (defaults to 2147483647). type: integer minimum: 256 maximum: 2147483647 example: 512 producer_purgatory_purge_interval_requests: description: The purge interval (in number of requests) of the producer request purgatory (defaults to 1000). type: integer minimum: 10 maximum: 10000 example: 100 socket_request_max_bytes: description: The maximum number of bytes in a socket request (defaults to 104857600). type: integer minimum: 10485760 maximum: 209715200 example: 20971520 transaction_state_log_segment_bytes: description: The transaction topic segment bytes should be kept relatively small in order to facilitate faster log compaction and cache loads (defaults to 104857600 (100 mebibytes)). type: integer minimum: 1048576 maximum: 2147483647 example: 104857600 transaction_remove_expired_transaction_cleanup_interval_ms: description: The interval at which to remove transactions that have expired due to transactional.id.expiration.ms passing (defaults to 3600000 (1 hour)). type: integer minimum: 600000 maximum: 3600000 example: 3600000 database_backup: type: object properties: database_name: type: string example: backend description: The name of an existing database cluster from which the backup will be restored. backup_created_at: type: string format: date-time example: '2019-01-31T19:25:22Z' description: The timestamp of an existing database cluster backup in ISO8601 combined date and time format. The most recent backup will be used if excluded. required: - database_name database_region_options: type: object properties: regions: type: array items: type: string example: - ams3 - blr1 readOnly: true description: An array of strings containing the names of available regions elasticsearch_logsink: type: object properties: url: type: string example: https://user:passwd@192.168.0.1:9200 description: Elasticsearch connection URL index_prefix: type: string example: elastic-logs description: Elasticsearch index prefix index_days_max: type: integer default: 7 example: 5 maximum: 10000 minimum: 1 description: Maximum number of days of logs to keep timeout: type: number format: float example: 10 default: 10 minimum: 10 maximum: 120 description: Elasticsearch request timeout limit ca: type: string example: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n' description: PEM encoded CA certificate required: - url - index_prefix database_maintenance_window: type: object nullable: true properties: day: type: string example: tuesday description: The day of the week on which to apply maintenance updates. hour: type: string example: '14:00' description: The hour in UTC at which maintenance updates will be applied in 24 hour format. pending: type: boolean example: true description: A boolean value indicating whether any maintenance is scheduled to be performed in the next window. readOnly: true description: type: array items: type: string description: A list of strings, each containing information about a pending maintenance update. example: - Update TimescaleDB to version 1.2.1 - Upgrade to PostgreSQL 11.2 and 10.7 bugfix releases readOnly: true required: - day - hour version: type: string example: '8' description: A string representing the version of the database engine in use for the cluster. kafka_topic_create: type: object allOf: - $ref: '#/components/schemas/kafka_topic_base' - properties: config: $ref: '#/components/schemas/kafka_topic_config' options: type: object properties: options: type: object properties: kafka: allOf: - $ref: '#/components/schemas/database_region_options' - $ref: '#/components/schemas/database_version_options' - $ref: '#/components/schemas/database_layout_options' mongodb: allOf: - $ref: '#/components/schemas/database_region_options' - $ref: '#/components/schemas/database_version_options' - $ref: '#/components/schemas/database_layout_options' pg: allOf: - $ref: '#/components/schemas/database_region_options' - $ref: '#/components/schemas/database_version_options' - $ref: '#/components/schemas/database_layout_options' mysql: allOf: - $ref: '#/components/schemas/database_region_options' - $ref: '#/components/schemas/database_version_options' - $ref: '#/components/schemas/database_layout_options' redis: allOf: - $ref: '#/components/schemas/database_region_options' - $ref: '#/components/schemas/database_version_options' - $ref: '#/components/schemas/database_layout_options' opensearch: allOf: - $ref: '#/components/schemas/database_region_options' - $ref: '#/components/schemas/database_version_options' - $ref: '#/components/schemas/database_layout_options' version_availability: type: object properties: kafka: $ref: '#/components/schemas/database_version_availabilities' pg: $ref: '#/components/schemas/database_version_availabilities' mysql: $ref: '#/components/schemas/database_version_availabilities' redis: $ref: '#/components/schemas/database_version_availabilities' mongodb: $ref: '#/components/schemas/database_version_availabilities' opensearch: $ref: '#/components/schemas/database_version_availabilities' database_replica: type: object properties: id: type: string format: uuid example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 description: A unique ID that can be used to identify and reference a database replica. readOnly: true name: type: string example: read-nyc3-01 description: The name to give the read-only replicating region: type: string example: nyc3 description: A slug identifier for the region where the read-only replica will be located. If excluded, the replica will be placed in the same region as the cluster. size: type: string example: db-s-2vcpu-4gb description: A slug identifier representing the size of the node for the read-only replica. The size of the replica must be at least as large as the node size for the database cluster from which it is replicating. status: type: string enum: - creating - online - resizing - migrating - forking example: creating description: A string representing the current status of the database cluster. readOnly: true tags: type: array items: type: string example: - production description: A flat array of tag names as strings to apply to the read-only replica after it is created. Tag names can either be existing or new tags. created_at: type: string format: date-time example: '2019-01-11T18:37:36Z' description: A time value given in ISO8601 combined date and time format that represents when the database cluster was created. readOnly: true private_network_uuid: type: string example: 9423cbad-9211-442f-820b-ef6915e99b5f description: A string specifying the UUID of the VPC to which the read-only replica will be assigned. If excluded, the replica will be assigned to your account's default VPC for the region. connection: allOf: - readOnly: true - $ref: '#/components/schemas/database_connection' private_connection: allOf: - readOnly: true - $ref: '#/components/schemas/database_connection' storage_size_mib: type: integer example: 61440 description: Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond what is provided as a base amount from the 'size' and any previously added additional storage. required: - name database_cluster_resize: type: object properties: size: type: string example: db-s-4vcpu-8gb description: A slug identifier representing desired the size of the nodes in the database cluster. num_nodes: type: integer format: int32 example: 3 description: The number of nodes in the database cluster. Valid values are are 1-3. In addition to the primary node, up to two standby nodes may be added for highly available configurations. storage_size_mib: type: integer example: 61440 description: Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond what is provided as a base amount from the 'size' and any previously added additional storage. required: - size - num_nodes error: type: object properties: id: description: A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." type: string example: not_found message: description: A message providing additional information about the error, including details to help resolve it when possible. type: string example: The resource you were accessing could not be found. request_id: description: Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. type: string example: 4d9d8375-3c56-4925-a3e7-eb137fed17e9 required: - id - message opensearch_index_base: type: object properties: index_name: type: string description: The name of the opensearch index. example: events number_of_shards: type: integer example: 2 description: The number of shards for the index. number_of_replicas: type: integer example: 3 description: The number of replicas for the index. size: type: integer example: 208 description: The size of the index. created_time: type: string format: date-time example: '2021-01-01T00:00:00Z' description: The date and time the index was created. postgres_advanced_config: type: object properties: autovacuum_freeze_max_age: description: Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. Note that the system will launch autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. This parameter will cause the server to be restarted. type: integer minimum: 200000000 maximum: 1500000000 example: 200000000 autovacuum_max_workers: description: Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is three. This parameter can only be set at server start. type: integer minimum: 1 maximum: 20 example: 5 autovacuum_naptime: description: Specifies the minimum delay, in seconds, between autovacuum runs on any given database. The default is one minute. type: integer minimum: 0 maximum: 86400 example: 43200 autovacuum_vacuum_threshold: description: Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50 tuples. type: integer minimum: 0 maximum: 2147483647 example: 50 autovacuum_analyze_threshold: description: Specifies the minimum number of inserted, updated, or deleted tuples needed to trigger an ANALYZE in any one table. The default is 50 tuples. type: integer minimum: 0 maximum: 2147483647 example: 50 autovacuum_vacuum_scale_factor: description: Specifies a fraction, in a decimal value, of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM. The default is 0.2 (20% of table size). type: number minimum: 0 maximum: 1 example: 0.2 autovacuum_analyze_scale_factor: description: Specifies a fraction, in a decimal value, of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE. The default is 0.2 (20% of table size). type: number minimum: 0 maximum: 1 example: 0.2 autovacuum_vacuum_cost_delay: description: Specifies the cost delay value, in milliseconds, that will be used in automatic VACUUM operations. If -1, uses the regular vacuum_cost_delay value, which is 20 milliseconds. type: integer minimum: -1 maximum: 100 example: 20 autovacuum_vacuum_cost_limit: description: Specifies the cost limit value that will be used in automatic VACUUM operations. If -1 is specified (which is the default), the regular vacuum_cost_limit value will be used. type: integer minimum: -1 maximum: 10000 example: -1 backup_hour: description: The hour of day (in UTC) when backup for the service starts. New backup only starts if previous backup has already completed. minimum: 0 maximum: 23 type: integer example: 3 backup_minute: description: The minute of the backup hour when backup for the service starts. New backup is only started if previous backup has already completed. minimum: 0 maximum: 59 type: integer example: 30 bgwriter_delay: description: Specifies the delay, in milliseconds, between activity rounds for the background writer. Default is 200 ms. type: integer minimum: 10 maximum: 10000 example: 200 bgwriter_flush_after: description: The amount of kilobytes that need to be written by the background writer before attempting to force the OS to issue these writes to underlying storage. Specified in kilobytes, default is 512. Setting of 0 disables forced writeback. type: integer minimum: 0 maximum: 2048 example: 512 bgwriter_lru_maxpages: description: The maximum number of buffers that the background writer can write. Setting this to zero disables background writing. Default is 100. type: integer minimum: 0 maximum: 1073741823 example: 100 bgwriter_lru_multiplier: description: The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a just in time policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is 2.0. type: number minimum: 0 maximum: 10 example: 2 deadlock_timeout: description: The amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. type: integer minimum: 500 maximum: 1800000 example: 1000 default_toast_compression: description: Specifies the default TOAST compression method for values of compressible columns (the default is lz4). type: string enum: - lz4 - pglz example: lz4 idle_in_transaction_session_timeout: description: Time out sessions with open transactions after this number of milliseconds type: integer minimum: 0 maximum: 604800000 example: 10000 jit: description: Activates, in a boolean, the system-wide use of Just-in-Time Compilation (JIT). type: boolean example: true log_autovacuum_min_duration: description: Causes each action executed by autovacuum to be logged if it ran for at least the specified number of milliseconds. Setting this to zero logs all autovacuum actions. Minus-one (the default) disables logging autovacuum actions. type: integer minimum: -1 maximum: 2147483647 example: -1 log_error_verbosity: description: Controls the amount of detail written in the server log for each message that is logged. type: string enum: - TERSE - DEFAULT - VERBOSE example: VERBOSE log_line_prefix: description: Selects one of the available log-formats. These can support popular log analyzers like pgbadger, pganalyze, etc. type: string enum: - pid=%p,user=%u,db=%d,app=%a,client=%h - '%m [%p] %q[user=%u,db=%d,app=%a]' - '%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h' example: pid=%p,user=%u,db=%d,app=%a,client=%h log_min_duration_statement: description: Log statements that take more than this number of milliseconds to run. If -1, disables. type: integer minimum: -1 maximum: 86400000 example: -1 max_files_per_process: description: PostgreSQL maximum number of files that can be open per process. type: integer minimum: 1000 maximum: 4096 example: 2048 max_prepared_transactions: description: PostgreSQL maximum prepared transactions. Once increased, this parameter cannot be lowered from its set value. type: integer minimum: 0 maximum: 10000 example: 20 max_pred_locks_per_transaction: description: PostgreSQL maximum predicate locks per transaction. type: integer minimum: 64 maximum: 640 example: 128 max_locks_per_transaction: description: PostgreSQL maximum locks per transaction. Once increased, this parameter cannot be lowered from its set value. type: integer minimum: 64 maximum: 6400 example: 128 max_stack_depth: description: Maximum depth of the stack in bytes. type: integer minimum: 2097152 maximum: 6291456 example: 2097152 max_standby_archive_delay: description: Max standby archive delay in milliseconds. type: integer minimum: 1 maximum: 43200000 example: 43200 max_standby_streaming_delay: description: Max standby streaming delay in milliseconds. type: integer minimum: 1 maximum: 43200000 example: 43200 max_replication_slots: description: PostgreSQL maximum replication slots. type: integer minimum: 8 maximum: 64 example: 16 max_logical_replication_workers: description: PostgreSQL maximum logical replication workers (taken from the pool of max_parallel_workers). type: integer minimum: 4 maximum: 64 example: 16 max_parallel_workers: description: Sets the maximum number of workers that the system can support for parallel queries. type: integer minimum: 0 maximum: 96 example: 12 max_parallel_workers_per_gather: description: Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. type: integer minimum: 0 maximum: 96 example: 16 max_worker_processes: description: Sets the maximum number of background processes that the system can support. Once increased, this parameter cannot be lowered from its set value. type: integer minimum: 8 maximum: 96 example: 16 pg_partman_bgw.role: type: string pattern: ^[_A-Za-z0-9][-._A-Za-z0-9]{0,63}$ maxLength: 64 example: myrolename description: Controls which role to use for pg_partman's scheduled background tasks. Must consist of alpha-numeric characters, dots, underscores, or dashes. May not start with dash or dot. Maximum of 64 characters. pg_partman_bgw.interval: description: Sets the time interval to run pg_partman's scheduled tasks. type: integer minimum: 3600 maximum: 604800 example: 3600 pg_stat_statements.track: description: Controls which statements are counted. Specify 'top' to track top-level statements (those issued directly by clients), 'all' to also track nested statements (such as statements invoked within functions), or 'none' to disable statement statistics collection. The default value is top. type: string enum: - all - top - none example: all temp_file_limit: description: PostgreSQL temporary file limit in KiB. If -1, sets to unlimited. type: integer example: 5000000 minimum: -1 maximum: 2147483647 timezone: description: PostgreSQL service timezone type: string example: Europe/Helsinki maxLength: 64 track_activity_query_size: description: Specifies the number of bytes reserved to track the currently executing command for each active session. type: integer example: 1024 minimum: 1024 maximum: 10240 track_commit_timestamp: description: Record commit time of transactions. type: string enum: - 'off' - 'on' example: 'off' track_functions: description: Enables tracking of function call counts and time used. type: string enum: - all - pl - none example: all track_io_timing: description: Enables timing of database I/O calls. This parameter is off by default, because it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. type: string enum: - 'off' - 'on' example: 'off' max_wal_senders: description: PostgreSQL maximum WAL senders. Once increased, this parameter cannot be lowered from its set value. type: integer minimum: 20 maximum: 64 example: 32 wal_sender_timeout: description: Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout. Must be either 0 or between 5000 and 10800000. type: integer minimum: 0 maximum: 10800000 example: 60000 wal_writer_delay: description: WAL flush interval in milliseconds. Note that setting this value to lower than the default 200ms may negatively impact performance type: integer minimum: 10 maximum: 200 example: 50 shared_buffers_percentage: description: Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value. type: number minimum: 20 maximum: 60 example: 41.5 pgbouncer: $ref: '#/components/schemas/pgbouncer_advanced_config' work_mem: description: The maximum amount of memory, in MB, used by a query operation (such as a sort or hash table) before writing to temporary disk files. Default is 1MB + 0.075% of total RAM (up to 32MB). type: integer minimum: 1 maximum: 1024 example: 4 timescaledb: $ref: '#/components/schemas/timescaledb_advanced_config' synchronous_replication: description: Synchronous replication type. Note that the service plan also needs to support synchronous replication. type: string example: 'off' enum: - 'off' - quorum stat_monitor_enable: description: Enable the pg_stat_monitor extension. Enabling this extension will cause the cluster to be restarted. When this extension is enabled, pg_stat_statements results for utility commands are unreliable. type: boolean example: false max_failover_replication_time_lag: description: Number of seconds of master unavailability before triggering database failover to standby. The default value is 60. type: integer minimum: 10 maximum: 9223372036854776000 example: 50 databases_basic_auth_credentials: type: object properties: basic_auth_username: type: string example: username description: basic authentication username for metrics HTTP endpoint basic_auth_password: type: string example: password description: basic authentication password for metrics HTTP endpoint kafka_topic_update: type: object properties: replication_factor: type: integer example: 2 description: The number of nodes to replicate data across the cluster. partition_count: type: integer example: 3 description: The number of partitions available for the topic. On update, this value can only be increased. config: $ref: '#/components/schemas/kafka_topic_config' connection_pool: type: object properties: name: type: string description: A unique name for the connection pool. Must be between 3 and 60 characters. example: backend-pool mode: type: string description: The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement. example: transaction size: type: integer format: int32 description: The desired size of the PGBouncer connection pool. The maximum allowed size is determined by the size of the cluster's primary node. 25 backend server connections are allowed for every 1GB of RAM. Three are reserved for maintenance. For example, a primary node with 1 GB of RAM allows for a maximum of 22 backend server connections while one with 4 GB would allow for 97. Note that these are shared across all connection pools in a cluster. example: 10 db: type: string description: The database for use with the connection pool. example: defaultdb user: type: string description: The name of the user for use with the connection pool. When excluded, all sessions connect to the database as the inbound user. example: doadmin connection: allOf: - $ref: '#/components/schemas/database_connection' - readOnly: true private_connection: allOf: - $ref: '#/components/schemas/database_connection' - readOnly: true standby_connection: allOf: - $ref: '#/components/schemas/database_connection' - readOnly: true standby_private_connection: allOf: - $ref: '#/components/schemas/database_connection' - readOnly: true required: - name - mode - size - db database_cluster: type: object properties: id: type: string format: uuid example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 description: A unique ID that can be used to identify and reference a database cluster. readOnly: true name: type: string example: backend description: A unique, human-readable name referring to a database cluster. engine: type: string example: mysql enum: - pg - mysql - redis - mongodb - kafka - opensearch description: 'A slug representing the database engine used for the cluster. The possible values are: "pg" for PostgreSQL, "mysql" for MySQL, "redis" for Redis, "mongodb" for MongoDB, "kafka" for Kafka, and "opensearch" for OpenSearch.' version: type: string example: '8' description: A string representing the version of the database engine in use for the cluster. semantic_version: type: string example: 8.0.28 description: A string representing the semantic version of the database engine in use for the cluster. readOnly: true num_nodes: type: integer example: 2 description: The number of nodes in the database cluster. size: type: string example: db-s-2vcpu-4gb description: The slug identifier representing the size of the nodes in the database cluster. region: type: string example: nyc3 description: The slug identifier for the region where the database cluster is located. status: type: string enum: - creating - online - resizing - migrating - forking example: creating description: A string representing the current status of the database cluster. readOnly: true created_at: type: string format: date-time example: '2019-01-11T18:37:36Z' description: A time value given in ISO8601 combined date and time format that represents when the database cluster was created. readOnly: true private_network_uuid: type: string pattern: ^$|[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12} example: d455e75d-4858-4eec-8c95-da2f0a5f93a7 description: A string specifying the UUID of the VPC to which the database cluster will be assigned. If excluded, the cluster when creating a new database cluster, it will be assigned to your account's default VPC for the region. tags: type: array items: type: string example: - production nullable: true description: An array of tags that have been applied to the database cluster. db_names: type: array items: type: string example: - doadmin nullable: true readOnly: true description: An array of strings containing the names of databases created in the database cluster. ui_connection: allOf: - $ref: '#/components/schemas/opensearch_connection' - readOnly: true description: 'The connection details for OpenSearch dashboard. ' connection: allOf: - $ref: '#/components/schemas/database_connection' - readOnly: true private_connection: allOf: - $ref: '#/components/schemas/database_connection' - readOnly: true standby_connection: allOf: - $ref: '#/components/schemas/database_connection' - readOnly: true standby_private_connection: allOf: - $ref: '#/components/schemas/database_connection' - readOnly: true users: type: array nullable: true items: $ref: '#/components/schemas/database_user' readOnly: true maintenance_window: allOf: - $ref: '#/components/schemas/database_maintenance_window' - readOnly: true project_id: type: string format: uuid example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 description: The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project. rules: type: array items: $ref: '#/components/schemas/firewall_rule' version_end_of_life: type: string example: '2023-11-09T00:00:00Z' readOnly: true description: A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline. version_end_of_availability: type: string example: '2023-05-09T00:00:00Z' readOnly: true description: A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline. storage_size_mib: type: integer example: 61440 description: Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond what is provided as a base amount from the 'size' and any previously added additional storage. metrics_endpoints: type: array items: $ref: '#/components/schemas/database_service_endpoint' description: Public hostname and port of the cluster's metrics endpoint(s). Includes one record for the cluster's primary node and a second entry for the cluster's standby node(s). readOnly: true required: - name - engine - num_nodes - size - region database_version_availabilities: type: array description: An array of objects, each indicating the version end-of-life, end-of-availability for various database engines items: $ref: '#/components/schemas/database_version_availability' timescaledb_advanced_config: type: object description: TimescaleDB extension configuration values properties: max_background_workers: description: The number of background workers for timescaledb operations. Set to the sum of your number of databases and the total number of concurrent background workers you want running at any given point in time. type: integer minimum: 1 maximum: 4096 example: 8 mysql_advanced_config: type: object properties: backup_hour: description: The hour of day (in UTC) when backup for the service starts. New backup only starts if previous backup has already completed. minimum: 0 maximum: 23 type: integer example: 3 backup_minute: description: The minute of the backup hour when backup for the service starts. New backup only starts if previous backup has already completed. minimum: 0 maximum: 59 type: integer example: 30 sql_mode: description: Global SQL mode. If empty, uses MySQL server defaults. Must only include uppercase alphabetic characters, underscores, and commas. type: string pattern: ^[A-Z_]*(,[A-Z_]+)*$ example: ANSI,TRADITIONAL maxLength: 1024 connect_timeout: description: The number of seconds that the mysqld server waits for a connect packet before responding with bad handshake. type: integer minimum: 2 maximum: 3600 example: 10 default_time_zone: description: Default server time zone, in the form of an offset from UTC (from -12:00 to +12:00), a time zone name (EST), or 'SYSTEM' to use the MySQL server default. type: string example: +03:00 minLength: 2 maxLength: 100 group_concat_max_len: description: The maximum permitted result length, in bytes, for the GROUP_CONCAT() function. type: integer minimum: 4 maximum: 18446744073709552000 example: 1024 information_schema_stats_expiry: description: The time, in seconds, before cached statistics expire. type: integer minimum: 900 maximum: 31536000 example: 86400 innodb_ft_min_token_size: description: The minimum length of words that an InnoDB FULLTEXT index stores. type: integer minimum: 0 maximum: 16 example: 3 innodb_ft_server_stopword_table: description: The InnoDB FULLTEXT index stopword list for all InnoDB tables. type: string pattern: ^.+/.+$ example: db_name/table_name maxLength: 1024 innodb_lock_wait_timeout: description: The time, in seconds, that an InnoDB transaction waits for a row lock. before giving up. type: integer minimum: 1 maximum: 3600 example: 50 innodb_log_buffer_size: description: The size of the buffer, in bytes, that InnoDB uses to write to the log files. on disk. type: integer minimum: 1048576 maximum: 4294967295 example: 16777216 innodb_online_alter_log_max_size: description: The upper limit, in bytes, of the size of the temporary log files used during online DDL operations for InnoDB tables. type: integer minimum: 65536 maximum: 1099511627776 example: 134217728 innodb_print_all_deadlocks: description: When enabled, records information about all deadlocks in InnoDB user transactions in the error log. Disabled by default. type: boolean example: true innodb_rollback_on_timeout: description: When enabled, transaction timeouts cause InnoDB to abort and roll back the entire transaction. type: boolean example: true interactive_timeout: description: The time, in seconds, the server waits for activity on an interactive. connection before closing it. type: integer minimum: 30 maximum: 604800 example: 3600 internal_tmp_mem_storage_engine: description: The storage engine for in-memory internal temporary tables. type: string enum: - TempTable - MEMORY example: TempTable net_read_timeout: description: The time, in seconds, to wait for more data from an existing connection. aborting the read. type: integer minimum: 1 maximum: 3600 example: 30 net_write_timeout: description: The number of seconds to wait for a block to be written to a connection before aborting the write. type: integer minimum: 1 maximum: 3600 example: 30 sql_require_primary_key: description: Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them. type: boolean example: true wait_timeout: description: The number of seconds the server waits for activity on a noninteractive connection before closing it. type: integer minimum: 1 maximum: 2147483 example: 28800 max_allowed_packet: description: The size of the largest message, in bytes, that can be received by the server. Default is 67108864 (64M). type: integer minimum: 102400 maximum: 1073741824 example: 67108864 max_heap_table_size: description: The maximum size, in bytes, of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M) type: integer minimum: 1048576 maximum: 1073741824 example: 16777216 sort_buffer_size: description: The sort buffer size, in bytes, for ORDER BY optimization. Default is 262144. (256K). type: integer minimum: 32768 maximum: 1073741824 example: 262144 tmp_table_size: description: The maximum size, in bytes, of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M). type: integer minimum: 1048576 maximum: 1073741824 example: 16777216 slow_query_log: description: When enabled, captures slow queries. When disabled, also truncates the mysql.slow_log table. Default is false. type: boolean example: true long_query_time: description: The time, in seconds, for a query to take to execute before being captured by slow_query_logs. Default is 10 seconds. type: number minimum: 0 maximum: 3600 example: 10 binlog_retention_period: description: The minimum amount of time, in seconds, to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default, for example if using the MySQL Debezium Kafka connector. type: number minimum: 600 maximum: 86400 example: 600 innodb_change_buffer_max_size: description: Specifies the maximum size of the InnoDB change buffer as a percentage of the buffer pool. type: integer minimum: 0 maximum: 50 example: 25 innodb_flush_neighbors: description: "Specifies whether flushing a page from the InnoDB buffer pool also flushes other dirty pages in the same extent.\n - 0 — disables this functionality, dirty pages in the same extent are not flushed.\n - 1 — flushes contiguous dirty pages in the same extent.\n - 2 — flushes dirty pages in the same extent." type: integer enum: - 0 - 1 - 2 example: 0 innodb_read_io_threads: description: The number of I/O threads for read operations in InnoDB. Changing this parameter will lead to a restart of the MySQL service. type: integer minimum: 1 maximum: 64 example: 16 innodb_write_io_threads: description: The number of I/O threads for write operations in InnoDB. Changing this parameter will lead to a restart of the MySQL service. type: integer minimum: 1 maximum: 64 example: 16 innodb_thread_concurrency: description: Defines the maximum number of threads permitted inside of InnoDB. A value of 0 (the default) is interpreted as infinite concurrency (no limit). This variable is intended for performance tuning on high concurrency systems. type: integer minimum: 0 maximum: 1000 example: 0 net_buffer_length: description: Start sizes of connection buffer and result buffer, must be multiple of 1024. Changing this parameter will lead to a restart of the MySQL service. type: integer minimum: 1024 maximum: 1048576 example: 4096 log_output: description: Defines the destination for logs. Can be `INSIGHTS`, `TABLE`, or both (`INSIGHTS,TABLE`), or `NONE` to disable logs. To specify both destinations, use `INSIGHTS,TABLE` (order matters). Default is NONE. type: string enum: - INSIGHTS - TABLE - INSIGHTS,TABLE - NONE example: INSIGHTS default: NONE database_version_options: type: object properties: versions: type: array items: type: string example: - '4.4' - '5.0' readOnly: true description: An array of strings containing the names of available regions version-2: type: object properties: version: $ref: '#/components/schemas/version' user_settings: type: object properties: pg_allow_replication: type: boolean example: true description: 'For Postgres clusters, set to `true` for a user with replication rights. This option is not currently supported for other database engines. ' opensearch_acl: type: array items: type: object properties: index: type: string example: index-abc.* description: A regex for matching the indexes that this ACL should apply to. permission: type: string enum: - deny - admin - read - readwrite - write example: read description: Permission set applied to the ACL. 'read' allows user to read from the index. 'write' allows for user to write to the index. 'readwrite' allows for both 'read' and 'write' permission. 'deny'(default) restricts user from performing any operation over an index. 'admin' allows for 'readwrite' as well as any operations to administer the index. description: ACLs (Access Control Lists) specifying permissions on index within a OpenSearch cluster. acl: type: array items: type: object properties: id: type: string description: An identifier for the ACL. Will be computed after the ACL is created/updated. example: aaa topic: type: string example: topic-abc.* description: A regex for matching the topic(s) that this ACL should apply to. permission: type: string enum: - admin - consume - produce - produceconsume example: consume description: Permission set applied to the ACL. 'consume' allows for messages to be consumed from the topic. 'produce' allows for messages to be published to the topic. 'produceconsume' allows for both 'consume' and 'produce' permission. 'admin' allows for 'produceconsume' as well as any operations to administer the topic (delete, update). required: - topic - permission description: ACLs (Access Control Lists) specifying permissions on topics within a Kafka cluster. events_logs: type: object properties: id: type: string description: ID of the particular event. example: pe8u2huh cluster_name: type: string description: The name of cluster. example: sample_cluster event_type: type: string enum: - cluster_maintenance_perform - cluster_master_promotion - cluster_create - cluster_update - cluster_delete - cluster_poweron - cluster_poweroff description: Type of the event. example: cluster_create create_time: type: string description: The time of the generation of a event. example: '2020-10-29T15:57:38Z' redis_advanced_config: type: object properties: redis_maxmemory_policy: $ref: '#/components/schemas/eviction_policy_model' redis_pubsub_client_output_buffer_limit: description: Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan. type: integer minimum: 32 maximum: 512 example: 64 redis_number_of_databases: type: integer minimum: 1 maximum: 128 description: Set number of redis databases. Changing this will cause a restart of redis service. example: 16 redis_io_threads: description: Redis IO thread count type: integer minimum: 1 maximum: 32 example: 1 redis_lfu_log_factor: description: Counter logarithm factor for volatile-lfu and allkeys-lfu maxmemory-policies type: integer minimum: 0 maximum: 100 default: 10 example: 10 redis_lfu_decay_time: description: LFU maxmemory-policy counter decay time in minutes type: integer minimum: 1 maximum: 120 default: 1 example: 1 redis_ssl: description: 'Require SSL to access Redis. - When enabled, Redis accepts only SSL connections on port `25061`. - When disabled, port `25060` is opened for non-SSL connections, while port `25061` remains available for SSL connections. ' type: boolean default: true example: true redis_timeout: description: Redis idle connection timeout in seconds type: integer minimum: 0 maximum: 31536000 default: 300 example: 300 redis_notify_keyspace_events: description: 'Set notify-keyspace-events option. Requires at least `K` or `E` and accepts any combination of the following options. Setting the parameter to `""` disables notifications. - `K` — Keyspace events - `E` — Keyevent events - `g` — Generic commands (e.g. `DEL`, `EXPIRE`, `RENAME`, ...) - `$` — String commands - `l` — List commands - `s` — Set commands - `h` — Hash commands - `z` — Sorted set commands - `t` — Stream commands - `d` — Module key type events - `x` — Expired events - `e` — Evicted events - `m` — Key miss events - `n` — New key events - `A` — Alias for `"g$lshztxed"`' type: string pattern: ^[KEg\$lshzxeA]*$ default: '' maxLength: 32 example: K redis_persistence: type: string enum: - 'off' - rdb description: Creates an RDB dump of the database every 10 minutes that can be used to recover data after a node crash. The database does not create the dump if no keys have changed since the last dump. When set to `off`, the database cannot fork services, and data can be lost if a service is restarted or powered off. DigitalOcean Managed Caching databases do not support the Append Only File (AOF) persistence method. example: rdb redis_acl_channels_default: type: string enum: - allchannels - resetchannels description: Determines default pub/sub channels' ACL for new users if ACL is not supplied. When this option is not defined, all_channels is assumed to keep backward compatibility. This option doesn't affect Redis configuration acl-pubsub-default. example: allchannels database: type: object properties: name: type: string example: alpha description: The name of the database. required: - name opensearch_connection: type: object properties: uri: type: string description: This is provided as a convenience and should be able to be constructed by the other attributes. example: https://doadmin:wv78n3zpz42xezdk@backend-do-user-19081923-0.db.ondigitalocean.com:25060 readOnly: true host: type: string description: The FQDN pointing to the opensearch cluster's current primary node. example: backend-do-user-19081923-0.db.ondigitalocean.com readOnly: true port: type: integer description: The port on which the opensearch dashboard is listening. example: 25060 readOnly: true user: type: string description: The default user for the opensearch dashboard. example: doadmin readOnly: true password: type: string description: The randomly generated password for the default user. example: wv78n3zpz42xezdk readOnly: true ssl: type: boolean description: A boolean value indicating if the connection should be made over SSL. example: true readOnly: true database_service_endpoint: type: object properties: host: type: string description: A FQDN pointing to the database cluster's node(s). example: backend-do-user-19081923-0.db.ondigitalocean.com readOnly: true port: type: integer description: The port on which a service is listening. example: 9273 readOnly: true connection_pool_update: type: object properties: mode: type: string description: The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement. example: transaction size: type: integer format: int32 description: The desired size of the PGBouncer connection pool. The maximum allowed size is determined by the size of the cluster's primary node. 25 backend server connections are allowed for every 1GB of RAM. Three are reserved for maintenance. For example, a primary node with 1 GB of RAM allows for a maximum of 22 backend server connections while one with 4 GB would allow for 97. Note that these are shared across all connection pools in a cluster. example: 10 db: type: string description: The database for use with the connection pool. example: defaultdb user: type: string description: The name of the user for use with the connection pool. When excluded, all sessions connect to the database as the inbound user. example: doadmin required: - mode - size - db eviction_policy_model: type: string enum: - noeviction - allkeys_lru - allkeys_random - volatile_lru - volatile_random - volatile_ttl description: 'A string specifying the desired eviction policy for the Redis cluster. - `noeviction`: Don''t evict any data, returns error when memory limit is reached. - `allkeys_lru:` Evict any key, least recently used (LRU) first. - `allkeys_random`: Evict keys in a random order. - `volatile_lru`: Evict keys with expiration only, least recently used (LRU) first. - `volatile_random`: Evict keys with expiration only in a random order. - `volatile_ttl`: Evict keys with expiration only, shortest time-to-live (TTL) first.' example: allkeys_lru ca: type: object properties: certificate: type: string example: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVRVENDQXFtZ0F3SUJBZ0lVRUZZWTdBWFZQS0Raam9jb1lpMk00Y0dvcU0wd0RRWUpLb1pJaHZjTkFRRU0KQlFBd09qRTRNRFlHQTFVRUF3d3ZOek0zT1RaaE1XRXRaamhrTUMwME9HSmpMV0V4Wm1NdFpqbGhNVFZsWXprdwpORGhsSUZCeWIycGxZM1FnUTBFd0hoY05NakF3TnpFM01UVTFNREEyV2hjTk16QXdOekUxTVRVMU1EQTJXakE2Ck1UZ3dOZ1lEVlFRRERDODNNemM1Tm1FeFlTMW1PR1F3TFRRNFltTXRZVEZtWXkxbU9XRXhOV1ZqT1RBME9HVWcKVUhKdmFtVmpkQ0JEUVRDQ0FhSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnR1BBRENDQVlvQ2dnR0JBTVdScXhycwpMZnpNdHZyUmxKVEw4MldYMVBLZkhKbitvYjNYcmVBY3FZd1dBUUp2Q3IycmhxSXZieVZzMGlaU0NzOHI4c3RGClljQ0R1bkxJNmUwTy9laERZYTBIT2RrMkFFRzE1ckVOVmNha2NSczcyQWlHVHNrdkNXS2VkUjFTUWswVWt0WCsKQUg4S1ExS3F5bzNtZ2Y2cVV1WUpzc3JNTXFselk3YTN1RVpEb2ZqTjN5Q3MvM21pTVJKcVcyNm1JV0IrUUlEbAo5YzdLRVF5MTZvdCtjeHVnd0lLMm9oZHMzaFY1bjBKMFVBM0I3QWRBdXY5aUl5L3JHaHlTNm5CNTdaWm9JZnAyCnFybXdOY0UrVjlIdXhQSGtRVjFOQjUwOFFudWZ4Z0E5VCtqU2VrdGVUbWFORkxqNjFXL3BtcndrTytOaWFXUTIKaGgzVXBKOEozY1BoNkErbHRnUmpSV2NEb2lsYVNwRVVpU09WemNNYVFvalZKYVJlNk9NbnZYc29NaSs3ZzdneApWcittQ0lUcGcvck9DaXpBWWQ2UFAxLzdYTjk1ZXNmU2tBQnM5c3hJakpjTUFqbDBYTEFzRmtGZVdyeHNIajlVCmJnaDNWYXdtcnpUeXhZT0RQcXV1cS9JcGlwc0RRT3Fpb2ZsUStkWEJJL3NUT0NNbVp6K0pNcG5HYXdJREFRQUIKb3o4d1BUQWRCZ05WSFE0RUZnUVVSekdDRlE3WEtUdHRDN3JzNS8ydFlQcExTZGN3RHdZRFZSMFRCQWd3QmdFQgovd0lCQURBTEJnTlZIUThFQkFNQ0FRWXdEUVlKS29aSWh2Y05BUUVNQlFBRGdnR0JBSWFKQ0dSVVNxUExtcmcvCmk3MW10b0NHUDdzeG1BVXVCek1oOEdrU25uaVdaZnZGMTRwSUtqTlkwbzVkWmpHKzZqK1VjalZtK0RIdGE1RjYKOWJPeEk5S0NFeEI1blBjRXpMWjNZYitNOTcrellxbm9zUm85S21DVFJBb2JrNTZ0WU1FS1h1aVJja2tkMm1yUQo4cGw2N2xxdThjM1V4c0dHZEZVT01wMkk3ZTNpdUdWVm5UR0ZWM3JQZUdaQ0J3WGVyUUQyY0F4UjkzS3BnWVZ2ClhUUzk5dnpSbm1HOHhhUm9EVy9FbEdXZ2xWd0Q5a1JrbXhUUkdoYTdDWVZCcjFQVWY2dVVFVjhmVFIxc1hFZnIKLytMR1JoSVVsSUhWT3l2Yzk3YnZYQURPbWF1MWZDVE5lWGtRdTNyZnZFSlBmaFlLeVIwT0V3eWVvdlhRNzl0LwpTV2ZGTjBreU1Pc1UrNVNIdHJKSEh1eWNWcU0yQlVVK083VjM1UnNwOU9MZGRZMFFVbTZldFpEVEhhSUhYYzRRCnl1Rm1OL1NhSFZtNE0wL3BTVlJQdVd6TmpxMnZyRllvSDRtbGhIZk95TUNJMjc2elE2aWhGNkdDSHlkOUJqajcKUm1UWGEyNHM3NWhmSi9YTDV2bnJSdEtpVHJlVHF6V21EOVhnUmNMQ0gyS1hJaVRtSWc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== description: base64 encoding of the certificate used to secure database connections readOnly: true required: - certificate kafka_topic_verbose: type: object properties: name: type: string description: The name of the Kafka topic. example: events state: type: string enum: - active - configuring - deleting - unknown example: active description: The state of the Kafka topic. replication_factor: type: integer example: 2 description: The number of nodes to replicate data across the cluster. partitions: type: array items: $ref: '#/components/schemas/kafka_topic_partition' config: $ref: '#/components/schemas/kafka_topic_config' database_layout_options: type: object properties: layouts: type: array readOnly: true description: An array of objects, each indicating the node sizes (otherwise referred to as slugs) that are available with various numbers of nodes in the database cluster. Each slugs denotes the node's identifier, CPU, and RAM (in that order). items: $ref: '#/components/schemas/database_layout_option' database_connection: type: object properties: uri: type: string description: A connection string in the format accepted by the `psql` command. This is provided as a convenience and should be able to be constructed by the other attributes. example: postgres://doadmin:wv78n3zpz42xezdk@backend-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require readOnly: true database: type: string description: The name of the default database. example: defaultdb readOnly: true host: type: string description: The FQDN pointing to the database cluster's current primary node. example: backend-do-user-19081923-0.db.ondigitalocean.com readOnly: true port: type: integer description: The port on which the database cluster is listening. example: 25060 readOnly: true user: type: string description: The default user for the database. example: doadmin readOnly: true password: type: string description: The randomly generated password for the default user. example: wv78n3zpz42xezdk readOnly: true ssl: type: boolean description: A boolean value indicating if the connection should be made over SSL. example: true readOnly: true database_metrics_credentials: type: object properties: credentials: $ref: '#/components/schemas/databases_basic_auth_credentials' logsink_base: type: object properties: sink_name: type: string description: The name of the Logsink example: prod-logsink sink_type: type: string enum: - rsyslog - elasticsearch - opensearch example: rsyslog sql_mode: type: object properties: sql_mode: type: string example: ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES description: A string specifying the configured SQL modes for the MySQL cluster. required: - sql_mode logsink_create: type: object allOf: - $ref: '#/components/schemas/logsink_base' - properties: config: anyOf: - $ref: '#/components/schemas/rsyslog_logsink' - $ref: '#/components/schemas/elasticsearch_logsink' - $ref: '#/components/schemas/opensearch_logsink' firewall_rule: type: object properties: uuid: type: string pattern: ^$|[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12} example: 79f26d28-ea8a-41f2-8ad8-8cfcdd020095 description: A unique ID for the firewall rule itself. cluster_uuid: type: string pattern: ^$|[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12} example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 readOnly: true description: A unique ID for the database cluster to which the rule is applied. type: type: string enum: - droplet - k8s - ip_addr - tag - app example: droplet description: The type of resource that the firewall rule allows to access the database cluster. value: type: string example: ff2a6c52-5a44-4b63-b99c-0e98e7a63d61 description: The ID of the specific resource, the name of a tag applied to a group of resources, or the IP address that the firewall rule allows to access the database cluster. created_at: type: string format: date-time example: '2019-01-11T18:37:36Z' description: A time value given in ISO8601 combined date and time format that represents when the firewall rule was created. readOnly: true required: - type - value kafka_topic_config: type: object properties: cleanup_policy: type: string enum: - delete - compact - compact_delete example: delete default: delete description: The cleanup_policy sets the retention policy to use on log segments. 'delete' will discard old segments when retention time/size limits are reached. 'compact' will enable log compaction, resulting in retention of the latest value for each key. compression_type: type: string enum: - producer - gzip - snappy - Iz4 - zstd - uncompressed example: producer default: producer description: The compression_type specifies the compression type of the topic. delete_retention_ms: type: integer example: 86400000 default: 86400000 description: The delete_retention_ms specifies how long (in ms) to retain delete tombstone markers for topics. file_delete_delay_ms: type: integer example: 60000 default: 60000 description: The file_delete_delay_ms specifies the time (in ms) to wait before deleting a file from the filesystem. flush_messages: type: integer example: 9223372036854776000 default: 9223372036854776000 description: The flush_messages specifies the number of messages to accumulate on a log partition before messages are flushed to disk. flush_ms: type: integer example: 9223372036854776000 default: 9223372036854776000 description: The flush_ms specifies the maximum time (in ms) that a message is kept in memory before being flushed to disk. index_interval_bytes: type: integer example: 4096 default: 4096 description: The index_interval_bytes specifies the number of bytes between entries being added into te offset index. max_compaction_lag_ms: type: integer example: 9223372036854776000 default: 9223372036854776000 description: The max_compaction_lag_ms specifies the maximum amount of time (in ms) that a message will remain uncompacted. This is only applicable if the logs are have compaction enabled. max_message_bytes: type: integer example: 1048588 default: 1048588 description: The max_messages_bytes specifies the largest record batch size (in bytes) that can be sent to the server. This is calculated after compression if compression is enabled. message_down_conversion_enable: type: boolean example: true default: true description: The message_down_conversion_enable specifies whether down-conversion of message formats is enabled to satisfy consumer requests. When 'false', the broker will not perform conversion for consumers expecting older message formats. The broker will respond with an `UNSUPPORTED_VERSION` error for consume requests from these older clients. message_format_version: type: string example: 3.0-IV1 enum: - 0.8.0 - 0.8.1 - 0.8.2 - 0.9.0 - 0.10.0-IV0 - 0.10.0-IV1 - 0.10.1-IV0 - 0.10.1-IV1 - 0.10.1-IV2 - 0.10.2-IV0 - 0.11.0-IV0 - 0.11.0-IV1 - 0.11.0-IV2 - 1.0-IV0 - 1.1-IV0 - 2.0-IV0 - 2.0-IV1 - 2.1-IV0 - 2.1-IV1 - 2.1-IV2 - 2.2-IV0 - 2.2-IV1 - 2.3-IV0 - 2.3-IV1 - 2.4-IV0 - 2.4-IV1 - 2.5-IV0 - 2.6-IV0 - 2.7-IV0 - 2.7-IV1 - 2.7-IV2 - 2.8-IV0 - 2.8-IV1 - 3.0-IV0 - 3.0-IV1 - 3.1-IV0 - 3.2-IV0 - 3.3-IV0 - 3.3-IV1 - 3.3-IV2 - 3.3-IV3 default: 3.0-IV1 description: The message_format_version specifies the message format version used by the broker to append messages to the logs. The value of this setting is assumed to be 3.0-IV1 if the broker protocol version is 3.0 or higher. By setting a particular message format version, all existing messages on disk must be smaller or equal to the specified version. message_timestamp_type: type: string example: create_time enum: - create_time - log_append_time default: create_time description: The message_timestamp_type specifies whether to use the message create time or log append time as the timestamp on a message. min_cleanable_dirty_ratio: type: number format: float default: 0.5 example: 0.5 minimum: 0 maximum: 1 description: The min_cleanable_dirty_ratio specifies the frequency of log compaction (if enabled) in relation to duplicates present in the logs. For example, at 0.5, at most 50% of the log could be duplicates before compaction would begin. min_compaction_lag_ms: type: integer example: 0 default: 0 description: The min_compaction_lag_ms specifies the minimum time (in ms) that a message will remain uncompacted in the log. Only relevant if log compaction is enabled. min_insync_replicas: type: integer example: 1 default: 1 minimum: 1 description: The min_insync_replicas specifies the number of replicas that must ACK a write for the write to be considered successful. preallocate: type: boolean example: false default: false description: The preallocate specifies whether a file should be preallocated on disk when creating a new log segment. retention_bytes: type: integer example: 1000000 default: -1 description: The retention_bytes specifies the maximum size of the log (in bytes) before deleting messages. -1 indicates that there is no limit. retention_ms: type: integer example: 604800000 default: 604800000 description: The retention_ms specifies the maximum amount of time (in ms) to keep a message before deleting it. segment_bytes: type: integer example: 209715200 default: 209715200 minimum: 14 description: The segment_bytes specifies the maximum size of a single log file (in bytes). segment_jitter_ms: type: integer example: 0 default: 0 description: The segment_jitter_ms specifies the maximum random jitter subtracted from the scheduled segment roll time to avoid thundering herds of segment rolling. segment_ms: type: integer example: 604800000 default: 604800000 minimum: 1 description: The segment_ms specifies the period of time after which the log will be forced to roll if the segment file isn't full. This ensures that retention can delete or compact old data. source_database: type: object properties: source: type: object properties: host: type: string description: The FQDN pointing to the database cluster's current primary node. example: backend-do-user-19081923-0.db.ondigitalocean.com port: type: integer description: The port on which the database cluster is listening. example: 25060 dbname: type: string description: The name of the default database. example: defaultdb username: type: string description: The default user for the database. example: doadmin password: type: string description: The randomly generated password for the default user. example: wv78n3zpz42xezdk disable_ssl: type: boolean description: Enables SSL encryption when connecting to the source database. example: false ignore_dbs: type: array items: type: string example: - db0 - db1 default: [] description: List of databases that should be ignored during migration. connection_pools: type: object properties: pools: type: array readOnly: true description: An array of connection pool objects. items: $ref: '#/components/schemas/connection_pool' opensearch_logsink: type: object properties: url: type: string example: https://user:passwd@192.168.0.1:9200 description: Opensearch connection URL index_prefix: type: string example: opensearch-logs description: Opensearch index prefix index_days_max: type: integer default: 7 example: 5 maximum: 10000 minimum: 1 description: Maximum number of days of logs to keep timeout: type: number format: float example: 10 default: 10 minimum: 10 maximum: 120 description: Opensearch request timeout limit ca: type: string example: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n' description: PEM encoded CA certificate required: - url - index_prefix database_config: type: object properties: config: anyOf: - $ref: '#/components/schemas/mysql_advanced_config' - $ref: '#/components/schemas/postgres_advanced_config' - $ref: '#/components/schemas/redis_advanced_config' - $ref: '#/components/schemas/mongo_advanced_config' - $ref: '#/components/schemas/kafka_advanced_config' - $ref: '#/components/schemas/opensearch_advanced_config' opensearch_index: type: object allOf: - $ref: '#/components/schemas/opensearch_index_base' - properties: status: type: string enum: - unknown - open - close - none example: open description: The status of the OpenSearch index. health: type: string enum: - unknown - green - yellow - red - red* example: green description: The health of the OpenSearch index. kafka_topic_base: type: object properties: name: type: string description: The name of the Kafka topic. example: events replication_factor: type: integer example: 2 description: The number of nodes to replicate data across the cluster. partition_count: type: integer example: 3 description: The number of partitions available for the topic. On update, this value can only be increased. kafka_topic_partition: type: object properties: size: type: integer description: Size of the topic partition in bytes. example: 4096 id: type: integer description: An identifier for the partition. example: 1 in_sync_replicas: type: integer description: The number of nodes that are in-sync (have the latest data) for the given partition example: 3 earliest_offset: type: integer description: The earliest consumer offset amongst consumer groups. example: 0 consumer_groups: type: array nullable: true items: type: object properties: group_name: type: string description: Name of the consumer group. example: consumer offset: type: integer description: The current offset of the consumer group. example: 0 mongo_advanced_config: type: object properties: default_read_concern: description: Specifies the default consistency behavior of reads from the database. Data that is returned from the query with may or may not have been acknowledged by all nodes in the replicaset depending on this value. Learn more [here](https://www.mongodb.com/docs/manual/reference/read-concern/). type: string enum: - local - available - majority default: local example: local default_write_concern: description: Describes the level of acknowledgment requested from MongoDB for write operations clusters. This field can set to either `majority` or a number `0...n` which will describe the number of nodes that must acknowledge the write operation before it is fully accepted. Setting to `0` will request no acknowledgement of the write operation. Learn more [here](https://www.mongodb.com/docs/manual/reference/write-concern/). type: string default: majority example: majority transaction_lifetime_limit_seconds: description: Specifies the lifetime of multi-document transactions. Transactions that exceed this limit are considered expired and will be aborted by a periodic cleanup process. The cleanup process runs every `transactionLifetimeLimitSeconds/2 seconds` or at least once every 60 seconds. *Changing this parameter will lead to a restart of the MongoDB service.* Learn more [here](https://www.mongodb.com/docs/manual/reference/parameters/#mongodb-parameter-param.transactionLifetimeLimitSeconds). type: integer minimum: 1 default: 60 example: 100 slow_op_threshold_ms: description: Operations that run for longer than this threshold are considered slow which are then recorded to the diagnostic logs. Higher log levels (verbosity) will record all operations regardless of this threshold on the primary node. *Changing this parameter will lead to a restart of the MongoDB service.* Learn more [here](https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-operationProfiling.slowOpThresholdMs). type: integer minimum: 0 default: 100 example: 200 verbosity: description: The log message verbosity level. The verbosity level determines the amount of Informational and Debug messages MongoDB outputs. 0 includes informational messages while 1...5 increases the level to include debug messages. *Changing this parameter will lead to a restart of the MongoDB service.* Learn more [here](https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-systemLog.verbosity). type: integer minimum: 0 maximum: 5 default: 0 example: 3 pgbouncer_advanced_config: type: object description: PGBouncer connection pooling settings properties: server_reset_query_always: description: Run server_reset_query (DISCARD ALL) in all pooling modes. type: boolean example: false ignore_startup_parameters: description: List of parameters to ignore when given in startup packet. type: array example: - extra_float_digits - search_path items: description: Enum of parameters to ignore when given in startup packet. type: string enum: - extra_float_digits - search_path maxItems: 32 min_pool_size: description: If current server connections are below this number, adds more. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size. type: integer minimum: 0 maximum: 10000 example: 1 server_lifetime: description: The pooler closes any unused server connection that has been connected longer than this amount of seconds. type: integer minimum: 60 maximum: 86400 example: 3600 server_idle_timeout: description: 'Drops server connections if they have been idle more than this many seconds. If 0, timeout is disabled. ' type: integer minimum: 0 maximum: 86400 example: 600 autodb_pool_size: description: If non-zero, automatically creates a pool of that size per user when a pool doesn't exist. type: integer minimum: 0 maximum: 10000 example: 1 autodb_pool_mode: enum: - session - transaction - statement example: session description: PGBouncer pool mode type: string autodb_max_db_connections: description: Only allows a maximum this many server connections per database (regardless of user). If 0, allows unlimited connections. type: integer minimum: 0 maximum: 2147483647 example: 1 autodb_idle_timeout: description: If the automatically-created database pools have been unused this many seconds, they are freed. If 0, timeout is disabled. type: integer minimum: 0 maximum: 86400 example: 3600 database_version_availability: type: object properties: end_of_life: type: string example: '2023-11-09T00:00:00Z' nullable: true description: A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline. end_of_availability: type: string example: '2023-05-09T00:00:00Z' nullable: true description: A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline. version: type: string example: '8' description: The engine version. mysql_settings: type: object properties: auth_plugin: type: string enum: - mysql_native_password - caching_sha2_password example: mysql_native_password description: 'A string specifying the authentication method to be used for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password`. If excluded when creating a new user, the default for the version of MySQL in use will be used. As of MySQL 8.0, the default is `caching_sha2_password`. ' required: - auth_plugin kafka_topic: type: object allOf: - $ref: '#/components/schemas/kafka_topic_base' - properties: state: type: string enum: - active - configuring - deleting - unknown example: active description: The state of the Kafka topic. opensearch_advanced_config: type: object properties: http_max_content_length_bytes: description: Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes. type: integer example: 100000000 minimum: 1 maximum: 2147483647 default: 100000000 http_max_header_size_bytes: description: Maximum size of allowed headers, in bytes. type: integer example: 8192 minimum: 1024 maximum: 262144 default: 8192 http_max_initial_line_length_bytes: description: Maximum length of an HTTP URL, in bytes. type: integer example: 4096 minimum: 1024 maximum: 65536 default: 4096 indices_query_bool_max_clause_count: description: Maximum number of clauses Lucene BooleanQuery can have. Only increase it if necessary, as it may cause performance issues. type: integer example: 1024 minimum: 64 maximum: 4096 default: 1024 indices_fielddata_cache_size_percentage: description: Maximum amount of heap memory used for field data cache, expressed as a percentage. Decreasing the value too much will increase overhead of loading field data. Increasing the value too much will decrease amount of heap available for other operations. type: integer example: 3 minimum: 3 maximum: 100 indices_memory_index_buffer_size_percentage: description: Total amount of heap used for indexing buffer before writing segments to disk, expressed as a percentage. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance. type: integer example: 10 minimum: 3 maximum: 40 default: 10 indices_memory_min_index_buffer_size_mb: description: Minimum amount of heap used for indexing buffer before writing segments to disk, in mb. Works in conjunction with indices_memory_index_buffer_size_percentage, each being enforced. type: integer example: 48 minimum: 3 maximum: 2048 default: 48 indices_memory_max_index_buffer_size_mb: description: Maximum amount of heap used for indexing buffer before writing segments to disk, in mb. Works in conjunction with indices_memory_index_buffer_size_percentage, each being enforced. The default is unbounded. type: integer example: 48 minimum: 3 maximum: 2048 indices_queries_cache_size_percentage: description: Maximum amount of heap used for query cache. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other functionality. type: integer example: 10 minimum: 3 maximum: 40 default: 10 indices_recovery_max_mb_per_sec: description: Limits total inbound and outbound recovery traffic for each node, expressed in mb per second. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). type: integer example: 40 minimum: 40 maximum: 400 default: 40 indices_recovery_max_concurrent_file_chunks: description: Maximum number of file chunks sent in parallel for each recovery. type: integer example: 2 minimum: 2 maximum: 5 default: 2 thread_pool_search_size: description: Number of workers in the search operation thread pool. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. type: integer example: 1 minimum: 1 maximum: 128 thread_pool_search_throttled_size: description: Number of workers in the search throttled operation thread pool. This pool is used for searching frozen indices. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. type: integer example: 1 minimum: 1 maximum: 128 thread_pool_get_size: description: Number of workers in the get operation thread pool. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. type: integer example: 1 minimum: 1 maximum: 128 thread_pool_analyze_size: description: Number of workers in the analyze operation thread pool. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. type: integer example: 1 minimum: 1 maximum: 128 thread_pool_write_size: description: Number of workers in the write operation thread pool. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. type: integer example: 1 minimum: 1 maximum: 128 thread_pool_force_merge_size: description: Number of workers in the force merge operation thread pool. This pool is used for forcing a merge between shards of one or more indices. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. type: integer example: 1 minimum: 1 maximum: 128 thread_pool_search_queue_size: description: Size of queue for operations in the search thread pool. type: integer example: 10 minimum: 10 maximum: 2000 thread_pool_search_throttled_queue_size: description: Size of queue for operations in the search throttled thread pool. type: integer example: 10 minimum: 10 maximum: 2000 thread_pool_get_queue_size: description: Size of queue for operations in the get thread pool. type: integer example: 10 minimum: 10 maximum: 2000 thread_pool_analyze_queue_size: description: Size of queue for operations in the analyze thread pool. type: integer example: 10 minimum: 10 maximum: 2000 thread_pool_write_queue_size: description: Size of queue for operations in the write thread pool. type: integer example: 10 minimum: 10 maximum: 2000 ism_enabled: description: Specifies whether ISM is enabled or not. type: boolean example: true default: true ism_history_enabled: description: Specifies whether audit history is enabled or not. The logs from ISM are automatically indexed to a logs document. type: boolean example: true default: true ism_history_max_age_hours: description: Maximum age before rolling over the audit history index, in hours. type: integer example: 24 minimum: 1 maximum: 2147483647 default: 24 ism_history_max_docs: description: Maximum number of documents before rolling over the audit history index. type: integer example: 2500000 minimum: 1 maximum: 9223372036854776000 default: 2500000 ism_history_rollover_check_period_hours: description: The time between rollover checks for the audit history index, in hours. type: integer example: 8 minimum: 1 maximum: 2147483647 default: 8 ism_history_rollover_retention_period_days: description: Length of time long audit history indices are kept, in days. type: integer example: 30 minimum: 1 maximum: 2147483647 default: 30 search_max_buckets: description: Maximum number of aggregation buckets allowed in a single response. type: integer example: 10000 minimum: 1 maximum: 1000000 default: 10000 action_auto_create_index_enabled: description: Specifices whether to allow automatic creation of indices. type: boolean example: true default: true enable_security_audit: description: Specifies whether to allow security audit logging. type: boolean example: false default: false action_destructive_requires_name: description: Specifies whether to require explicit index names when deleting indices. type: boolean example: false cluster_max_shards_per_node: description: Maximum number of shards allowed per data node. type: integer example: 100 minimum: 100 maximum: 10000 override_main_response_version: description: Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. type: boolean example: false default: false script_max_compilations_rate: description: Limits the number of inline script compilations within a period of time. Default is use-context type: string example: 75/5m default: use-context cluster_routing_allocation_node_concurrent_recoveries: description: Maximum concurrent incoming/outgoing shard recoveries (normally replicas) are allowed to happen per node . type: integer example: 2 minimum: 2 maximum: 16 default: 2 reindex_remote_whitelist: description: Allowlist of remote IP addresses for reindexing. Changing this value will cause all OpenSearch instances to restart. type: array items: type: string example: - 255.255.223.233:9200 - 222.33.222.222:6300 plugins_alerting_filter_by_backend_roles_enabled: description: Enable or disable filtering of alerting by backend roles. type: boolean example: false default: false responses: database_replica: description: A JSON object with a key of `replica`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: type: object properties: replica: $ref: '#/components/schemas/database_replica' example: replica: name: read-nyc3-01 connection: uri: '' database: defaultdb host: read-nyc3-01-do-user-19081923-0.db.ondigitalocean.com port: 25060 user: doadmin password: wv78n3zpz42xezdk ssl: true private_connection: uri: postgres://doadmin:wv78n3zpz42xezdk@private-read-nyc3-01-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require database: '' host: private-read-nyc3-01-do-user-19081923-0.db.ondigitalocean.com port: 25060 user: doadmin password: wv78n3zpz42xezdk ssl: true region: nyc3 status: online created_at: '2019-01-11T18:37:36Z' unauthorized: description: Unauthorized headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/error' example: id: unauthorized message: Unable to authenticate you. events_logs: description: A JSON object with a key of `events`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: events: type: array items: $ref: '#/components/schemas/events_logs' example: events: - id: pe8u2huh cluster_name: customer-events event_type: cluster_create create_time: '2020-10-29T15:57:38Z' - id: pe8ufefuh cluster_name: customer-events event_type: cluster_update create_time: '2023-10-30T15:57:38Z' database_replicas: description: A JSON object with a key of `replicas`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: replicas: type: array items: $ref: '#/components/schemas/database_replica' example: replicas: - name: read-nyc3-01 connection: uri: '' database: defaultdb host: read-nyc3-01-do-user-19081923-0.db.ondigitalocean.com port: 25060 user: doadmin password: wv78n3zpz42xezdk ssl: true private_connection: uri: postgres://doadmin:wv78n3zpz42xezdk@private-read-nyc3-01-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require database: '' host: private-read-nyc3-01-do-user-19081923-0.db.ondigitalocean.com port: 25060 user: doadmin password: wv78n3zpz42xezdk ssl: true region: nyc3 status: online created_at: '2019-01-11T18:37:36Z' opensearch_indexes: description: A JSON object with a key of `indexes`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: indexes: type: array items: $ref: '#/components/schemas/opensearch_index' example: indexes: - index_name: sample-data number_of_shards: 2 number_of_replicas: 3 size: 208 created_time: '2021-01-01T00:00:00Z' status: open health: green - index_name: logs-* number_of_shards: 2 number_of_replicas: 3 size: 208 created_time: '2021-01-01T00:00:00Z' status: open health: green database_metrics_auth: description: A JSON object with a key of `credentials`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: credentials: $ref: '#/components/schemas/database_metrics_credentials' example: credentials: basic_auth_username: username basic_auth_password: password kafka_topics: description: A JSON object with a key of `topics`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: topics: type: array items: $ref: '#/components/schemas/kafka_topic' example: topics: - name: customer-events state: active replication_factor: 2 partition_count: 3 - name: engineering-events state: configuring replication_factor: 2 partition_count: 10 users: description: A JSON object with a key of `users`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: users: type: array items: $ref: '#/components/schemas/database_user' example: users: - name: app-01 role: normal password: jge5lfxtzhx42iff - name: doadmin role: primary password: wv78n3zpz42xezd database_config: description: A JSON object with a key of `config`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: type: object properties: config: anyOf: - $ref: '#/components/schemas/mysql_advanced_config' - $ref: '#/components/schemas/postgres_advanced_config' - $ref: '#/components/schemas/redis_advanced_config' - $ref: '#/components/schemas/kafka_advanced_config' - $ref: '#/components/schemas/opensearch_advanced_config' - $ref: '#/components/schemas/mongo_advanced_config' required: - config example: config: sql_mode: ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES sql_require_primary_key: true logsinks: description: A JSON object with a key of `sinks`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: sinks: type: array items: allOf: - $ref: '#/components/schemas/logsink_verbose' required: - sink_id - sink_name - sink_type - config example: sinks: - sink_id: 799990b6-d551-454b-9ffe-b8618e9d6272 sink_name: logs-sink-1 sink_type: rsyslog config: server: 192.168.0.1 port: 514 tls: false format: rfc5424 - sink_id: d6e95157-5f58-48d0-9023-8cfb409d102a sink_name: logs-sink-2 sink_type: rsyslog config: server: 192.168.10.1 port: 514 tls: false format: rfc3164 ca: description: A JSON object with a key of `ca`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: type: object properties: ca: $ref: '#/components/schemas/ca' required: - ca example: ca: certificate: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVRVENDQXFtZ0F3SUJBZ0lVRUZZWTdBWFZQS0Raam9jb1lpMk00Y0dvcU0wd0RRWUpLb1pJaHZjTkFRRU0KQlFBd09qRTRNRFlHQTFVRUF3d3ZOek0zT1RaaE1XRXRaamhrTUMwME9HSmpMV0V4Wm1NdFpqbGhNVFZsWXprdwpORGhsSUZCeWIycGxZM1FnUTBFd0hoY05NakF3TnpFM01UVTFNREEyV2hjTk16QXdOekUxTVRVMU1EQTJXakE2Ck1UZ3dOZ1lEVlFRRERDODNNemM1Tm1FeFlTMW1PR1F3TFRRNFltTXRZVEZtWXkxbU9XRXhOV1ZqT1RBME9HVWcKVUhKdmFtVmpkQ0JEUVRDQ0FhSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnR1BBRENDQVlvQ2dnR0JBTVdScXhycwpMZnpNdHZyUmxKVEw4MldYMVBLZkhKbitvYjNYcmVBY3FZd1dBUUp2Q3IycmhxSXZieVZzMGlaU0NzOHI4c3RGClljQ0R1bkxJNmUwTy9laERZYTBIT2RrMkFFRzE1ckVOVmNha2NSczcyQWlHVHNrdkNXS2VkUjFTUWswVWt0WCsKQUg4S1ExS3F5bzNtZ2Y2cVV1WUpzc3JNTXFselk3YTN1RVpEb2ZqTjN5Q3MvM21pTVJKcVcyNm1JV0IrUUlEbAo5YzdLRVF5MTZvdCtjeHVnd0lLMm9oZHMzaFY1bjBKMFVBM0I3QWRBdXY5aUl5L3JHaHlTNm5CNTdaWm9JZnAyCnFybXdOY0UrVjlIdXhQSGtRVjFOQjUwOFFudWZ4Z0E5VCtqU2VrdGVUbWFORkxqNjFXL3BtcndrTytOaWFXUTIKaGgzVXBKOEozY1BoNkErbHRnUmpSV2NEb2lsYVNwRVVpU09WemNNYVFvalZKYVJlNk9NbnZYc29NaSs3ZzdneApWcittQ0lUcGcvck9DaXpBWWQ2UFAxLzdYTjk1ZXNmU2tBQnM5c3hJakpjTUFqbDBYTEFzRmtGZVdyeHNIajlVCmJnaDNWYXdtcnpUeXhZT0RQcXV1cS9JcGlwc0RRT3Fpb2ZsUStkWEJJL3NUT0NNbVp6K0pNcG5HYXdJREFRQUIKb3o4d1BUQWRCZ05WSFE0RUZnUVVSekdDRlE3WEtUdHRDN3JzNS8ydFlQcExTZGN3RHdZRFZSMFRCQWd3QmdFQgovd0lCQURBTEJnTlZIUThFQkFNQ0FRWXdEUVlKS29aSWh2Y05BUUVNQlFBRGdnR0JBSWFKQ0dSVVNxUExtcmcvCmk3MW10b0NHUDdzeG1BVXVCek1oOEdrU25uaVdaZnZGMTRwSUtqTlkwbzVkWmpHKzZqK1VjalZtK0RIdGE1RjYKOWJPeEk5S0NFeEI1blBjRXpMWjNZYitNOTcrellxbm9zUm85S21DVFJBb2JrNTZ0WU1FS1h1aVJja2tkMm1yUQo4cGw2N2xxdThjM1V4c0dHZEZVT01wMkk3ZTNpdUdWVm5UR0ZWM3JQZUdaQ0J3WGVyUUQyY0F4UjkzS3BnWVZ2ClhUUzk5dnpSbm1HOHhhUm9EVy9FbEdXZ2xWd0Q5a1JrbXhUUkdoYTdDWVZCcjFQVWY2dVVFVjhmVFIxc1hFZnIKLytMR1JoSVVsSUhWT3l2Yzk3YnZYQURPbWF1MWZDVE5lWGtRdTNyZnZFSlBmaFlLeVIwT0V3eWVvdlhRNzl0LwpTV2ZGTjBreU1Pc1UrNVNIdHJKSEh1eWNWcU0yQlVVK083VjM1UnNwOU9MZGRZMFFVbTZldFpEVEhhSUhYYzRRCnl1Rm1OL1NhSFZtNE0wL3BTVlJQdVd6TmpxMnZyRllvSDRtbGhIZk95TUNJMjc2elE2aWhGNkdDSHlkOUJqajcKUm1UWGEyNHM3NWhmSi9YTDV2bnJSdEtpVHJlVHF6V21EOVhnUmNMQ0gyS1hJaVRtSWc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== connection_pool: description: A JSON object with a key of `pool`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: type: object properties: pool: $ref: '#/components/schemas/connection_pool' required: - pool example: pool: user: doadmin name: backend-pool size: 10 db: defaultdb mode: transaction connection: uri: postgres://doadmin:wv78n3zpz42xezdk@backend-do-user-19081923-0.db.ondigitalocean.com:25061/backend-pool?sslmode=require database: backend-pool host: backend-do-user-19081923-0.db.ondigitalocean.com port: 25061 user: doadmin password: wv78n3zpz42xezdk ssl: true eviction_policy_response: description: A JSON string with a key of `eviction_policy`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: required: - eviction_policy properties: eviction_policy: $ref: '#/components/schemas/eviction_policy_model' database_clusters: description: A JSON object with a key of `databases`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: databases: type: array items: $ref: '#/components/schemas/database_cluster' example: databases: - id: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 name: backend engine: pg version: '10' connection: uri: postgres://doadmin:wv78n3zpz42xezdk@backend-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require database: '' host: backend-do-user-19081923-0.db.ondigitalocean.com port: 25060 user: doadmin password: wv78n3zpz42xezdk ssl: true private_connection: uri: postgres://doadmin:wv78n3zpz42xezdk@private-backend-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require database: '' host: private-backend-do-user-19081923-0.db.ondigitalocean.com port: 25060 user: doadmin password: wv78n3zpz42xezdk ssl: true users: - name: doadmin role: primary password: wv78n3zpz42xezdk db_names: - defaultdb num_nodes: 1 region: nyc3 status: online created_at: '2019-01-11T18:37:36Z' maintenance_window: day: saturday hour: 08:45:12 pending: true description: - Update TimescaleDB to version 1.2.1 - Upgrade to PostgreSQL 11.2 and 10.7 bugfix releases size: db-s-2vcpu-4gb tags: - production private_network_uuid: d455e75d-4858-4eec-8c95-da2f0a5f93a7 version_end_of_life: '2023-11-09T00:00:00Z' version_end_of_availability: '2023-05-09T00:00:00Z' storage_size_mib: 61440 sql_mode: description: A JSON string with a key of `sql_mode`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/sql_mode' example: sql_mode: ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES firewall_rules: description: A JSON object with a key of `rules`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: rules: type: array items: $ref: '#/components/schemas/firewall_rule' example: rules: - uuid: 79f26d28-ea8a-41f2-8ad8-8cfcdd020095 cluster_uuid: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 type: k8s value: ff2a6c52-5a44-4b63-b99c-0e98e7a63d61 created_at: '2019-11-14T20:30:28Z' - uuid: adfe81a8-0fa1-4e2d-973f-06aa5af19b44 cluster_uuid: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 type: ip_addr value: 192.168.1.1 created_at: '2019-11-14T20:30:28Z' - uuid: b9b42276-8295-4313-b40f-74173a7f46e6 cluster_uuid: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 type: droplet value: '163973392' created_at: '2019-11-14T20:30:28Z' - uuid: 718d23e0-13d7-4129-8a00-47fb72ee0deb cluster_uuid: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 type: tag value: backend created_at: '2019-11-14T20:30:28Z' online_migration: description: A JSON object. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/online_migration' example: id: 77b28fc8-19ff-11eb-8c9c-c68e24557488 status: running created_at: '2020-10-29T15:57:38Z' no_content: description: The action was successful and the response body is empty. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' databases: description: A JSON object with a key of `databases`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: dbs: type: array items: $ref: '#/components/schemas/database' example: dbs: - name: alpha - name: defaultdb database_cluster: description: A JSON object with a key of `database`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: type: object properties: database: $ref: '#/components/schemas/database_cluster' required: - database example: database: id: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 name: backend engine: pg version: '14' semantic_version: '14.5' connection: uri: postgres://doadmin:wv78n3zpz42xezdk@backend-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require database: '' host: backend-do-user-19081923-0.db.ondigitalocean.com port: 25060 user: doadmin password: wv78n3zpz42xezdk ssl: true private_connection: uri: postgres://doadmin:wv78n3zpz42xezdk@private-backend-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require database: '' host: private-backend-do-user-19081923-0.db.ondigitalocean.com port: 25060 user: doadmin password: wv78n3zpz42xezdk ssl: true standby_connection: uri: postgres://doadmin:wv78n3zpz42xezdk@replica-backend-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require database: '' host: replica-backend-do-user-19081923-0.db.ondigitalocean.com port: 25060 user: doadmin password: wv78n3zpz42xezdk ssl: true standby_private_connection: uri: postgres://doadmin:wv78n3zpz42xezdk@private-replica-backend-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require database: '' host: private-replica-backend-do-user-19081923-0.db.ondigitalocean.com port: 25060 user: doadmin password: wv78n3zpz42xezdk ssl: true users: - name: doadmin role: primary password: wv78n3zpz42xezdk db_names: - defaultdb num_nodes: 2 region: nyc3 status: creating created_at: '2019-01-11T18:37:36Z' maintenance_window: day: saturday hour: 08:45:12 pending: true description: - Update TimescaleDB to version 1.2.1 - Upgrade to PostgreSQL 11.2 and 10.7 bugfix releases size: db-s-2vcpu-4gb tags: - production private_network_uuid: d455e75d-4858-4eec-8c95-da2f0a5f93a7 version_end_of_life: '2023-11-09T00:00:00Z' version_end_of_availability: '2023-05-09T00:00:00Z' storage_size_mib: 61440 database: description: A JSON object with a key of `db`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: type: object properties: db: $ref: '#/components/schemas/database' required: - db example: db: name: alpha database_backups: description: A JSON object with a key of `database_backups`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: type: object properties: backups: type: array items: $ref: '#/components/schemas/backup' required: - backups example: backups: - created_at: '2019-01-11T18:42:27Z' size_gigabytes: 0.03357696 - created_at: '2019-01-12T18:42:29Z' size_gigabytes: 0.03364864 logsink: description: A JSON object with a key of `sink`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: sink: allOf: - $ref: '#/components/schemas/logsink_verbose' required: - sink_id - sink_name - sink_type - config examples: Create an opensearch logsink: value: sink: sink_id: dfcc9f57d86bf58e321c2c6c31c7a971be244ac7 sink_name: logs-sink sink_type: opensearch config: url: https://user:passwd@192.168.0.1:25060 index_prefix: opensearch-logs index_days_max: 5 Create an elasticsearch logsink: value: sink: sink_id: dfcc9f57d86bf58e321c2c6c31c7a971be244ac7 sink_name: logs-sink sink_type: elasticsearch config: url: https://user:passwd@192.168.0.1:25060 index_prefix: elasticsearch-logs index_days_max: 5 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 accepted: description: The does not indicate the success or failure of any operation, just that the request has been accepted for processing. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' kafka_topic: description: A JSON object with a key of `topic`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: topic: $ref: '#/components/schemas/kafka_topic_verbose' example: topic: name: customer-events partitions: - size: 4096 id: 0 in_sync_replicas: 3 earliest_offset: 0 consumer_groups: - name: consumer-group-1 offset: 0 - name: consumer-group-2 offset: 1 - size: 4096 id: 1 in_sync_replicas: 3 earliest_offset: 0 consumer_groups: null replication_factor: 3 state: active config: cleanup_policy: delete compression_type: producer delete_retention_ms: 86400000 file_delete_delay_ms: 60000 flush_messages: 9223372036854776000 flush_ms: 9223372036854776000 index_interval_bytes: 4096 max_compaction_lag_ms: 9223372036854776000 max_message_bytes: 1048588 message_down_conversion_enable: true message_format_version: 3.0-IV1 message_timestamp_difference_max_ms: 9223372036854776000 message_timestamp_type: create_time min_cleanable_dirty_ratio: 0.5 min_compaction_lag_ms: 0 min_insync_replicas: 1 preallocate: false retention_bytes: -1 retention_ms: 604800000 segment_bytes: 209715200 segment_index_bytes: 10485760 segment_jitter_ms: 0 segment_ms: 604800000 options: description: A JSON string with a key of `options`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/options' example: options: kafka: regions: - ams3 - blr1 - fra1 - lon1 - nyc1 - nyc3 - sfo2 - sfo3 - sgp1 - syd1 - tor1 versions: - '3.6' - '3.7' layouts: - num_nodes: 3 sizes: - gd-2vcpu-8gb - gd-4vcpu-16gb - db-s-2vcpu-4gb - db-s-2vcpu-2gb - num_nodes: 6 sizes: - gd-2vcpu-8gb - gd-4vcpu-16gb - num_nodes: 9 sizes: - gd-2vcpu-8gb - gd-4vcpu-16gb - num_nodes: 15 sizes: - gd-2vcpu-8gb - gd-4vcpu-16gb mongodb: regions: - ams3 - blr1 - fra1 - lon1 - nyc1 - nyc3 - sfo2 - sfo3 - sgp1 - syd1 - tor1 versions: - '5.0' - '6.0' - '7.0' layouts: - num_nodes: 1 sizes: - db-s-1vcpu-1gb - db-s-1vcpu-2gb - db-s-2vcpu-4gb - db-s-4vcpu-8gb - db-s-6vcpu-16gb - db-s-8vcpu-32gb - db-s-16vcpu-64gb - gd-2vcpu-8gb - gd-4vcpu-16gb - gd-8vcpu-32gb - gd-16vcpu-64gb - gd-32vcpu-128gb - gd-40vcpu-160gb - so1_5-2vcpu-16gb - so1_5-4vcpu-32gb - so1_5-8vcpu-64gb - so1_5-16vcpu-128gb - so1_5-24vcpu-192gb - so1_5-32vcpu-256gb - num_nodes: 3 sizes: - db-s-1vcpu-1gb - db-s-1vcpu-2gb - db-s-2vcpu-4gb - db-s-4vcpu-8gb - db-s-6vcpu-16gb - db-s-8vcpu-32gb - db-s-16vcpu-64gb - gd-2vcpu-8gb - gd-4vcpu-16gb - gd-8vcpu-32gb - gd-16vcpu-64gb - gd-32vcpu-128gb - gd-40vcpu-160gb - so1_5-2vcpu-16gb - so1_5-4vcpu-32gb - so1_5-8vcpu-64gb - so1_5-16vcpu-128gb - so1_5-24vcpu-192gb - so1_5-32vcpu-256gb mysql: regions: - ams3 - blr1 - fra1 - lon1 - nyc1 - nyc3 - sfo2 - sfo3 - sgp1 - syd1 - tor1 versions: - '8' layouts: - num_nodes: 1 sizes: - db-s-1vcpu-1gb - db-s-1vcpu-2gb - db-s-2vcpu-4gb - db-s-4vcpu-8gb - db-s-6vcpu-16gb - gd-2vcpu-8gb - gd-4vcpu-16gb - gd-8vcpu-32gb - gd-16vcpu-64gb - gd-32vcpu-128gb - gd-40vcpu-160gb - so1_5-2vcpu-16gb - so1_5-4vcpu-32gb - so1_5-8vcpu-64gb - so1_5-16vcpu-128gb - so1_5-24vcpu-192gb - so1_5-32vcpu-256gb - db-intel-1vcpu-1gb - db-amd-1vcpu-1gb - db-intel-1vcpu-2gb - db-amd-1vcpu-2gb - db-amd-2vcpu-4gb - db-intel-2vcpu-4gb - db-amd-2vcpu-8gb - db-intel-2vcpu-8gb - db-intel-4vcpu-8gb - db-amd-4vcpu-8gb - db-amd-4vcpu-16gb - db-intel-4vcpu-16gb - db-intel-8vcpu-32gb - db-amd-8vcpu-32gb - db-intel-16vcpu-64gb - db-amd-16vcpu-64gb - num_nodes: 2 sizes: - db-s-1vcpu-2gb - db-s-2vcpu-4gb - db-s-4vcpu-8gb - db-s-6vcpu-16gb - gd-2vcpu-8gb - gd-4vcpu-16gb - gd-8vcpu-32gb - gd-16vcpu-64gb - gd-32vcpu-128gb - gd-40vcpu-160gb - so1_5-2vcpu-16gb - so1_5-4vcpu-32gb - so1_5-8vcpu-64gb - so1_5-16vcpu-128gb - so1_5-24vcpu-192gb - so1_5-32vcpu-256gb - db-intel-1vcpu-2gb - db-amd-1vcpu-2gb - db-amd-2vcpu-4gb - db-intel-2vcpu-4gb - db-intel-2vcpu-8gb - db-amd-2vcpu-8gb - db-intel-4vcpu-8gb - db-amd-4vcpu-8gb - db-intel-4vcpu-16gb - db-amd-4vcpu-16gb - db-amd-8vcpu-32gb - db-intel-8vcpu-32gb - db-amd-16vcpu-64gb - db-intel-16vcpu-64gb - num_nodes: 3 sizes: - db-s-1vcpu-2gb - db-s-2vcpu-4gb - db-s-4vcpu-8gb - db-s-6vcpu-16gb - gd-2vcpu-8gb - gd-4vcpu-16gb - gd-8vcpu-32gb - gd-16vcpu-64gb - gd-32vcpu-128gb - gd-40vcpu-160gb - so1_5-2vcpu-16gb - so1_5-4vcpu-32gb - so1_5-8vcpu-64gb - so1_5-16vcpu-128gb - so1_5-24vcpu-192gb - so1_5-32vcpu-256gb - db-intel-1vcpu-2gb - db-amd-1vcpu-2gb - db-amd-2vcpu-4gb - db-intel-2vcpu-4gb - db-intel-2vcpu-8gb - db-amd-2vcpu-8gb - db-intel-4vcpu-8gb - db-amd-4vcpu-8gb - db-intel-4vcpu-16gb - db-amd-4vcpu-16gb - db-amd-8vcpu-32gb - db-intel-8vcpu-32gb - db-amd-16vcpu-64gb - db-intel-16vcpu-64gb opensearch: regions: - ams3 - blr1 - fra1 - lon1 - nyc1 - nyc3 - sfo2 - sfo3 - sgp1 - syd1 - tor1 versions: - '1' - '2' layouts: - num_nodes: 1 sizes: - db-s-1vcpu-2gb - db-s-2vcpu-4gb - gd-2vcpu-8gb - m3-2vcpu-16gb - db-s-4vcpu-8gb - gd-4vcpu-16gb - m3-4vcpu-32gb - m3-8vcpu-64gb - num_nodes: 3 sizes: - db-s-2vcpu-4gb - gd-2vcpu-8gb - m3-2vcpu-16gb - db-s-4vcpu-8gb - gd-4vcpu-16gb - m3-4vcpu-32gb - m3-8vcpu-64gb - num_nodes: 6 sizes: - gd-2vcpu-8gb - m3-2vcpu-16gb - gd-4vcpu-16gb - m3-4vcpu-32gb - m3-8vcpu-64gb - num_nodes: 9 sizes: - gd-2vcpu-8gb - m3-2vcpu-16gb - gd-4vcpu-16gb - m3-4vcpu-32gb - m3-8vcpu-64gb - num_nodes: 15 sizes: - gd-2vcpu-8gb - m3-2vcpu-16gb - gd-4vcpu-16gb - m3-4vcpu-32gb - m3-8vcpu-64gb pg: regions: - ams3 - blr1 - fra1 - lon1 - nyc1 - nyc3 - sfo2 - sfo3 - sgp1 - syd1 - tor1 versions: - '13' - '14' - '15' - '16' layouts: - num_nodes: 1 sizes: - db-s-1vcpu-1gb - db-s-1vcpu-2gb - db-s-2vcpu-4gb - db-s-4vcpu-8gb - db-s-6vcpu-16gb - gd-2vcpu-8gb - gd-4vcpu-16gb - gd-8vcpu-32gb - gd-16vcpu-64gb - gd-32vcpu-128gb - gd-40vcpu-160gb - so1_5-2vcpu-16gb - so1_5-4vcpu-32gb - so1_5-8vcpu-64gb - so1_5-16vcpu-128gb - so1_5-24vcpu-192gb - so1_5-32vcpu-256gb - db-intel-1vcpu-1gb - db-amd-1vcpu-1gb - db-intel-1vcpu-2gb - db-amd-1vcpu-2gb - db-amd-2vcpu-4gb - db-intel-2vcpu-4gb - db-amd-2vcpu-8gb - db-intel-2vcpu-8gb - db-intel-4vcpu-8gb - db-amd-4vcpu-8gb - db-amd-4vcpu-16gb - db-intel-4vcpu-16gb - db-intel-8vcpu-32gb - db-amd-8vcpu-32gb - db-intel-16vcpu-64gb - db-amd-16vcpu-64gb - num_nodes: 2 sizes: - db-s-1vcpu-2gb - db-s-2vcpu-4gb - db-s-4vcpu-8gb - db-s-6vcpu-16gb - gd-2vcpu-8gb - gd-4vcpu-16gb - gd-8vcpu-32gb - gd-16vcpu-64gb - gd-32vcpu-128gb - gd-40vcpu-160gb - so1_5-2vcpu-16gb - so1_5-4vcpu-32gb - so1_5-8vcpu-64gb - so1_5-16vcpu-128gb - so1_5-24vcpu-192gb - so1_5-32vcpu-256gb - db-intel-1vcpu-2gb - db-amd-1vcpu-2gb - db-amd-2vcpu-4gb - db-intel-2vcpu-4gb - db-intel-2vcpu-8gb - db-amd-2vcpu-8gb - db-intel-4vcpu-8gb - db-amd-4vcpu-8gb - db-intel-4vcpu-16gb - db-amd-4vcpu-16gb - db-amd-8vcpu-32gb - db-intel-8vcpu-32gb - db-amd-16vcpu-64gb - db-intel-16vcpu-64gb - num_nodes: 3 sizes: - db-s-1vcpu-2gb - db-s-2vcpu-4gb - db-s-4vcpu-8gb - db-s-6vcpu-16gb - gd-2vcpu-8gb - gd-4vcpu-16gb - gd-8vcpu-32gb - gd-16vcpu-64gb - gd-32vcpu-128gb - gd-40vcpu-160gb - so1_5-2vcpu-16gb - so1_5-4vcpu-32gb - so1_5-8vcpu-64gb - so1_5-16vcpu-128gb - so1_5-24vcpu-192gb - so1_5-32vcpu-256gb - db-intel-1vcpu-2gb - db-amd-1vcpu-2gb - db-amd-2vcpu-4gb - db-intel-2vcpu-4gb - db-intel-2vcpu-8gb - db-amd-2vcpu-8gb - db-intel-4vcpu-8gb - db-amd-4vcpu-8gb - db-intel-4vcpu-16gb - db-amd-4vcpu-16gb - db-amd-8vcpu-32gb - db-intel-8vcpu-32gb - db-amd-16vcpu-64gb - db-intel-16vcpu-64gb redis: regions: - ams3 - blr1 - fra1 - lon1 - nyc1 - nyc3 - sfo2 - sfo3 - sgp1 - syd1 - tor1 versions: - '7' layouts: - num_nodes: 1 sizes: - db-s-1vcpu-1gb - db-s-1vcpu-2gb - db-s-2vcpu-4gb - db-s-4vcpu-8gb - db-s-6vcpu-16gb - db-s-8vcpu-32gb - db-s-16vcpu-64gb - m-2vcpu-16gb - m-4vcpu-32gb - m-8vcpu-64gb - m-16vcpu-128gb - m-24vcpu-192gb - m-32vcpu-256gb - num_nodes: 2 sizes: - db-s-1vcpu-2gb - db-s-2vcpu-4gb - db-s-4vcpu-8gb - db-s-6vcpu-16gb - db-s-8vcpu-32gb - db-s-16vcpu-64gb - m-2vcpu-16gb - m-4vcpu-32gb - m-8vcpu-64gb - m-16vcpu-128gb - m-24vcpu-192gb - m-32vcpu-256gb - num_nodes: 3 sizes: - db-s-1vcpu-2gb - db-s-2vcpu-4gb - db-s-4vcpu-8gb - db-s-6vcpu-16gb - db-s-8vcpu-32gb - db-s-16vcpu-64gb - m-2vcpu-16gb - m-4vcpu-32gb - m-8vcpu-64gb - m-16vcpu-128gb - m-24vcpu-192gb - m-32vcpu-256gb version_availability: kafka: - end_of_life: null end_of_availability: '2024-07-18T00:00:00Z' version: '3.6' - end_of_life: null end_of_availability: '2025-01-17T00:00:00Z' version: '3.7' mongodb: - end_of_life: '2024-10-01T07:00:00Z' end_of_availability: null version: '5.0' - end_of_life: '2025-07-01T07:00:00Z' end_of_availability: null version: '6.0' - end_of_life: '2026-08-01T07:00:00Z' end_of_availability: null version: '7.0' mysql: - end_of_life: null end_of_availability: null version: '8' opensearch: - end_of_life: null end_of_availability: null version: '1' - end_of_life: null end_of_availability: null version: '2' pg: - end_of_life: '2025-11-13T00:00:00Z' end_of_availability: '2025-05-13T00:00:00Z' version: '13' - end_of_life: '2026-11-12T00:00:00Z' end_of_availability: '2026-05-12T00:00:00Z' version: '14' - end_of_life: '2027-11-11T00:00:00Z' end_of_availability: '2027-05-12T00:00:00Z' version: '15' - end_of_life: '2028-11-09T00:00:00Z' end_of_availability: '2028-05-09T00:00:00Z' version: '16' redis: - end_of_life: null end_of_availability: null version: '7' too_many_requests: description: API Rate limit exceeded headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/error' example: id: too_many_requests message: API Rate limit exceeded. unexpected_error: description: Unexpected error headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/error' example: id: example_error message: some error message connection_pools: description: A JSON object with a key of `pools`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/connection_pools' example: pools: - user: doadmin name: reporting-pool size: 10 db: defaultdb mode: session connection: uri: postgres://doadmin:wv78n3zpz42xezdk@backend-do-user-19081923-0.db.ondigitalocean.com:25061/foo?sslmode=require database: foo host: backend-do-user-19081923-0.db.ondigitalocean.com port: 25061 user: doadmin password: wv78n3zpz42xezdk ssl: true - user: doadmin name: backend-pool size: 10 db: defaultdb mode: transaction connection: uri: postgres://doadmin:wv78n3zpz42xezdk@backend-do-user-19081923-0.db.ondigitalocean.com:25061/backend-pool?sslmode=require database: backend-pool host: backend-do-user-19081923-0.db.ondigitalocean.com port: 25061 user: doadmin password: wv78n3zpz42xezdk ssl: true server_error: description: Server error. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/error' example: id: server_error message: Unexpected server-side error not_found: description: The resource was not found. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/error' example: id: not_found message: The resource you requested could not be found. user: description: A JSON object with a key of `user`. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: type: object properties: user: $ref: '#/components/schemas/database_user' required: - user examples: New User: value: user: name: app-01 role: normal password: jge5lfxtzhx42iff New User with MySQL Auth Plugin: value: user: name: app-02 role: normal password: wv78n3zpz42xezdk mysql_settings: auth_plugin: mysql_native_password New User for Postgres with replication rights: value: user: name: app-02 role: normal password: wv78n3zpz42xezdk settings: pg_allow_replication: true Kafka User: value: user: name: app-03 role: normal password: qv78n3zes42xezdk access_cert: '-----BEGIN CERTIFICATE----- MIIFFjCCA/6gAwIBAgISA0AznUJmXhu08/89ZuSPC/kRMA0GCSqGSIb3DQEBCwUA MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xNjExMjQwMDIzMDBaFw0x NzAyMjIwMDIzMDBaMCQxIjAgBgNVBAMTGWNsb3VkLmFuZHJld3NvbWV0aGluZy5j b20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDBIZMz8pnK6V52SVf+ CYssOfCQHAx5f0Ou5rYbq3xNh8VWHIYJCQ1QxQIxKSP6+uODSYrb2KWyurP1DwGb 8OYm0J3syEDtCUQik1cpCzpeNlAZ2f8FzXyYQAqPopxdRpsFz8DtZnVvu86XwrE4 oFPl9MReICmZfBNWylpV5qgFPoXyJ70ZAsTm3cEe3n+LBXEnY4YrVDRWxA3wZ2mz Z03HZ1hHrxK9CMnS829U+8sK+UneZpCO7yLRPuxwhmps0wpK/YuZZfRAKF1FZRna k/SIQ28rnWufmdg16YqqHgl5JOgnb3aslKRvL4dI2Gwnkd2IHtpZnTR0gxFXfqqb QwuRAgMBAAGjggIaMIICFjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYB BQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFLsAFcxAhFX1 MbCnzr9hEO5rL4jqMB8GA1UdIwQYMBaAFKhKamMEfd265tE5t6ZFZe/zqOyhMHAG CCsGAQUFBwEBBGQwYjAvBggrBgEFBQcwAYYjaHR0cDovL29jc3AuaW50LXgzLmxl dHNlbmNyeXB0Lm9yZy8wLwYIKwYBBQUHMAKGI2h0dHA6Ly9jZXJ0LmludC14My5s ZXRzZW5jcnlwdC5vcmcvMCQGA1UdEQQdMBuCGWNsb3VkLmFuZHJld3NvbWV0aGlu Zy5jb20wgf4GA1UdIASB9jCB8zAIBgZngQwBAgWrgeYGCysGAQQBgt8TAQEBMIHW MCYGCCsGAQUFBwIBFhpodHRwOi8vY3BzLmxldHNlbmNyeXB0Lm9yZzCBqwYIKwYB BQUHAgIwgZ4MgZtUaGlzIENlcnRpZmljYXRlIG1heSBvbmx5IGJlIHJlbGllZCB1 cG9uIGJ5IFJlbHlpbmcgUGFydGllcyBhbmQgb25seSQ2ziBhY2NvcmRhbmNlIHdp dGggdGhlIENlcnRpZmljYXRlIFBvbGljeSBmb3VuZCBhdCBodHRwczovL2xldHNl bmNyeXB0Lm9yZy9yZXBvc2l0b3J5LzANBgkqhkiG9w0BAQsFAAOCAQEAOZVQvrjM PKXLARTjB5XsgfyDN3/qwLl7SmwGkPe+B+9FJpfScYG1JzVuCj/SoaPaK34G4x/e iXwlwOXtMOtqjQYzNu2Pr2C+I+rVmaxIrCUXFmC205IMuUBEeWXG9Y/HvXQLPabD D3Gdl5+Feink9SDRP7G0HaAwq13hI7ARxkL9p+UIY39X0dV3WOboW2Re8nrkFXJ7 q9Z6shK5QgpBfsLjtjNsQzaGV3ve1gOg25aTJGearBWOvEjJNA1wGMoKVXOtYwm/ WyWoVdCQ8HmconcbJB6xc0UZ1EjvzRr5ZIvSa5uHZD0L3m7/kpPWlAlFJ7hHASPu UlF1zblDmg2Iaw== -----END CERTIFICATE-----' access_key: '-----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDBIZMz8pnK6V52 SVf+CYssOfCQHAx5f0Ou5rYbq3xNh8VHAIYJCQ1QxQIxKSP6+uODSYrb2KWyurP1 DwGb8OYm0J3syEDtCUQik1cpCzpeNlAZ2f8FzXyYQAqPopxdRpsFz8DtZnVvu86X wrE4oFPl9MReICmZfBNWylpV5qgFPoXyJ70ZAsTm3cEe3n+LBXEnY4YrVDRWxA3w Z2mzZ03HZ1hHrxK9CMnS829U+8sK+UneZpCO7yLRPuxwhmps0wpK/YuZZfRAKF1F ZRnak/SIQ28rnWufmdg16YqqHgl5JOgnb3aslKRvL4dI2Gwnkd2IHtpZnTR0gxFX fqqbQwuRAgMBAAECggEBAILLmkW0JzOkmLTDNzR0giyRkLoIROqDpfLtjKdwm95l 9NUBJcU4vCvXQITKt/NhtnNTexcowg8pInb0ksJpg3UGE+4oMNBXVi2UW5MQZ5cm cVkQqgXkBF2YAY8FMaB6EML+0En2+dGR/3gIAr221xsFiXe1kHbB8Nb2c/d5HpFt eRpLVJnK+TxSr78PcZA8DDGlSgwvgimdAaFUNO2OqB9/0E9UPyKk2ycdff/Z6ldF 0hkCLtdYTTl8Kf/OwjcuTgmA2O3Y8/CoQX/L+oP9Rvt9pWCEfuebiOmHJVPO6Y6x gtQVEXwmF1pDHH4Qtz/e6UZTdYeMl9G4aNO2CawwcaYECgYEA57imgSOG4XsJLRh GGncV9R/xhy4AbDWLtAMzQRX4ktvKCaHWyQV2XK2we/cu29NLv2Y89WmerTNPOU+ P8+pB31uty2ELySVn15QhKpQClVEAlxCnnNjXYrii5LOM80+lVmxvQwxVd8Yz8nj IntyioXNBEnYS7V2RxxFGgFun1cCgYEA1V3W+Uyamhq8JS5EY0FhyGcXdHd70K49 W1ou7McIpncf9tM9acLS1hkI98rd2T69Zo8mKoV1V2hjFaKUYfNys6tTkYWeZCcJ 3rW44j9DTD+FmmjcX6b8DzfybGLehfNbCw6n67/r45DXIV/fk6XZfkx6IEGO4ODt Nfnvx4TuI1cCgYBACDiKqwSUvmkUuweOo4IuCxyb5Ee8v98P5JIE/VRDxlCbKbpx pxEam6aBBQVcDi+n8o0H3WjjlKc6UqbW/01YMoMrvzotxNBLz8Y0QtQHZvR6KoCG RKCKstxTcWflzKuknbqN4RapAhNbKBDJ8PMSWfyDWNyaXzSmBdvaidbF1QKBgDI0 o4oD0Xkjg1QIYAUu9FBQmb9JAjRnW36saNBEQS/SZg4RRKknM683MtoDvVIKJk0E sAlfX+4SXQZRPDMUMtA+Jyrd0xhj6zmhbwClvDMr20crF3fWdgcqtft1BEFmsuyW JUMe5OWmRkjPI2+9ncDPRAllA7a8lnSV/Crph5N/AoGBAIK249temKrGe9pmsmAo QbNuYSmwpnMoAqdHTrl70HEmK7ob6SIVmsR8QFAkH7xkYZc4Bxbx4h1bdpozGB+/ AangbiaYJcAOD1QyfiFbflvI1RFeHgrk7VIafeSeQv6qu0LLMi2zUbpgVzxt78Wg eTuK2xNR0PIM8OI7pRpgyj1I -----END PRIVATE KEY-----' settings: acl: - id: acl128aaaa99239 permission: produceconsume topic: customer-events - id: acl293098flskdf permission: produce topic: customer-events.* - id: acl128ajei20123 permission: consume topic: customer-events parameters: migration_id: in: path name: migration_id description: A unique identifier assigned to the online migration. required: true example: 77b28fc8-19ff-11eb-8c9c-c68e24557488 schema: type: string username: in: path name: username description: The name of the database user. required: true example: app-01 schema: type: string database_name: in: path name: database_name description: The name of the database. required: true example: alpha schema: type: string pool_name: in: path name: pool_name description: The name used to identify the connection pool. required: true example: backend-pool schema: type: string tag_name: in: query name: tag_name description: Limits the results to database clusters with a specific tag. required: false example: production schema: type: string kafka_topic_name: in: path name: topic_name description: The name used to identify the Kafka topic. required: true example: customer-events schema: type: string replica_name: in: path name: replica_name description: The name of the database replica. required: true example: read-nyc3-01 schema: type: string logsink_id: in: path name: logsink_id description: A unique identifier for a logsink of a database cluster required: true example: 50484ec3-19d6-4cd3-b56f-3b0381c289a6 schema: type: string database_cluster_uuid: in: path name: database_cluster_uuid description: A unique identifier for a database cluster. required: true example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 schema: type: string format: uuid opensearch_index_name: in: path name: index_name description: The name of the OpenSearch index. required: true example: logs-* schema: type: string headers: ratelimit-reset: schema: type: integer example: 1444931833 description: The time when the oldest request will expire. The value is given in Unix epoch time. See https://developers.digitalocean.com/documentation/v2/#rate-limit for information about how requests expire. ratelimit-remaining: schema: type: integer example: 4816 description: The number of requests in your hourly quota that remain before you hit your request limit. See https://developers.digitalocean.com/documentation/v2/#rate-limit for information about how requests expire. ratelimit-limit: schema: type: integer example: 5000 description: The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. securitySchemes: bearer_auth: type: http scheme: bearer description: '## OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/) - `dor_v1_` for OAuth refresh tokens ### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. ### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. ### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` '