
Alibaba Cloud Query
CertifiedQuery logs from Alibaba Cloud Simple Log Service (SLS)
Alibaba Cloud Query
Query logs from Alibaba Cloud Simple Log Service (SLS)
Queries a Logstore within a project over a specified time range, supporting fetch and store output modes.
type: io.kestra.plugin.alibaba.sls.QueryExamples
Query error logs from an SLS logstore
id: sls_query
namespace: company.team
tasks:
- id: query_logs
type: io.kestra.plugin.alibaba.sls.Query
accessKeyId: "{{ secret('ALIBABA_ACCESS_KEY_ID') }}"
accessKeySecret: "{{ secret('ALIBABA_ACCESS_KEY_SECRET') }}"
region: cn-hangzhou
project: ops-logs
logstore: app-events
query: "level: ERROR"
fetchType: FETCH
Properties
accessKeyId *string
AccessKey ID
The AccessKey ID used to authenticate against Alibaba Cloud.
accessKeySecret *string
AccessKey secret
The AccessKey secret paired with the AccessKey ID.
logstore *string
Logstore
The SLS Logstore name.
project *string
Project
The SLS project name.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150endpointOverride string
Endpoint override
Custom http or https endpoint URL. When set, it takes precedence over the endpoint derived from region.
fetchType string
FETCHSTOREFETCHFETCH_ONENONEResult handling mode
FETCH, FETCH_ONE, STORE, or NONE. Defaults to FETCH.
from string
From
Start of time range as ISO instant or epoch seconds. Defaults to 15 minutes ago.
lines integerstring
100Lines
Number of log lines to return, between 1 and 100; defaults to 100.
offset integerstring
0Offset
Non-negative line offset for pagination; defaults to 0.
query string
Query
Search query or SQL analysis statement. Defaults to empty string.
region string
Region
The Alibaba Cloud region ID, for example cn-hangzhou. The service endpoint is derived from it unless endpointOverride is set.
reverse booleanstring
falseReverse
Sort in reverse chronological order; defaults to false.
securityToken string
Security token
Optional Security Token Service (STS) token, required when using temporary credentials.
to string
To
End of time range as ISO instant or epoch seconds. Defaults to current time.
topic string
Topic
The log topic filter. Defaults to empty string.
Outputs
count integer
Total number of log records returned
log object
First fetched log item as a key-value map
Only populated if fetchType is FETCH_ONE
logs array
Fetched logs as a list of key-value maps
Only populated if fetchType is FETCH
uri string
uriURI of the stored results in internal storage
Only populated if fetchType is STORE