Skip to main content

vectorize_indexes

Creates, updates, deletes, gets or lists a vectorize_indexes resource.

Overview

Namevectorize_indexes
TypeResource
Idcloudflare.vectorize.vectorize_indexes

Fields

The following fields are returned by SELECT queries:

Get Vectorize Index Response

NameDatatypeDescription
namestring (example: example-index)
configobject
created_onstring (date-time)Specifies the timestamp the resource was created as an ISO8601 string. (example: 2022-11-15T18:25:44.442097Z)
descriptionstringSpecifies the description of the index. (example: This is my example index.)
modified_onstring (date-time)Specifies the timestamp the resource was modified as an ISO8601 string. (example: 2022-11-15T18:25:44.442097Z)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, index_nameReturns the specified Vectorize Index.
listselectaccount_idReturns a list of Vectorize Indexes
vectorize_deprecated_create_vectorize_indexinsertaccount_id, name, configCreates and returns a new Vectorize Index.
vectorize_deprecated_delete_vectorize_indexdeleteaccount_id, index_nameDeletes the specified Vectorize Index.

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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
index_namestringThe Vectorize index name.

SELECT examples

Returns the specified Vectorize Index.

SELECT
name,
config,
created_on,
description,
modified_on
FROM cloudflare.vectorize.vectorize_indexes
WHERE account_id = '{{ account_id }}' -- required
AND index_name = '{{ index_name }}' -- required
;

INSERT examples

Creates and returns a new Vectorize Index.

INSERT INTO cloudflare.vectorize.vectorize_indexes (
config,
description,
name,
account_id
)
SELECT
'{{ config }}' /* required */,
'{{ description }}',
'{{ name }}' /* required */,
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;

DELETE examples

Deletes the specified Vectorize Index.

DELETE FROM cloudflare.vectorize.vectorize_indexes
WHERE account_id = '{{ account_id }}' --required
AND index_name = '{{ index_name }}' --required
;