简体   繁体   English

Azure资源提供者概念

[英]Azure Resource Provider concepts

I try to write my own Resource Provider to create a new Add-On to Azure MarketPlace, but I have got some not clear concepts about the Provider. 我尝试编写自己的资源提供程序来为Azure MarketPlace创建一个新的加载项,但是我对提供程序有一些不清楚的概念。

If the user wants to get details on a Resource, Azure will do a GET for that particular resource. 如果用户希望获取有关资源的详细信息,Azure将为该特定资源执行GET。

<provisioning_endpoint>/subscriptions/<subscription_id>/cloudservices/<cloud_service_name>/resources/<resource_type>/<resourceName>

I know that I can set up the Resource Type at the Publisher Portal under application services//Resource Provider. 我知道我可以在发布者门户上的应用程序服务//资源提供者下设置资源类型。 But what about the Resorce? 但是Resorce呢? If I want to create a new service (for example SendGrid did) I don't want to make a Virtual Machine or an Add-on, I want to create ex a Subscription in my Site. 如果我想创建一个新服务(例如SendGrid做的),我不想创建虚拟机或附加组件,我想在我的站点中创建一个订阅。 Azure will do a GET request to my provider and that request will include the name of the resource. Azure将向我的提供程序发出一个GET请求,该请求将包含资源的名称。 But where/how can I set up the name of the Resource? 但是,在哪里/如何设置资源名称?

I think the Resource is the string that the user can enter in the Portal from "Purchase from Marketplace 我认为“资源”是用户可以从“从市场购买”中输入门户网站中的字符串

I read that Resources are nested under a named entity called a CloudService. 我读到资源被嵌套在名为CloudService的命名实体下。 Where can I set the name of the CloudService? 在哪里可以设置CloudService的名称? What could be a possible name of the CloudService in my case? 就我而言,CloudService的可能名称是什么? Or I missunderstand the whole working of the Resource Provider? 还是我误解了资源提供者的全部工作?

<provisioning_endpoint>/subscriptions/<subscription_id>/cloudservices/<cloud_service_name>/resources/<resource_type>/<resourceName>

Azure will send you requests to your end point URL. Azure将向您发送请求到您的端点URL。 When you split the URL into chunks you will get something like: 当您将URL分成多个块时,您将获得类似以下内容的信息:

[1] => addon
[2] => azure
[3] => resources
[4] => subscriptions
[5] => 6163ffa8-4b05-4bc3-8c45-5656d279c87c
[6] => cloudservices
[7] => Azure-Stores-H4PFJULZHK3OKNFGJZTK5P3XGRVORLB7ZDAZVKEBLZLUVIGNJKGA-West-US
[8] => resources
[9] => marketing2-6460E175-C5B7-4571-9189-7A2630A4CE32
[10] => ContosoAPPSTAGED3

So looking at the line above from the doc and the received URL chunks the resourceName in this case is ContosoAPPSTAGED3 因此,从文档和接收到的URL块看上面的这一行,在这种情况下,resourceName是ContosoAPPSTAGED3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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