eviction_policies
Creates, updates, deletes, gets or lists an eviction_policies
resource.
Overview
Name | eviction_policies |
Type | Resource |
Id | digitalocean.databases.eviction_policies |
Fields
The following fields are returned by SELECT
queries:
- databases_get_eviction_policy
A JSON string with a key of eviction_policy
.
Name | Datatype | Description |
---|
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
databases_get_eviction_policy | select | database_cluster_uuid | To retrieve the configured eviction policy for an existing Caching or Valkey cluster, send a GET request to /v2/databases/$DATABASE_ID/eviction_policy .The response will be a JSON object with an eviction_policy key. This will be set to a string representing the eviction policy. | |
databases_update_eviction_policy | replace | database_cluster_uuid , data__eviction_policy | 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. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
database_cluster_uuid | string (uuid) | A unique identifier for a database cluster. (example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30) |
SELECT
examples
- databases_get_eviction_policy
To retrieve the configured eviction policy for an existing Caching or Valkey cluster, send a GET request to /v2/databases/$DATABASE_ID/eviction_policy
.
The response will be a JSON object with an eviction_policy
key. This will be set to a string representing the eviction policy.
SELECT
*
FROM digitalocean.databases.eviction_policies
WHERE database_cluster_uuid = '{{ database_cluster_uuid }}' -- required;
REPLACE
examples
- databases_update_eviction_policy
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.
REPLACE digitalocean.databases.eviction_policies
SET
data__eviction_policy = '{{ eviction_policy }}'
WHERE
database_cluster_uuid = '{{ database_cluster_uuid }}' --required
AND data__eviction_policy = '{{ eviction_policy }}' --required;