Skip to main content

output_opensearch_indices

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

Overview​

Nameoutput_opensearch_indices
TypeResource
Idovh.dbaas_logs.output_opensearch_indices

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringIndex name
index_idstring (uuid)Index ID (wire: indexId)
alert_notify_enabledbooleanIf set, notify when size is near 80, 90 or 100 % of its maximum capacity (wire: alertNotifyEnabled)
created_atstring (date-time)Index creation (wire: createdAt)
current_sizeintegerCurrent index size (in bytes) (wire: currentSize)
descriptionstringIndex description
iamobjectIAM resource metadata
is_editablebooleanIndicates if you are allowed to edit entry (wire: isEditable)
max_sizeintegerMaximum index size (in bytes) (wire: maxSize)
nb_shardintegerNumber of shard (wire: nbShard)
updated_atstring (date-time)Index last update (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectindex_id, service_nameReturns the index.
listselectservice_nameiam_tags, x_pagination_modeReturns the indexes of the Logs Data Platform service.
createinsertservice_name, description, suffixCreates an index on the Logs Data Platform service.
updateupdateindex_id, service_name, descriptionUpdates the index.
deletedeleteindex_id, service_nameDeletes the 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
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)
service_namestringService name (wire: serviceName)
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Returns the index.

SELECT
name,
index_id,
alert_notify_enabled,
created_at,
current_size,
description,
iam,
is_editable,
max_size,
nb_shard,
updated_at
FROM ovh.dbaas_logs.output_opensearch_indices
WHERE index_id = '{{ index_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Creates an index on the Logs Data Platform service.

INSERT INTO ovh.dbaas_logs.output_opensearch_indices (
alert_notify_enabled,
description,
nb_shard,
suffix,
service_name
)
SELECT
{{ alert_notify_enabled }},
'{{ description }}' /* required */,
{{ nb_shard }},
'{{ suffix }}' /* required */,
'{{ service_name }}'
RETURNING
alias_id,
dashboard_id,
encryption_key_id,
index_id,
input_id,
operation_id,
osd_id,
role_id,
stream_id,
subscription_id,
tenant_id,
token_id,
service_name,
created_at,
state,
updated_at
;

UPDATE examples​

Updates the index.

UPDATE ovh.dbaas_logs.output_opensearch_indices
SET
alert_notify_enabled = {{ alert_notify_enabled }},
description = '{{ description }}'
WHERE
index_id = '{{ index_id }}' --required
AND service_name = '{{ service_name }}' --required
AND description = '{{ description }}' --required
RETURNING
alias_id,
dashboard_id,
encryption_key_id,
index_id,
input_id,
operation_id,
osd_id,
role_id,
stream_id,
subscription_id,
tenant_id,
token_id,
service_name,
created_at,
state,
updated_at;

DELETE examples​

Deletes the index.

DELETE FROM ovh.dbaas_logs.output_opensearch_indices
WHERE index_id = '{{ index_id }}' --required
AND service_name = '{{ service_name }}' --required
;