vector_databases
Creates, updates, deletes, gets or lists a vector_databases resource.
Overview
| Name | vector_databases |
| Type | Resource |
| Id | digitalocean.databases.vector_databases |
Fields
The following fields are returned by SELECT queries:
- vector_databases_get
- vector_databases_list
A successful response.
| Name | Datatype | Description |
|---|---|---|
id | string | (example: example string) |
name | string | (example: example name) |
forked_from_id | string | ID of the vector database this instance was forked from. Empty when the instance was created directly via CreateVectorDB. Read-only and set by the platform at fork time; never modifiable through UpdateVectorDB. (example: 123e4567-e89b-12d3-a456-426614174000) |
last_restore_id | string | Backup_id of the most recent restore initiated against this instance. Empty if no restore has ever been triggered. Lets callers recover the identifier of an in-flight or last-completed restore without having to retain the RestoreBackupResponse themselves. Use it with GetRestoreStatus to fetch the live status. (example: 123e4567-e89b-12d3-a456-426614174000) |
project_id | string | Project this database belongs to. (example: 123e4567-e89b-12d3-a456-426614174000) |
config | object | VectorDBConfig holds optional, advanced cluster settings. |
created_at | string (date-time) | (example: 2023-01-01T00:00:00Z) |
endpoints | object | VectorDBEndpoints contains the connection endpoints for a vector database instance. |
owner_uuid | string | (example: 123e4567-e89b-12d3-a456-426614174000) |
region | string | (example: tor1) |
size | string | Resource tier: small, medium, or large. (example: example string) |
status | string | Lifecycle state: pending, creating, active, errored, or deleting. (example: example string) |
tags | array | |
updated_at | string (date-time) | (example: 2023-01-01T00:00:00Z) |
A successful response.
| Name | Datatype | Description |
|---|---|---|
id | string | (example: example string) |
name | string | (example: example name) |
forked_from_id | string | ID of the vector database this instance was forked from. Empty when the instance was created directly via CreateVectorDB. Read-only and set by the platform at fork time; never modifiable through UpdateVectorDB. (example: 123e4567-e89b-12d3-a456-426614174000) |
last_restore_id | string | Backup_id of the most recent restore initiated against this instance. Empty if no restore has ever been triggered. Lets callers recover the identifier of an in-flight or last-completed restore without having to retain the RestoreBackupResponse themselves. Use it with GetRestoreStatus to fetch the live status. (example: 123e4567-e89b-12d3-a456-426614174000) |
project_id | string | Project this database belongs to. (example: 123e4567-e89b-12d3-a456-426614174000) |
config | object | VectorDBConfig holds optional, advanced cluster settings. |
created_at | string (date-time) | (example: 2023-01-01T00:00:00Z) |
endpoints | object | VectorDBEndpoints contains the connection endpoints for a vector database instance. |
owner_uuid | string | (example: 123e4567-e89b-12d3-a456-426614174000) |
region | string | (example: tor1) |
size | string | Resource tier: small, medium, or large. (example: example string) |
status | string | Lifecycle state: pending, creating, active, errored, or deleting. (example: example string) |
tags | array | |
updated_at | string (date-time) | (example: 2023-01-01T00:00:00Z) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
vector_databases_get | select | id | To show information about an existing vector database, send a GET request to /v2/vector-databases/{id}. The response body contains a JSON object with a vector_db key holding the standard vector database attributes, including an embedded endpoints object with the connection information needed to access the database. | |
vector_databases_list | select | page, per_page | To list all of the vector databases on your account, send a GET request to /v2/vector-databases. Use the page and per_page query parameters to paginate the results. The response body contains a vector_dbs array of vector database objects and a total field with the overall count. | |
vector_databases_create | insert | To create a vector database, send a POST request to /v2/vector-databases. The response body contains a JSON object with a vector_db key holding the newly created database. Its initial status is creating and changes to active once the database is ready to receive traffic. | ||
vector_databases_update | replace | id | To update an existing vector database, send a PUT request to /v2/vector-databases/{id}. The response body contains a JSON object with a vector_db key holding the updated vector database. | |
vector_databases_delete | delete | id | To delete a vector database, send a DELETE request to /v2/vector-databases/{id}. Deleting a vector database is irreversible and destroys the underlying instance along with its data. | |
vector_databases_post_resize | exec | id | To resize a vector database, send a POST request to /v2/vector-databases/{id}/resize. This changes the database's resource tier. The response body contains a JSON object with the updated vector database. | |
vector_databases_update_tags | exec | id | To update the tags on a vector database, send a PUT request to /v2/vector-databases/{id}/tags. The supplied set of tags replaces the database's existing tags. |
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 |
|---|---|---|
id | string | Required. ID of the vector database to update tags for. (example: "example string") |
page | integer | (example: 1) |
per_page | integer | (example: 1) |
SELECT examples
- vector_databases_get
- vector_databases_list
To show information about an existing vector database, send a GET request to /v2/vector-databases/{id}. The response body contains a JSON object with a vector_db key holding the standard vector database attributes, including an embedded endpoints object with the connection information needed to access the database.
SELECT
id,
name,
forked_from_id,
last_restore_id,
project_id,
config,
created_at,
endpoints,
owner_uuid,
region,
size,
status,
tags,
updated_at
FROM digitalocean.databases.vector_databases
WHERE id = '{{ id }}' -- required
;
To list all of the vector databases on your account, send a GET request to /v2/vector-databases. Use the page and per_page query parameters to paginate the results. The response body contains a vector_dbs array of vector database objects and a total field with the overall count.
SELECT
id,
name,
forked_from_id,
last_restore_id,
project_id,
config,
created_at,
endpoints,
owner_uuid,
region,
size,
status,
tags,
updated_at
FROM digitalocean.databases.vector_databases
WHERE page = '{{ page }}'
AND per_page = '{{ per_page }}'
;
INSERT examples
- vector_databases_create
- Manifest
To create a vector database, send a POST request to /v2/vector-databases. The response body contains a JSON object with a vector_db key holding the newly created database. Its initial status is creating and changes to active once the database is ready to receive traffic.
INSERT INTO digitalocean.databases.vector_databases (
name,
project_id,
region,
size,
tags
)
SELECT
'{{ name }}',
'{{ project_id }}',
'{{ region }}',
'{{ size }}',
'{{ tags }}'
RETURNING
vector_db
;
# Description fields are for documentation purposes
- name: vector_databases
props:
- name: name
value: "{{ name }}"
description: |
Required. Human-readable name for the database.
- name: project_id
value: "{{ project_id }}"
description: |
Required. ID of the project to create the vector database in.
- name: region
value: "{{ region }}"
description: |
Required. Region slug where the database will be provisioned.
- name: size
value: "{{ size }}"
description: |
Required. Resource tier: small, medium, or large.
- name: tags
value:
- "{{ tags }}"
description: |
A set of arbitrary tags to organize your vector database
REPLACE examples
- vector_databases_update
To update an existing vector database, send a PUT request to /v2/vector-databases/{id}. The response body contains a JSON object with a vector_db key holding the updated vector database.
REPLACE digitalocean.databases.vector_databases
SET
config = '{{ config }}',
id = '{{ id }}',
project_id = '{{ project_id }}'
WHERE
id = '{{ id }}' --required
RETURNING
vector_db;
DELETE examples
- vector_databases_delete
To delete a vector database, send a DELETE request to /v2/vector-databases/{id}. Deleting a vector database is irreversible and destroys the underlying instance along with its data.
DELETE FROM digitalocean.databases.vector_databases
WHERE id = '{{ id }}' --required
;
Lifecycle Methods
- vector_databases_post_resize
- vector_databases_update_tags
To resize a vector database, send a POST request to /v2/vector-databases/{id}/resize. This changes the database's resource tier. The response body contains a JSON object with the updated vector database.
EXEC digitalocean.databases.vector_databases.vector_databases_post_resize
@id='{{ id }}' --required
@@json=
'{
"id": "{{ id }}",
"size": "{{ size }}"
}'
;
To update the tags on a vector database, send a PUT request to /v2/vector-databases/{id}/tags. The supplied set of tags replaces the database's existing tags.
EXEC digitalocean.databases.vector_databases.vector_databases_update_tags
@id='{{ id }}' --required
@@json=
'{
"id": "{{ id }}",
"tags": "{{ tags }}"
}'
;