Следующий код остановит все триггеры фабрики данных Azure:
$triggersADF = Get-AzDataFactoryV2Trigger -DataFactoryName $DataFactoryName -ResourceGroupName $ResourceGroupName
$triggersADF | ForEach-Object { Stop-AzDataFactoryV2Trigger -ResourceGroupName $ResourceGroupName -DataFactoryName $DataFactoryName -Name $_.name -Force }
Однако то, что я думал, что перезапустит все триггеры, не работает:
$triggersADF | ForEach-Object { Start-AzDataFactoryV2Trigger -ResourceGroupName $ResourceGroupName -DataFactoryName $DataFactoryName -Name $_.name -Force }
Iполучить следующую ошибку:
$triggersADF | ForEach-Object { Start-AzDataFactoryV2Trigger -ResourceGroupName $ResourceGroupName -DataFactoryName $DataFactoryName -Name $_.name -Force }
True
Start-AzDataFactoryV2Trigger : HTTP Status Code: BadRequest
Error Code: BadRequest
Error Message: Missing or invalid pipeline references for trigger Trigger_az4
Request Id: 08b0e51a-9a3d-4662-ba8c-8ea62279c558
Timestamp (Utc):10/21/2019 21:05:10
At line:3 char:33
+ ... ch-Object { Start-AzDataFactoryV2Trigger -ResourceGroupName $Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Start-AzDataFactoryV2Trigger], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.DataFactoryV2.StartAzureDataFactoryTriggerCommand
Start-AzDataFactoryV2Trigger : HTTP Status Code: BadRequest
Error Code: BadRequest
Error Message: Missing or invalid pipeline references for trigger Trigger_c2l
Request Id: 86a0199d-5399-4079-abd4-7fe6973df222
Timestamp (Utc):10/21/2019 21:05:11
At line:3 char:33
+ ... ch-Object { Start-AzDataFactoryV2Trigger -ResourceGroupName $Resource ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Start-AzDataFactoryV2Trigger], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.DataFactoryV2.StartAzureDataFactoryTriggerCommand
Есть мысли о том, где я могу пойти не так?