Skip to main content

opensearch_indices

Creates, updates, deletes, gets or lists an opensearch_indices resource.

Overview​

Nameopensearch_indices
TypeResource
Idovh.public_cloud_analytics.opensearch_indices

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Unique identifier of the index
namestringName of the OpenSearch index
checksumstringHash of the resource used for concurrency control
created_atstring (date-time)Date at which the index was created (wire: createdAt)
document_countintegerNumber of documents stored in this index (wire: documentCount)
replica_countintegerNumber of replica shards for this index (wire: replicaCount)
shard_countintegerNumber of primary shards for this index (wire: shardCount)
sizeintegerTotal size of the index in bytes

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectindex_id, service_id, project_idReturns the document count, the size in bytes and the primary and replica shard counts of the index. (Beta version)
listselectservice_id, project_idx_pagination_cursor, x_pagination_sizeReturns the indexes of the service with their document count, size and shards. (Beta version)

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
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
index_idstring (uuid)Index ID (wire: indexId)
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
service_idstring (uuid)Service ID (wire: serviceId)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Returns the document count, the size in bytes and the primary and replica shard counts of the index. (Beta version)

SELECT
id,
name,
checksum,
created_at,
document_count,
replica_count,
shard_count,
size
FROM ovh.public_cloud_analytics.opensearch_indices
WHERE index_id = '{{ index_id }}' -- required
AND service_id = '{{ service_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;