{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","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). You cannot add IPv6 addresses as trusted sources. For additional limits, see your database engine's limits page. 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.\nA successful request returns a 204 status code with no content.","properties":{"path":{"type":"object","properties":{"database_cluster_uuid":{"type":"string","format":"uuid","examples":["9cc10173-e9ea-4176-9dbc-a4cee4c4ff30"],"description":"A unique identifier for a database cluster."}},"required":["database_cluster_uuid"],"additionalProperties":false},"body":{"type":"object","properties":{"rules":{"type":"array","items":{"$ref":"#/definitions/firewall_rule"}}},"examples":[{"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","description":"a backend tag"}]}]}},"required":["path","body"],"additionalProperties":false,"definitions":{"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}","description":"A unique ID for the firewall rule itself.","examples":["79f26d28-ea8a-41f2-8ad8-8cfcdd020095"]},"type":{"type":"string","enum":["droplet","k8s","ip_addr","tag","app"],"description":"The type of resource that the firewall rule allows to access the database cluster.","examples":["droplet"]},"value":{"type":"string","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.","examples":["ff2a6c52-5a44-4b63-b99c-0e98e7a63d61"]},"description":{"type":"string","description":"A human-readable description of the rule.","examples":["an IP address for local development"]}},"required":["type","value"]}}},"name":"Update Firewall Rules (Trusted Sources) for a Database","id":"digitalocean.databases_update_firewall_rules","example":{"path":{"database_cluster_uuid":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30"},"body":{"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","description":"a backend tag"}]}},"maxRequests":1,"summary":false}}