I have Azure function annotations defined as below. Blob trigger reads data from Storage account processes and uses return value to write Output to a Blob container with "filename".json defined in the binding.
This is working as expected; however, when writing the data to a blob container. Output binding is checking for the existence of Blob with "GET" request and ultimately getting into 404 response code before making a "PUT" request. This was captured in Application Insights.
Is there any way I can override this behavior? Screen shot of Log analytics here
FUNCTION BINDINGS
public class ProcessZipFiles2Cosmos {
@FunctionName("ProcessZipFiles2Cosmos")
@StorageAccount("blobStorageAccount")
@BlobOutput(name = "blob_redacted_json", path = "nonpii/{filename}.json")
public static String run(
@BlobTrigger(name = "files", dataType = "binary", path = "transactedreturn/{name}", connection = "blobStorageAccount") byte[] content,
@BindingName("name") String filename,
@CosmosDBOutput(name = "cosmos_transacted", databaseName = "tax-return-data-ops", collectionName = "TransactedReturns",
connectionStringSetting = "AzureCosmosDBConnection") OutputBinding<String> cosmosItem,
final ExecutionContext context) {
// function body
}
}
FUNCTION.JSON
{
"scriptFile":"../transactedreturn-1.0.0-SNAPSHOT.jar",
"entryPoint":"com.hrblock.clzconverter.ProcessZipFiles2Cosmos.run",
"bindings":[
{
"type":"blobTrigger",
"direction":"in",
"name":"files",
"path":"transactedreturn/{name}",
"dataType":"binary",
"connection":"blobStorageAccount"
},
{
"type":"cosmosDB",
"direction":"out",
"name":"cosmos_transacted",
"databaseName":"tax-return-data-ops",
"connectionStringSetting":"AzureCosmosDBConnection",
"collectionName":"TransactedReturns"
},
{
"type":"blob",
"direction":"out",
"name":"$return",
"path":"nonpii/{filename}.json",
"connection":"blobStorageAccount"
}
]
}