Skip to main content

output_graylog_stream_rules

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

Overview​

Nameoutput_graylog_stream_rules
TypeResource
Idovh.dbaas_logs.output_graylog_stream_rules

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
rule_idstring (uuid)Stream rule ID (wire: ruleId)
fieldstringField name
is_invertedbooleanInvert condition (wire: isInverted)
operatorstringField operator (FIELD_PRESENCE, GREATER_THAN, MATCH_EXACTLY, SMALLER_THAN)
valuestringField value

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectrule_id, service_name, stream_idReturns the stream rule.
listselectservice_name, stream_idx_pagination_modeReturns the stream rules of the Logs Data Platform service.
createinsertservice_name, stream_id, field, operator, valueCreates a stream rule on the Logs Data Platform service.
deletedeleterule_id, service_name, stream_idDeletes the stream rule.

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"}})
rule_idstring (uuid)Rule ID (wire: ruleId)
service_namestringService name (wire: serviceName)
stream_idstring (uuid)Stream ID (wire: streamId)
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 stream rule.

SELECT
rule_id,
field,
is_inverted,
operator,
value
FROM ovh.dbaas_logs.output_graylog_stream_rules
WHERE rule_id = '{{ rule_id }}' -- required
AND service_name = '{{ service_name }}' -- required
AND stream_id = '{{ stream_id }}' -- required
;

INSERT examples​

Creates a stream rule on the Logs Data Platform service.

INSERT INTO ovh.dbaas_logs.output_graylog_stream_rules (
field,
is_inverted,
operator,
value,
service_name,
stream_id
)
SELECT
'{{ field }}' /* required */,
{{ is_inverted }},
'{{ operator }}' /* required */,
'{{ value }}' /* required */,
'{{ service_name }}',
'{{ stream_id }}'
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 stream rule.

DELETE FROM ovh.dbaas_logs.output_graylog_stream_rules
WHERE rule_id = '{{ rule_id }}' --required
AND service_name = '{{ service_name }}' --required
AND stream_id = '{{ stream_id }}' --required
;