简体   繁体   中英

How to set or retrieve deployment credentials in Azure App Service?

I am writing an auto deployment service and I am already able to create my App Service resource via ARM Template using the ARM API but now I need to deploy the content there, Im planning use the Kudu Zip deployment API ( https://github.com/projectkudu/kudu/wiki/Deploying-from-a-zip-file ) but Im missing how to set or get the deploy username and password automatically through some api based process (not using the UI).

I know the site credentials are actually account-tied users, if you know a different kind of credential can be used to deploy, please point me the direction that would allow me release without a specifc person-oriented credential (an app credential instead)

If you want to get the publish credentials, you could use the Web Apps - List Publishing Credentials Rest API to do that.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list?api-version=2016-08-01

About how to call the Azure Resource Manager REST API, please refer to this tutorial .

We also could use Azure SDK to get the publish credentials. For more information about how to use Kudu API or Azure SDK to get the publish credential, please refer to another SO thread .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM