{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Updates and returns the specified fields of the Hyperdrive configuration. Custom caching settings are not kept if caching is disabled. For an integration-backed configuration, the integration association is preserved but cannot be changed; omit the integration field.","properties":{"path":{"type":"object","properties":{"account_id":{"$ref":"#/definitions/hyperdrive_identifier","description":"The Cloudflare account ID."},"hyperdrive_id":{"$ref":"#/definitions/hyperdrive_identifier","description":"The unique identifier of the Hyperdrive configuration."}},"required":["account_id","hyperdrive_id"],"additionalProperties":false},"body":{"$ref":"#/definitions/hyperdrive_hyperdrive-config-patch"}},"required":["path","body"],"additionalProperties":false,"definitions":{"hyperdrive_identifier":{"description":"Define configurations using a unique string identifier.","type":"string","maxLength":32,"examples":["023e105f4ecef8ad9ca31a8372d0c353"]},"hyperdrive_hyperdrive-config-patch":{"type":"object","properties":{"caching":{"$ref":"#/definitions/hyperdrive_hyperdrive-caching"},"mtls":{"$ref":"#/definitions/hyperdrive_hyperdrive-mtls"},"name":{"description":"The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. An empty value leaves the name unchanged.","type":"string","maxLength":2048},"origin":{"type":"object","anyOf":[{"$ref":"#/definitions/hyperdrive_hyperdrive-database"},{"oneOf":[{"$ref":"#/definitions/hyperdrive_internet-origin"},{"$ref":"#/definitions/hyperdrive_over-access-origin"},{"$ref":"#/definitions/hyperdrive_vpc-service-origin"}],"title":"Origin Database"}]},"origin_connection_limit":{"$ref":"#/definitions/hyperdrive_hyperdrive-origin-connection-limit"}}},"hyperdrive_hyperdrive-caching":{"type":"object","oneOf":[{"$ref":"#/definitions/hyperdrive_hyperdrive-caching-disabled"},{"$ref":"#/definitions/hyperdrive_hyperdrive-caching-enabled"}]},"hyperdrive_hyperdrive-mtls":{"description":"mTLS configuration for the origin connection. Cannot be used with VPC Service origins; TLS must be managed on the VPC Service.","type":"object","properties":{"ca_certificate_id":{"description":"Define CA certificate ID obtained after uploading CA cert.","type":"string","examples":["00000000-0000-0000-0000-0000000000"]},"mtls_certificate_id":{"description":"Define mTLS certificate ID obtained after uploading client cert.","type":"string","examples":["00000000-0000-0000-0000-0000000000"]},"sslmode":{"description":"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.","type":"string","examples":["verify-full"]}},"title":"mTLS"},"hyperdrive_hyperdrive-database":{"type":"object","properties":{"database":{"description":"Set the name of your origin database.","type":"string","maxLength":2048,"examples":["postgres"]},"password":{"description":"Set the password needed to access your origin database. The API never returns this write-only value.","type":"string","maxLength":2048},"scheme":{"$ref":"#/definitions/hyperdrive_hyperdrive-scheme"},"user":{"description":"Set the user of your origin database.","type":"string","maxLength":2048,"examples":["postgres"]}},"title":"Connection Options"},"hyperdrive_internet-origin":{"type":"object","properties":{"host":{"description":"Defines the publicly reachable hostname or IP of your origin database. Private, loopback, and link-local IP addresses are not allowed.","type":"string","examples":["database.example.com"]},"port":{"description":"Defines the port of your origin database. Defaults to 5432 for PostgreSQL or 3306 for MySQL if not specified.","type":"integer","maximum":65535,"minimum":1,"examples":[5432]}},"required":["host","port"],"title":"Public Database"},"hyperdrive_over-access-origin":{"type":"object","properties":{"access_client_id":{"description":"Defines the Client ID of the Access token to use when connecting to the origin database.","type":"string","examples":["0123456789abcdef0123456789abcdef.access"]},"access_client_secret":{"description":"Defines the Client Secret of the Access Token to use when connecting to the origin database. The API never returns this write-only value.","type":"string","examples":["0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"]},"host":{"description":"Defines the host (hostname or IP) of your origin database.","type":"string","examples":["database.example.com"]}},"required":["host","access_client_id","access_client_secret"],"title":"Access-protected Database behind Cloudflare Tunnel"},"hyperdrive_vpc-service-origin":{"description":"Connect to a database through a Workers VPC Service. TLS settings (mTLS, sslmode) cannot be configured on the Hyperdrive when using a VPC Service origin; TLS must be managed on the VPC Service itself.\n","type":"object","properties":{"service_id":{"description":"The identifier of the Workers VPC Service to connect through. Hyperdrive will egress through the specified VPC Service to reach the origin database.","type":"string","examples":["0123456789abcdef0123456789abcdef"]}},"required":["service_id"],"title":"Database reachable through a Workers VPC"},"hyperdrive_hyperdrive-origin-connection-limit":{"description":"The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.\n\nMaximum allowed: 20 for free tier accounts, 100 for paid tier accounts.\nIf not specified, defaults to 20 for free tier and 60 for paid tier.\nCertain Cloudflare-managed origins may be permitted a higher limit.\nContact Cloudflare if you need a higher limit.\n","type":"integer","minimum":5,"examples":[60]},"hyperdrive_hyperdrive-caching-disabled":{"type":"object","allOf":[{"$ref":"#/definitions/hyperdrive_hyperdrive-caching-common"}],"title":"Caching disabled"},"hyperdrive_hyperdrive-caching-enabled":{"type":"object","allOf":[{"$ref":"#/definitions/hyperdrive_hyperdrive-caching-common"},{"properties":{"max_age":{"description":"Specify the maximum duration (in seconds) items should persist in the cache. Defaults to 60 seconds if not specified.","type":"integer","examples":[60]},"stale_while_revalidate":{"description":"Specify the number of seconds the cache may serve a stale response. Defaults to 15 seconds if not specified.","type":"integer","examples":[15]}},"type":"object"}],"title":"Caching enabled"},"hyperdrive_hyperdrive-scheme":{"description":"Specifies the URL scheme used to connect to your origin database.","type":"string","enum":["postgres","postgresql","mysql"]},"hyperdrive_hyperdrive-caching-common":{"type":"object","properties":{"disabled":{"description":"Set to true to disable caching of SQL responses. Default is false.","type":"boolean"}}}}},"name":"Update Hyperdrive","id":"cloudflare.patch-hyperdrive","example":{"path":{"account_id":"023e105f4ecef8ad9ca31a8372d0c353","hyperdrive_id":"023e105f4ecef8ad9ca31a8372d0c353"},"body":{}},"maxRequests":1,"summary":false}}