I would like to create a stream analytics job using only Powershell. I know that the command to do this is: New-AzureRMStreamAnalyticsInput
. However it requires a JSON file with job details. I found a documentation provided by Microsoft where there is a small template of such a JSON file (check Create paragraph). However it's not enough for me.
I want to create an input from blob storage hence my JSON looks like this:
{
"properties":{
"type":"stream",
"datasource":{
"type":"Microsoft.Storage/Blob",
"properties":{
"accountName":"abc",
"accountKey":"###",
"container":"appinsights",
"pathPattern":"test-blob_2324jklj/PageViews/{date}/{time}",
"dateFormat":"YYYY-MM-DD",
"timeFormat":"HH"
}
}
}
}
After saving it and passing as an argument in New-AzureRMStreamAnalyticsInput
I receive following error: New-AzureRMStreamAnalyticsInput : Stream analytics input name cannot be null
. I think that my JSON file is not correct.
Do you have any templates of json files containing stream analytics job details or can you just tell me how to correctly set up a job through powershell?