DigitalOcean-public.v2-new_Databases
Update Firewall Rules (Trusted Sources) for a Database
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 to limit access to them instead of using a firewall. A successful
put/v2/databases/{database_cluster_uuid}/firewall
Path parameters
database_cluster_uuidstring uuid required
A unique identifier for a database cluster.
Request body
Example request
{
"rules": [
{
"uuid": "79f26d28-ea8a-41f2-8ad8-8cfcdd020095",
"cluster_uuid": "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30",
"type": "droplet",
"value": "ff2a6c52-5a44-4b63-b99c-0e98e7a63d61",
"created_at": "2019-01-11T18:37:36Z"
}
]
}Response
The action was successful and the response body is empty.