
Azure Queries
CertifiedRun multiple Cosmos queries
Azure Queries
Run multiple Cosmos queries
Executes labeled Cosmos SQL queries in one task; each label returns its own result set. Partition scoping and region exclusion are per-query.
type: io.kestra.plugin.azure.storage.cosmosdb.QueriesExamples
id: azure_storage_cosmos_queries
namespace: company.team
tasks:
- id: cosmos_queries
type: io.kestra.plugin.azure.storage.cosmosdb.Queries
endpoint: "https://yourcosmosaccount.documents.azure.com"
tenantId: "{{ secret('AZURE_TENANT_ID') }}"
clientId: "{{ secret('AZURE_CLIENT_ID') }}"
clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
queries:
query-one:
query: SELECT * FROM c
query-two:
query: SELECT * FROM c WHERE c.id = 'test'
partitionKeyDefinition:
paths: ["/id"]
kind: HASH
version: V2
partitionKey:
id: test
Properties
containerId *Requiredstring
Container ID
Container (collection) name within the database; must already exist.
databaseId *Requiredstring
Database ID
Target database name inside the account; required.
queries *Requiredobject
Named queries to execute
Map of label to query options; entries run independently and return under the same label.
tenantId *Requiredstring
Azure AD tenant ID (GUID)
clientId string
Client ID of the Azure AD application
Application (client) ID used for service principal authentication.
clientSecret string
Client secret for the Azure AD application
Secret value associated with the client ID; store in a Kestra secret.
connectionString string
Cosmos connection string
Full connection string from Azure portal; overrides endpoint and Azure AD credentials when set.
consistencyLevel string
SessionSTRONGBOUNDED_STALENESSSESSIONEVENTUALCONSISTENT_PREFIXChoose request consistency
Consistency level sent to Cosmos; defaults to SESSION.
contentResponseOnWriteEnabled booleanstring
trueReturn payload on writes
When true (default), write responses include the document body; set false to reduce payload size.
endpoint string
Cosmos account endpoint
Base account URL (e.g. https://
pemCertificate string
PEM-encoded certificate content for client authentication
PEM text for certificate-based auth; alternative to clientSecret.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
Outputs
results object
Results