PUT /v2/databases/{database_cluster_uuid}/firewall
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
Servers
- https://api.digitalocean.com
Path parameters
Name | Type | Required | Description |
---|---|---|---|
database_cluster_uuid |
String | Yes |
A unique identifier for a database cluster. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
rules[] |
Array | No | |
rules[].cluster_uuid |
String | No |
A unique ID for the database cluster to which the rule is applied. |
rules[].uuid |
String | No |
A unique ID for the firewall rule itself. |
rules[].type |
String | Yes |
The type of resource that the firewall rule allows to access the database cluster. Possible values:
|
rules[].value |
String | Yes |
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. |
rules[].created_at |
String | No |
A time value given in ISO8601 combined date and time format that represents when the firewall rule was created. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.