Queries Cosmos items and returns its respective Cosmos query response output.

yaml
type: "io.kestra.plugin.azure.storage.cosmosdb.Query"
yaml
id: azure_storage_cosmos_query
namespace: company.team

tasks:
  - id: bulk
    type: io.kestra.plugin.azure.storage.cosmosdb.Query
    endpoint: "https://yourstorageaccount.blob.core.windows.net"
    databaseId: your_data_base_id
    containerId: your_container_id
    tenantId: "{{ secret('AZURE_TENANT_ID') }}"
    clientId: "{{ secret('AZURE_CLIENT_ID') }}"
    clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
    query: "SELECT * FROM c"
Properties

container ID

databaseId

query

Tenant ID

Client ID

Client ID of the Azure service principal. If you don't have a service principal, refer to create a service principal with Azure CLI.

Client Secret

Service principal client secret. The tenantId, clientId and clientSecret of the service principal are required for this credential to acquire an access token.

connectionString

DefaultSession
Possible Values
STRONGBOUNDED_STALENESSSESSIONEVENTUALCONSISTENT_PREFIX

consistencyLevel

Represents the consistency levels supported for Azure Cosmos DB client operations in the Azure Cosmos DB service.

Defaulttrue

contentResponseOnWriteEnabled

Sets the boolean to only return the headers and status code in Cosmos DB response in case of Create, Update and Delete operations on CosmosItem. If set to false (which is by default), service doesn't return payload in the response. It reduces networking and CPU load by not sending the payload back over the network and serializing it on the client.

endpoint

SubTypestring

excludeRegions

List of regions to be excluded for the request/retries. Example "East US" or "East US, West US" These regions will be excluded from the preferred regions list. If all the regions are excluded, the request will be sent to the primary region for the account. The primary region is the write region in a single master account and the hub region in a multi-master account.

feedRangePartitionKey

The Partiton key feed range used to target specific physical partitions. Must be used in conjunction with partitionKeyDefinition.

partitionKey

Sets the partition key used to identify the current request's target partition. Must be used in conjunction with partitionKeyDefinition

partitionKeyDefinition

The PartitionKeyDefinition used to extract the PartitionKey value. Must be used in conjunction with partitionKey or feedRangePartitionKey.

Definitions
kind*Requiredstring
Possible Values
HASHRANGEMULTI_HASH

kind

Sets the partition algorithm used to calculate the partition id given a partition key

paths*Requiredarray
SubTypestring

paths

Sets the item property paths for the partition key.

version*Requiredstring
Possible Values
V1V2

PEM Certificate

text
Your stored PEM certificate.
The tenantId, clientId and clientCertificate of the service principal are required for this credential to acquire an access token.
SubTypeobject

The total number of entities processed in the bulk operation.