rsdo 0.1.20260901

A Rust client library for the DigitalOcean API v2
Documentation
operationId: databases_update_evictionPolicy

summary: Configure the Eviction Policy for a Caching or Valkey Cluster

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.

tags:
  - Databases

parameters:
  - $ref: 'parameters.yml#/database_cluster_uuid'

requestBody:
  required: true
  content:
    application/json:
      schema:
        type: object
        required:
          - eviction_policy
        properties:
          eviction_policy:
            $ref: 'models/eviction_policy_model.yml'
      example:
        eviction_policy: allkeys_lru

responses:
  '204':
    $ref: '../../shared/responses/no_content.yml'

  '401':
    $ref: '../../shared/responses/unauthorized.yml'

  '404':
    $ref: '../../shared/responses/not_found.yml'

  '429':
    $ref: '../../shared/responses/too_many_requests.yml'

  '500':
    $ref: '../../shared/responses/server_error.yml'

  default:
    $ref: '../../shared/responses/unexpected_error.yml'

x-codeSamples:
  - $ref: 'examples/curl/databases_update_evictionPolicy.yml'
  - $ref: 'examples/go/databases_update_evictionPolicy.yml'
  - $ref: 'examples/python/databases_update_evictionPolicy.yml'

security:
  - bearer_auth:
      - 'database:update'