{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"To configure an eviction policy for an existing Caching or Valkey cluster, send a PUT request to `/v2/databases/$DATABASE_ID/eviction_policy` specifying the desired policy.","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","required":["eviction_policy"],"properties":{"eviction_policy":{"$ref":"#/definitions/eviction_policy_model"}},"examples":[{"eviction_policy":"allkeys_lru"}]}},"required":["path","body"],"additionalProperties":false,"definitions":{"eviction_policy_model":{"type":"string","enum":["noeviction","allkeys_lru","allkeys_random","volatile_lru","volatile_random","volatile_ttl"],"description":"A string specifying the desired eviction policy for a Caching or Valkey cluster.\n\n- `noeviction`: Don't evict any data, returns error when memory limit is reached.\n- `allkeys_lru:` Evict any key, least recently used (LRU) first.\n- `allkeys_random`: Evict keys in a random order.\n- `volatile_lru`: Evict keys with expiration only, least recently used (LRU) first.\n- `volatile_random`: Evict keys with expiration only in a random order.\n- `volatile_ttl`: Evict keys with expiration only, shortest time-to-live (TTL) first.","examples":["allkeys_lru"]}}},"name":"Configure the Eviction Policy for a Caching or Valkey Cluster","id":"digitalocean.databases_update_evictionpolicy","example":{"path":{"database_cluster_uuid":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30"},"body":{"eviction_policy":"allkeys_lru"}},"maxRequests":1,"summary":false}}