如何使用REST API创建媒体服务帐户? [英] How to create a media service account using the REST API?

查看:52
本文介绍了如何使用REST API创建媒体服务帐户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I would like to create a new media service account programmatically using the rest API. 

I am using this documentation: https://docs.microsoft.com/en-us/rest/api/media/mediaservices/createorupdate

If I have read the documentation correctly, I need to send a PUT request to 

https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{account I want to create}?api-version=2018-07-01 I was previously getting a permission error, but after fixing this issue I only get 404s.

Sending a PUT request to a non-existing service seems counter-intuitive, and I understand how that could result in a 404, but the documentation says otherwise.

Has anyone done something similar?





推荐答案

您在PUT请求的正文中添加了什么?另外,请尝试将Postman与v3 REST API集合一起使用,如 https://docs.microsoft.com/zh-cn/azure/media-services/latest/media-rest-apis-with-postman . 这样一来,您就可以轻松查看AAD身份验证请求以及媒体帐户/创建或更新媒体服务帐户"下的选项(您正在执行的PUT请求).此处列出了所有参数和示例值.
What did you put in the body of the PUT request?  Also, try using Postman with the v3 REST API collection as discussed on https://docs.microsoft.com/en-us/azure/media-services/latest/media-rest-apis-with-postman.  This makes it easy to see the AAD authentication requests as well the option under Media Accounts/Create or update a Media Services account (the PUT request you're doing).  All of the parameters and example values are listed there.


这篇关于如何使用REST API创建媒体服务帐户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆