
Azure CreateItem
CertifiedCreate one Cosmos document
Azure CreateItem
Create one Cosmos document
Inserts a document into the container and returns the stored record, diagnostics, and RU charge. Fails on duplicate id within the partition.
type: io.kestra.plugin.azure.storage.cosmosdb.CreateItemExamples
id: azure_cosmos_container_create_item
namespace: company.team
tasks:
- id: create
type: io.kestra.plugin.azure.storage.cosmosdb.CreateItem
endpoint: "https://yourcosmosaccount.documents.azure.com"
databaseId: your_data_base_id
containerId: your_container_id
tenantId: "{{ secret('AZURE_TENANT_ID') }}"
clientId: "{{ secret('AZURE_CLIENT_ID') }}"
clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
item:
id: item_id
region: europe
key: value
Properties
containerId *string
Container ID
Container (collection) name within the database; must already exist.
databaseId *string
Database ID
Target database name inside the account; required.
item *object
Document body to create
JSON payload must include id and partition key fields expected by the container.
tenantId *string
Azure AD tenant ID (GUID)
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
{}1150clientId 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.
Outputs
activityId string
Activity id
currentResourceQuotaUsage string
Current resource quota usage
diagnostics
Diagnostics
com.azure.cosmos.CosmosDiagnostics
com.azure.cosmos.implementation.FeedResponseDiagnostics
com.azure.cosmos.implementation.ClientSideRequestStatistics
date-timedate-timecom.azure.cosmos.implementation.query.QueryInfo-QueryPlanDiagnosticsContext
date-timedate-timecom.azure.cosmos.implementation.QueryMetrics
durationdurationdurationdurationduration string
durationDuration
eTag string
E tag
item object
Item
maxResourceQuota string
Max resource quota
requestCharge number
Request charge
responseHeaders object
Response headers
sessionToken string
Session token
statusCode integer
Status code