output_opensearch_indices
Creates, updates, deletes, gets or lists an output_opensearch_indices resource.
Overview​
| Name | output_opensearch_indices |
| Type | Resource |
| Id | ovh.dbaas_logs.output_opensearch_indices |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | Index name |
index_id | string (uuid) | Index ID (wire: indexId) |
alert_notify_enabled | boolean | If set, notify when size is near 80, 90 or 100 % of its maximum capacity (wire: alertNotifyEnabled) |
created_at | string (date-time) | Index creation (wire: createdAt) |
current_size | integer | Current index size (in bytes) (wire: currentSize) |
description | string | Index description |
iam | object | IAM resource metadata |
is_editable | boolean | Indicates if you are allowed to edit entry (wire: isEditable) |
max_size | integer | Maximum index size (in bytes) (wire: maxSize) |
nb_shard | integer | Number of shard (wire: nbShard) |
updated_at | string (date-time) | Index last update (wire: updatedAt) |
Index
| Name | Datatype | Description |
|---|---|---|
name | string | Index name |
index_id | string (uuid) | Index ID (wire: indexId) |
alert_notify_enabled | boolean | If set, notify when size is near 80, 90 or 100 % of its maximum capacity (wire: alertNotifyEnabled) |
created_at | string (date-time) | Index creation (wire: createdAt) |
current_size | integer | Current index size (in bytes) (wire: currentSize) |
description | string | Index description |
iam | object | IAM resource metadata |
is_editable | boolean | Indicates if you are allowed to edit entry (wire: isEditable) |
max_size | integer | Maximum index size (in bytes) (wire: maxSize) |
nb_shard | integer | Number of shard (wire: nbShard) |
updated_at | string (date-time) | Index last update (wire: updatedAt) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | index_id, service_name | Returns the index. | |
list | select | service_name | iam_tags, x_pagination_mode | Returns the indexes of the Logs Data Platform service. |
create | insert | service_name, description, suffix | Creates an index on the Logs Data Platform service. | |
update | update | index_id, service_name, description | Updates the index. | |
delete | delete | index_id, service_name | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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_id | string (uuid) | Index ID (wire: indexId) |
service_name | string | Service name (wire: serviceName) |
iam_tags | object | Filter resources on IAM tags (wire: iamTags) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
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
;
Returns the indexes of the Logs Data Platform service.
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 service_name = '{{ service_name }}' -- required
AND iam_tags = '{{ iam_tags }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: output_opensearch_indices
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the output_opensearch_indices resource.
- name: alert_notify_enabled
value: {{ alert_notify_enabled }}
description: |
If set, notify when size is near 80, 90 or 100 % of its maximum capacity
- name: description
value: "{{ description }}"
description: |
Description
- name: nb_shard
value: {{ nb_shard }}
description: |
Number of shard
- name: suffix
value: "{{ suffix }}"
description: |
Suffix
UPDATE examples​
- update
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​
- delete
Deletes the index.
DELETE FROM ovh.dbaas_logs.output_opensearch_indices
WHERE index_id = '{{ index_id }}' --required
AND service_name = '{{ service_name }}' --required
;