Last active
December 25, 2019 17:36
-
-
Save Fleid/3aa865bae23dc73e21e039e8ef861382 to your computer and use it in GitHub Desktop.
PowerShell Core Az script to provision an Azure Stream Analytics job - see https://www.eiden.ca/asa-alm-102/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Login to Azure | |
Connect-AzAccount | |
# If necessary (multiple subscriptions available), select the appropriate one | |
Get-AzSubscription | |
Get-AzSubscription -SubscriptionName "mySubscriptionNameGoesHere" | Select-AzSubscription | |
# Create a Stream Analytics job | |
$suffix = "staging" | |
$rg_name = "rg-asatest$suffix" | |
$jobName = "MyStreamingJob$suffix" | |
$currentLocation = Get-Location | |
$jobDefinitionFile = "$currentLocation\Provision\JobTemplate.provision.json" | |
New-AzStreamAnalyticsJob ` | |
-ResourceGroupName $rg_name ` | |
-File $jobDefinitionFile ` | |
-Name $jobName ` | |
-Force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minimal Stream Analytics job config file (
JobTemplate.provision.json
) to be used in this context: