deploy.cache.bindBind a managed Valkey cache (its private address, in the app’s VPC)
Generates {prefix}REDIS_URL and {prefix}VALKEY_URL (redis://default:<password>@<private address>:6379) at every rollout. Refused unless every machine of the app is in the cache’s VPC. Saving does not restart the app. Pass redeploy: true to roll the live deployment’s own source onto the new configuration (also needs deploy:DeployApp); otherwise the response and GET …/env report pending until someone redeploys.
Depending on the resource, the call checks cache:ModifyCacheCluster, deploy:DeployApp instead; hold all of them to be sure it is allowed.
Request syntax
PUT /deploy/api/apps/{id}/cache
{
"cacheClusterId": "string",
"envPrefix": "string",
"redeploy": "boolean"
}Path parameters
idRequiredstring
Constraints: uuid
Request body
cacheClusterIdRequiredstring
The managed Valkey cache to bind
Constraints: /^ewc-[0-9a-f]{12}$/
envPrefixOptionalstring
Put in front of every generated variable name (e.g. CACHE_ gives CACHE_REDIS_URL), so one app can hold several bindings of a kind; default empty
Constraints: max 32 chars, /^([A-Z][A-Z0-9_]*_)?$/
redeployOptionalboolean
Also roll the live deployment onto the new configuration; default false
Response
201 with `data`: the binding — id, cacheClusterId, envPrefix and generatedKeys. The top-level `redeploy` is null unless redeploy was requested; then { ok: true, deploymentId, generation, reusedDeploymentId } or { ok: false, error }.
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Fields of data
idAlwaysstring
Binding idcacheClusterIdAlwaysstring
The bound cacheenvPrefixAlwaysstring
Prefix of the generated variable names; empty for nonegeneratedKeysAlwaysarray of string
Variable names the binding generates
Checked against the handlers: every route test validates their answers against this schema.
Errors
- 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
- 401No credentials, or an access key that is unknown, revoked or expired.
- 403The caller's policies do not allow deploy:ManageCacheBinding on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
- 404The resource does not exist in your organization.
Examples
The required parameters only, with example values. Replace id and the other placeholders with your own.
dcloud deploy cache bind id --cache-cluster-id examplecurl -X PUT "https://console.platform-development.deutschecloud.app/deploy/api/apps/id/cache" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"cacheClusterId":"example"}'Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_deploy_cache_bind.