触发的Web Job Powershell部署脚本

问题描述 投票:0回答:1

我有一个Powershell脚本来部署继续的webjob。如下所示

`$Header = @{
'Content-Disposition'='attachment; attachment; filename=Copy.zip'
'Authorization'=$accessToken}

$apiUrl1 = "https://$webAppName.scm.azurewebsites.net/api/continuouswebjobs/MyWebJob" 

Invoke-RestMethod -Uri $apiUrl1 -Headers $Header -Method put -InFile "$zipFilesPath\MyWebJob.zip" - 
ContentType 'application/zip'`

我需要相同类型的脚本来部署触发的网络作业。请帮助

azure azure-webjobs azure-powershell
1个回答
0
投票

要部署已触发的Web作业,只需如下更改脚本中的$apiUrl1

$apiUrl1 = "https://$webAppName.scm.azurewebsites.net/api/triggeredwebjobs/MyWebJob" 

参考-Upload a triggered job as zip

© www.soinside.com 2019 - 2024. All rights reserved.