Azure Storage Blob Sink
Provided by: "Apache Software Foundation"
Support Level for this Kamelet is: "Stable"
Uploads each message as a file (a block blob) to a container in Azure Blob Storage, named after the file header.
Use it to store documents, exports or event payloads in Azure, for other applications or for archiving. To add each message at the end of one growing blob, such as a log, use azure-storage-blob-append-sink.
Input: the body is the content of the blob: text, bytes or a stream. Turn structured data such as a Map into JSON text first, for example with json-serialize-action. The optional file header (or ce-file) is the name of the blob, such as reports/2026-05.csv; a / in it puts the blob in a virtual folder. Without it, the blob gets a generated unique name.
Output: the body afterwards is true, and headers such as CamelAzureStorageBlobETag and CamelAzureStorageBlobLastModified describe the uploaded blob.
Good to know: a blob with the same name is replaced. The container must exist: a missing container fails the message. The name comes only from file or ce-file: to copy blobs from azure-storage-blob-source and keep their names, set file from its CamelAzureStorageBlobBlobName header first. Headers that start with CamelAzureStorageBlob are removed from the message first, so they cannot change what the Kamelet does.
Configuration Options
The following table summarizes the configuration options available for the azure-storage-blob-sink Kamelet:
| Property | Name | Description | Type | Default | Example |
|---|---|---|---|---|---|
Account Name | Required The name of the storage account, as shown in the Azure portal under Storage accounts. It is the first part of the address of the account, | string | mystorageaccount | ||
Container Name | Required The name of the container in the storage account to write the blobs to. | string | invoices | ||
Access Key | An access key of the storage account, from the Azure portal: the storage account, then Security + networking, then Access keys. Used when | string | |||
Client ID | The application (client) ID of an app registration (service principal) in Microsoft Entra ID that has access to the storage account, from the Overview page of the app registration in the Azure portal. Used with | string | |||
Client Secret | A client secret of the app registration, from the Azure portal: the app registration, then Certificates & secrets. Used with | string | |||
Credential Type | How to log in to the storage account. Enum values: * SHARED_ACCOUNT_KEY * AZURE_SAS * AZURE_IDENTITY * CLIENT_SECRET | string | SHARED_ACCOUNT_KEY | ||
SAS Token | A shared access signature (SAS) token for the storage account or for the container, from the Azure portal: the storage account, then Security + networking, then Shared access signature, or the container, then Shared access tokens. Used when | string | |||
Tenant ID | The directory (tenant) ID of the app registration, from its Overview page in the Azure portal. Used with | string |
Dependencies
At runtime, the azure-storage-blob-sink Kamelet relies upon the presence of the following dependencies:
-
camel:azure-storage-blob
-
camel:kamelet
Camel JBang usage
Prerequisites
-
You’ve installed JBang.
-
You have executed the following command:
jbang app install camel@apache/camel Supposing you have a file named route.yaml with this content:
- route:
from:
uri: "kamelet:timer-source"
parameters:
period: 10000
message: 'test'
steps:
- to:
uri: "kamelet:azure-storage-blob-sink" You can now run it directly through the following command
camel run route.yaml Azure Storage Blob Sink Kamelet Description
Authentication methods
In this Kamelet, you can use these Azure authentication methods:
-
Azure Identity mechanism:
AZURE_IDENTITY -
Plain Shared Account Key:
SHARED_ACCOUNT_KEY -
Shared access signature (SAS) token:
AZURE_SAS, with the token insasToken
The order of evaluation for AZURE_IDENTITY is the following:
-
Enviroment
-
Workload Identity
-
Managed Identity
-
Azure Developer CLI
-
IntelliJ
-
Azure CLI
-
Azure Powershell
To log in as an app registration (a service principal), set credentialType to AZURE_IDENTITY and provide clientId, clientSecret, and tenantId: when all three are set, they are used instead of the order above. CLIENT_SECRET does not use these three properties.
For more information, see the Azure Identity documentation
Log in with a SAS Token
A shared access signature (SAS) token gives access to the storage account, or to one container, with the permissions and the expiry chosen when it was made, without handing out an access key. Create one in the Azure portal: the storage account, then Security + networking, then Shared access signature, or the container, then Shared access tokens. Set credentialType to AZURE_SAS and sasToken to the token, without the URL in front of it; a leading ? is allowed. The sink needs the Write permission. A token that lacks a permission, or has expired, fails with status 403.